4.6. Tag

Tag is a common terminology in general industry for variable in programming term. It was also called as Point in certain HMI system. Common SCADA system has two types of tag, one is IO tag and one non-IO tag. IO tag is tag that associate with external device data address, non-IO tag aka runtime or virtual tag or simply memory tag.

Tags inherit from Devices. To create a new tag, select the device and create an entry. The data type must be specified as per requirement. There are several types of accuracies for both integer and floating points in various vendor implementations. int8, int16, int32 are all integers, engineer must ensure what's the integer length of the type of PLC that being used, most common integer is int16. Same goes for floating point in industry devices, real32 is the most common floating point as compare to real64.

Parameter Description
Name Any unique name start by letter or underscore, avoid any other symbol like dash, dot, or special character or unicode. Try to make this a valid JavaScript variable name to exploit the power of Tag Expression. To be on the safe side for tag to work across most versions of browsers and scenarios, use only 26 English upper or lower case character and numbers.
Description Additional description.
Data Type

int16/short

int32/long

real32/float

real64/double

string

boolean

int8/char

uint8/BYTE

uint16/WORD

uint32/DWORD

Length Length for string data type.
Batch Batch numbering indicating if a chunk of data for one device shall be read or write together if they are contiguous in data address arrangement. It can be any number that can link them into one chunk or one batch, for instance, entering 100 for several contiguous tags will make them poll or update at one go. This shall speed up the communication a lot especially for serial communication.

Modbus user can ignore this column but need to enter dummy tag to ensure the addresses are in one range, otherwise they will be polled separately. Note that these unused tags will still be considered into license I/O count, so engineer must arrange the addresses in contiguous form. Otherwise if changing the data address is not possible, then engineer need to optimize the license count and the need of combining several chunks of addresses.
Address Data address for numerical type. E.g. Modbus Data Address. Not used for modern protocol which uses extended address like OPC.
Path Data address for string type. E.g. OPC & GE Fanuc SNP. On the other hand, it's not used for protocol like Modbus.
Log ID defined in Database Task. This shall automatically log the tag value once valid I.D. is entered. Which mean, this is the only thing need to do at back-end configuration if trending for a tag is required.
Read Level This column determines the tag's security level for reading. If the user login with user level lower than the value here, server will ignore the user's request to return the data. The highest security level is 1000 and it is set to 0 by default. It must not left blank.
Write Level This column determines the tag's security level for writing. If the user login with user level lower than the value here, server will ignore the user's request to set the data. The highest security level is 1000, it is set to 0 by default. It must not left blank.
Read Label Read Label granting the reading access for users who are tagged with the same Label, it was sometime intepreted as Security Role.
Write Label Write Label granting the writing access for users who are tagged with the same Label, it was sometime intepreted as Security Role.
Input Expression

Input Expression provides a quick mechanism for user to perform data scaling, PLC analogue value to floating point conversion, and any engineering unit conversion. Entering a number will be treated as scaling factor like divided by a thousand can be entered as 0.001. For more complicated conversion, like °C to °F, user may enter 9 / 5 * $ + 32, whereby $ representing the raw value.

User can even link several tag inputs into conversion. For a flow calculation that taking frequency as input, user may enter ($ / $KFac) * 3600 * $MFac, whereby MFac & KFac are tags for Meter Factor & K-Factor input respectively.

Output Expression

Output Expression provides a quick mechanism for reversed data conversion, for instance, sending data out to devices. Entering a number will be treated as scaling factor like multiplied by a thousand can be entered as 1000. For more complicated conversion, like °F to °C , user may enter 5 / 9 * ($ - 32), whereby $ representing the raw value.

User may also clip the output within High & Low limits by entering Math.max( LIM_LO, Math.min( LIM_HI, $)); whereby LIM_LO & LIM_HI clipped the desired output range.

Default Default initialized value or fallback value upon communication error. However, if Retentive (persistence) value was set and a valid previous data was stored, then this default value will be ignored.
Retentive Database I.D. defined earlier. This shall automatically save the tag value upon changes. This retentive feature comes handy when a tag needs to start up with previously set, used or received data. System will store the last good value so that this last good value will be used upon next system start up, or upon communication error. Retentive value will always overwrite Default value when presents.

Attributes of the tag can be modified at the property window on the right when a tag is highlighted.

Parameter Description
Input Tag Set to true for Read-Only tag. In Modbus Protocol, 1x coil & 3x register need to have this attribute turn ON. This mean, to get Input Coil, you need to create a Boolean tag with this attribute ON, to get Input Register, you need to create a Integer/Float tag with this attribute ON. Otherwise, this attribute shall remain OFF.
Write only tag If set to true, this tag will be flag as a write only tag and server will not read this tag from device.
[Tip] Tip

When a tag is renamed, all other tables which referring to this tag will be automatically renamed.


[Note] Note
  1. IO tag (i.e. any tag that associated to physical device) cannot be set with value if the device is not connected.

  2. Avoid to create any tag started by underscore '_' which might get conflict with system libraries' tags.