Step 2. Create an Invoke Method Action

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.

  1. Do basic Invoke Method configuration.

  1. Select the trend control.

  2. Click the right mouse button.

  3. Select Properties on the Popup menu.

The Properties Object dialog box opens.

  1. Select the Events tab.

  2. Select the type of event that will trigger the action in the Events field.

  3. Select New procedure….in the Action field's popup menu.

  4. Click New in the Procedure Information dialog box.

  5. Select Invoke method in the Action type field.

  6. 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.

  1. Click OK.

  1. Do advanced Invoke Method configuration.

  1. 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

Method name

Name of the selected method. Another method can be selected from the drop-down list.

Method result

(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

Name of the parameter to be configured.

 

Type

The type of expression to enter in the Value field.

 

Optional

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.

 

Do setpoint

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.

 

Value

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

  1. Point ID that refers to a text point

  2. Constant string enclosed in double quotes

  3. If/Then/Else condition where:

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

  1. Click OK to save your changes and return to the Actions tab.

  2. Click OK to save the procedure information and return to the Events tab.

  3. 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.

  1. 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

More information

Configure Methods.