Actions
Actions provide the ability to trigger a NetLinx Command or send a String based on either a button press or release, a gesture, or when a specific Page is either opened or closed.
Adding a Command (Action) to a Page or Button
In TPD5, Command actions are managed as Events that can be assigned to Pages or Buttons (General and Multi-State General only). Events are defined via the Events tab of the Properties window:
- Select the Page or Button to which you will assign the Command event action in the Workspace window or Design View.
- In the Events tab of the Properties window, select the Event to which you will assign the Command event action.
- Click the browse (...) button to open the Edit Event Actions dialog.
- Click Add Action and select command from the drop-down menu (FIG. 386):
FIG. 386 Edit Event Actions dialog - Add Action drop-down menu
This adds a command to the Actions list (FIG. 387):
FIG. 387 Edit Event Actions dialog - command added
- Under Description, specify a command port and output string for this command:
- Select the command port from a drop-down menu of available ports.
- Enter the command output in the text field to the right of the Port menu.
NOTE: Maximum command, string and text length = 4096 characters.
- Click OK to save changes and close the Edit Event Actions dialog.
Adding a String (Action) to a Page or Button
In TPD5, String actions are managed as Events that can be assigned to Pages or Buttons (General and Multi-State General only). Events are defined via the Events tab of the Properties window:
- Select the Page or Button to which you will assign the String event action in the Workspace window or Design View.
- In the Events tab of the Properties window, select the Event to which you will assign the String event action.
- Click the browse (...) button to open the Edit Event Actions dialog.
- Click Add Action and select string from the drop-down menu (FIG. 388):
FIG. 388 Add Action - string
This adds a string to the Actions list: (FIG. 389):
FIG. 389 Edit Event Actions dialog - string added
- Under Description, specify a string port and output for this string:
- Select the string port from a drop-down menu of available ports.
- Enter the string output in the text field to the right of the Port menu.
NOTE: Maximum command, string and text length = 4096 characters.
- Click OK to save changes and close the Edit Event Actions dialog.