A Custom Action used to Increment the Value of a Point
This example demonstrates how a custom pick action might be configured and used to increment the value of one point so that its value is greater than that of another point.
The expression in the example uses .$ notation. You can use such notation instead of specifying the full name and path of the database item on which the custom action is configured (the ‘method source’). The notation is an extension of the Relative References that are supported by Geo SCADA Expert. The leading dot(s) . refer to the Group in which the source item is located; the $ refers to the item itself. (The $ is only required if the item on which the custom action is configured is not itself a Group, Group Template, or Group Instance) .$ notation is substituted with the relevant information when the custom action is executed.
Example:
A custom action is required to enable the value of Analog Point 2 to be incremented so that it is 1 greater than the value of Analog Point 1.
The custom action is configured using the fields on the User Methods tab on Analog Point 1’s configuration Form:
The Method field is used to assign this expression to the custom action:
CurrentValue(".$.CurrentValue"+1)
where:
CurrentValue is the method name that defines the type of activity that is to be performed on the database item specified in the Object field. (In this particular example, the custom action is used to change Analog Point 2’s current value.)
( ".$.CurrentValue" + 1 ) is the argument used for the above method. (In this case, the argument specifies that the value of the above method is to be set to Analog Point 1’s current value plus one. (".$.CurrentValue" stipulates the current value of the custom action’s source—the database item on which the custom action is configured—which in this example is Analog Point 1.))
The Permission required to execute the custom action is left at the default of Control.
The configuration is saved.
The Analog points are used in a Logic program:
When required, users with the Control permission can trigger the custom action on Analog Point 1...
... to increment Analog Point 2’s value so that it is one greater then that of Analog Point 1: