Note: You can create an Invoke method action for a trend object the same way you would for any object or group that allows you to define procedures.
(For all methods) do basic configuration. |
|
(For methods that contain arguments only) do advanced configuration. |
|
|
If you select a function to invoke a method and the function returns a value that contains arguments, you will have to do some easy, but advanced, configuration. In these instances, the Advanced button on the Edit tab of the Properties dialog box will be enabled. |
(Passing parameters via point ID's) use valid ranges for Trend methods. |
Do basic Invoke Method configuration.
Select the trend control.
Click the right mouse button.
Select Properties on the Popup menu.
The Properties Object dialog box opens.
Select the Events tab.
Select the type of event that will trigger the action in the Events field.
Select New procedure….in the Action field's popup menu.
Click New in the Procedure Information dialog box.
Select Invoke method in the Action type field.
Do basic configuration is as follows.
Field |
Description |
Action type |
Invoke method is selected. |
Object name |
Object to which the method will be assigned |
Method |
Method to implement. Note: The drop-down list includes methods available with the Trend object, if a Trend object is selected. |
Confirmed |
When checked requires confirmation during runtime. |
Advanced |
Enabled if the function returns a value that contains output arguments. Opens the Edit Method dialog box. |
Click OK.
Do advanced Invoke Method configuration.
Click Advanced on the Action tab in the Procedure Information dialog box.
The Edit Method dialog box opens.
An overview of options is as follows.
Field |
Description |
||
Name of the selected method. Another method can be selected from the drop-down list. |
|||
(Optional) Setpoint that contains the status value. |
|||
|
Class |
Boolean |
|
|
Structure Type |
BOOL |
|
|
Allowed |
Device or global Point ID. |
|
Parameters |
Listed parameters depend on the selected method. |
||
|
Name of the parameter to be configured. |
||
|
The type of expression to enter in the Value field. |
||
|
Specifies whether or not an entry is required in the Value field. |
||
|
|
No |
An entry is required. It is not optional. |
|
|
Yes |
An entry is not required. It is optional. |
|
Specifies if the argument can be used as an output argument. |
||
|
|
Enabled |
The argument can be used as an output argument. To assign the output value of the argument to a CIMPLICITY Point when the function exits, enter the Point ID in the expression field. |
|
|
Disabled |
The argument cannot be used as an output argument. Currently Do Setpoint is disabled for all Trending methods. |
|
An expression that will pass as the argument for each argument in the Name column. |
||
|
|
Type |
Description |
|
|
Integer |
An expression or Point ID that evaluates to a numeric value. |
|
|
String |
If is A (from either 1 or 2 on the list) Then is B (a text expression) Else is C (a text expression) A short hand If/Then/Else is A?B:C |
Click OK to save your changes and return to the Actions tab.
Click OK to save the procedure information and return to the Events tab.
Click OK to save the event.
Note: Some argument types are not supported (for example, IDispatch*, and IUnknown*). These will appear as <Bad type> in the Type column and the Expression field will be disabled. If the unsupported argument is required, you will not be able to configure this method for invocation.
Use valid ranges for Trend methods.
If you plan to pass a parameter via the contents of a CIMPLICITY Point ID, the contents of the Point ID will be converted to match that of the parameter.
The valid ranges for each type used by Trend methods are:
Type |
Valid Range |
BOOL |
Boolean with a value or 0 or 1. |
BSTR |
Any string. Numbers will be converted to strings. |
double |
Floating point number in the range ±(2.2250738585072014e-308 to 1.7976931348623158e+308) |
long |
Long integer in the range -2147483648 to 2147483647 |
short |
Short integer in the range -32768 to 32767 |
Configure Methods. |