To define script files to be run once when tags in alarm state, the script file name is added to Media File field of in the Alarm section of the Tag property page. Please use the pipe symbol “|” (Shift-\) to separate media files and/or script files. If there is no media file or a single script, then just enter the script file name (include the file extension, .scr, .js, .vbs, .jse, .vbe). Script files in TCL, JScript, VBScript, JScript encoded, or VBScript encoded formats are all supported.
To run a script as a local screen script, pre-append the file name with local!. For example, local! mediascript.vbs
The local script file, mediascript.vbs, will also be run once as a local script inside the first available ViewDAQ, if any, on the SCADA node and inside the first available View client on each computer connecting to the SCADA node. If the local! option is not specified , the script file will be run once as a global script inside the global script engine on the SCADA node when tag is in the alarm state the script is associated with.
Please note that the script will block execution flow of ViewDAQ/View client or global script engine. Therefore, please make sure the scripts exit as soon as possible.
See Also, 22.214.171.124.1 Media File (Analog Tag Alarm Properties), 126.96.36.199.1 Media File (Discrete Tag Alarm Properties) and 12. Scripts.
The DAQ Tag, %TALMTRIGGER. This allows scripts to retrieve the tag name that triggered the alarm script. %TALMTRIGGER is valid only in the script that is triggered by alarm. Otherwise, it will return an empty string.