Tag Variables Expression
Describes the available tag variables, what they mean, and whether they can be read/written.
Tag Variable | Description | Read/Write |
VALUE | Displays the current value of the tag. Operates same as the case when only the tag name is assigned. | R/W |
NAME | Displays the name of the tag. (String) | R |
DESC | Displays the description of the tag. (String) | R/W |
TYPE | Displays the type of the tag. (String) Types: Group, Analog, Digital, String | R |
UNIT | Displays the unit of the analog tag. (String) | R/W |
MIN | Displays the internal minimum value of the tag. | R/W |
MAX | Displays the internal maximum value of the tag. | R/W |
RAWMIN | Displays the site minimum value of the tag. | R/W |
RAWMAX | Displays the site maximum value of the tag. | R/W |
DEADBAND | Displays the deadband of the analog tag. | R/W |
OFFLABEL | Displays the Off Label of the digital tag. (String) | R/W |
ONLABEL | Displays the On Label of the digital tag. (String) | R/W |
LABEL | Displays the label of the digital tag according to the current state. (String) | R |
ALARMTYPE | Displays the assigned alarm type. | R |
INALARM1 | Displays the Alarm On Label of the digital tag. In case of Analog Tag: Displays HiHi Alarm, Major Dev, ROC Label. | R/W |
INALARM2 | Displays Hi Alarm, Minor Dev Label of the analog tag. | R/W |
INALARM3 | Displays Lo Alarm Label of the analog tag. | R/W |
INALARM4 | Displays LoLo Alarm Label of the analog tag. | R/W |
OUTALARM | Displays Alarm Off Label. | R/W |
ALARMHIHI | Displays the boundary value of HiHi alarm. | R/W |
ALARMHI | Displays the boundary value of Hi alarm. | R/W |
ALARMLO | Displays the boundary value of Lo alarm. | R/W |
ALARMLOLO | Displays the boundary value of LoLo alarm. | R/W |
ALARMTARGET | Displays the target value of the deviation alarm. | R/W |
ALARMMAJOR | Displays the Major Dev of the deviation alarm. | R/W |
ALARMMINOR | Displays the Minor Dev of the deviation alarm. | R/W |
ALARMROC | Displays the ROC of ROC alarm. | R/W |
ALARMACK | Displays the alarm acknowledgement state. | R/W |
ALARMVALUE | Displays the tag value when the alarm state changes. | R |
ALARMTIME | Displays the time when the alarm state changes. | R |
ALARMLABEL | Displays the label according to the current alarm state. | R |
ALARMOCCTYPE | Displays the following value according to the alarm type. 0 : No Alarm 1 : OFF Alarm (Digital Tag) 2 : ON Alarm (Digital Tag) 3 : OFF->ON Alarm (Digital Tag) 4 : ON->OFF Alarm (Digital Tag) 5 : OFF<->ON Alarm (Digital Tag) 6 : HIHI Alarm (Analog Tag) 7 : HI Alarm (Analog Tag) 8 : LO Alarm (Analog Tag) 9 : LOLO Alarm (Analog Tag) 10 : Major Dev Alarm (Analog Tag) 11 : Minor Dev Alarm (Analog Tag) 12 : ROC Alarm (Analog Tag) | R |
RAWVALUE | Displays the tag value of the Real/Analog tag in which the ‘Scale/Offset’ is not applied. If minimum/maximum value of the ‘Eng. Data’ is not assigned, the variable will display the same value as the actual tag value. | R |
TAGKIND | Displays the tag type. [Group(0)/Digital(1)/Analog(2)/String(3)] | R |
REALTAG | Displays the tag type; Real tag(1) or Virtual tag (0). | R |
DEVICE | Displays the name of the I/O Device. (String) | R |
ADDRESS | Displays the I/O Address. (String) | R |
DATALOG | Displays if the tag is registered to the Data Logging. (1: Registered, 0: Not Registered) | R |
ALARMOCCTIME | Displays the time when the alarm occurred. | R |
ALARMFREETIME | Displays the time when the alarm is cleared. | R |
NAME2 | Displays the tag name without the group tag name. | R |
ALARMENABLE | Displays if the tag alarm is enabled(1) or disabled (0). | R/W |
ACKLABEL | Displays the alarm ACK Label. | R/W |
HYSTERESIS | Displays the hysteresis of the alarm. | R/W |
Â
Â
Tag Variables Expression
Function | GetTagValEx("Tag Name", "Tag Variable") |
Type | Tag Variables Expression |
Description | Gets the value of the tag variable for that tag. |
Example | Sub Func1() Â Â Tag = GetTagValEx("MYTAG", "UNIT") End Sub |
Â
Â
Function | SetTagValEx "Tag Name", "Tag Variable", [Specified value] |
Type | Tag Variables Expression |
Description | Sets a value to the tag variable for the specified tag. |
Example | Sub Func1() Â Â SetTagVal "TAG", "DESC" "This is the comment." End Sub |