Syntax
You can use any of the following syntax's:
- Getting Tag value:
- Example: LINE1.FT101 or VAL(LINE1.FT101)
- Getting Tag status:
- Example: STATUS(LINE1.FT101)
- Check if Tag status is Normal:
- Example: ISNORMAL(LINE1.FT101)
- Getting Tag time stamp of last update:
- Example: TSTMAP(LINE1.FT101)
- Using a Tag value inside an expression: Use VAL(TagName) function.
Example: VAL(LINE1.FT101) > 2
- Dynamic parameters should be surrounded with curly parentheses.
Example: {TAG}
Example: VAL({TAG}) > 2
Example: VAL((GROUP}.TOTAL) > 2
- String comparison needs to be surrounded with double quotations.
Example: "VAL(LINE1.STATUS)" = "RUNNING"
- 'and', 'or' and 'not'
Example: VAL(SIM.Ramp1) > 5 and VAL(SIM.Random1) > 4
Example: VAL(SIM.Ramp1) > 5 or VAL(SIM.Random1) > 4
Example: not (VAL(SIM.Ramp1))
Example: VAL(SIM.Ramp1) > 5 and not (VAL(SIM.Random1) > 4)
- Special keywords:
- $TIME: Gets the current time
- $DATE: Gets the current date
- Special functions:
- VAL_AND_UNIT(arg1, arg2, arg3)
Displays a number with specified format and a unit.
arg1: Tag name
arg2: Number format (See examples below)
arg3: Unit (This can be any string).
Example: VAL_AND_UNIT(VAL(LINE1.FT101),'0.0','m3')
- CURRENT_WIN()
Gets the current opened graphical window's name
- CURRENT_USER()
Gets the current logged user's name
- CURRENT_ACCESSLEVEL()
Gets the current logged user's access level
- Text formatting examples:
- You can use "Formula Tester" to test your formulas as below:
In the below example, the syntax is wrong (because 'and' is in capital letters):