An Operator Action is one or more IEC 61161-3 Structured Text (ST) Statements that are run when an operator interacts with an item.
The IEC 61161-3 Statements could be a request to open a new graphic page, for example:
OpenGraphic("Folder.TagName");
The IEC 61161-3 Statements could be a request to write a new value to a tag:
TagWriteValue("Folder.TagName", NewValue );
See Operator Action Functions for the list of functions available for operator actions.
You can declare local variables in operator actions using Variable Declarations. Local variables are declared using the VAR and END_VAR keywords. For example:
VAR TagValue : LREAL; END_VAR
These features use operator actions:
Feature | Example Property |
---|---|
Graphic Editor |
The Graphic Editor uses operator actions to define what happens when an operator does any of the following:
See Graphic Editor Operator Actions for the list of available actions. |
Toolbar Editor |
The Toolbar Editor uses operator actions to define what happens when a user clicks on a button in the Operator Interface Toolbar.
For example:
|
To edit an operator action:
Note: If there are syntax errors in the Operator Action Code, the editor will not accept the changes when you press the OK button. Either correct the errors, or press the Cancel button to cancel the changes.
When the Operator Action Editor is open, press Ctrl+Spacebar to open the autocomplete list to provide suggestions depending on the context:
The autocomplete list shows:
To select an item from the autocomplete list, do one of the following:
To insert the autocomplete reference into the code, do one of the following:
You can declare the common functions in the Global Bindings and call these from any number of Operator Actions. For example, this function declared in the Global Bindings:
FUNCTION StopPump VAR_INPUT TagName : WSTRING; END_VAR TagWriteValue( PumpName, FALSE ); END_FUNCTION
can be called from an operator action using:
StopPump( "Full Tag Name of the Pump" );
Syntax errors in Operator Action Code are highlighted in the editor using a dashed red underline:
Note: If you move the cursor near the error, a tooltip will be displayed providing an explanation of the error.
The Operator Action Code Editor will not accept code with obvious syntax errors. It is still possible to enter code with more subtle semantic errors. To find and locate additional errors:
Note: The above message indicates too few parameters for the StandardTagMenu Function.
Note: The property with the error is shown with red text.
Note: If you move the cursor near the error, a tooltip will be displayed providing an explanation of the error.
For the user interface functions to use in Operator Actions.
For information on the supported features of IEC 61131-3 Scripts.
For information on using the graphic page editor.
For information on using the operator toolbar editor.
For information about editing properties of items using the Properties Window.
For the meaning of terms used in Fernhill SCADA.