Script Type Function Block Command: Function Block Action

Command Description

The Function Block Action command allows one function block script to control the operation of another.

Value Column Parameters

Double-click the Value column to bring up a dialog box to define command settings (Figure 1). There are two parameters to select: the action to take, and the function block to apply the action to.


Figure 1: Dialog box for the Function Block Action function block script command.

Action

Specifies the action to be taken:

Function Block

The function block upon which to perform the action. All function blocks in the current setup will be listed in the large white box at bottom right; select one and then press the OK button.

The Find box allows you to more easily find the right function block in setups where there are many. Type a string in the box to filter the list of function blocks shown in the selection box, so that only those that match the entered string appear. Press Clear to resume showing all function blocks again.

Example

Figure 2 shows a "real world" example of how the Function Block Action command can be used. The setup in question is designed to run in a CoreMinion an ICS hardware device with two nodes. In addition to the script shown, the setup has two others: Node A Send Data, designed to run in Node A of the device, and Node B Send Data, designed to run on Node B. These two scripts have theirStart Type set to Manual so they do not run when the device is turned on, while the script in Figure 2 runs immediately. It begins by querying the device's serial number; if it is even, this means the script is running on Node A, so the script starts Node A Send Data; otherwise it starts Node B Send Data. The startup script then stops.


Figure 2: Example of a function block script conditionally starting one of two others.

  Spy Documentation - (C) Copyright 1997-2022 Intrepid Control Systems, Inc.