Device State Change
A Device State Change event trigger executes when the state of one or more devices changes.
Since multiple devices can changes state at the same time, make sure the Max In Progress setting in the device state change trigger is defined to allow concurrent instances of the trigger. For more information, see Trigger settings.
Defining a device state change event trigger
To define a device state change event trigger, follow these steps:
- From the Workbench left pane, expand the node where
you want to define the device state change event
trigger.
- Select the Project icon to display
the Projects window, right-click a
specific project tab to display its pop-up menu, and
then select New.
You also can select the New button at the bottom of the Projects window when a specific project tab has already been selected. - The new Trigger window
appears.
Name the trigger. The trigger name can be up to 64 characters and include letters, numbers, and the underscore character. Spaces are allowed. - From the Event tab, select the
Trigger Event Type down-arrow, expand
the Internal category, and then select
Device State Change.
The Event tab becomes active with parameters that accommodate the device state change event.
Parameter | Description |
---|---|
Filter for Device | True - Displays a
list of devices that reside on the
current node. Select a device from the list to have the trigger execute when that device changes state. False - The trigger will execute when any device on the current node changes state. |
Fire on Device Start | True - The trigger
will execute when the device state
changes to Started. False - The trigger will not execute when the device state changes to Started. |
Fire on Device Stop | True - The trigger
will execute when the device state
changes to Stopped. False - The trigger will not execute when the device state changes to Stopped. |
Fire on Device Disable | True - The trigger
will execute when the device state
changes to Disabled. False - The trigger will not execute when the device state changes to Disabled. |
Device state change event type trigger event variables
The input event variables available to a device state change event trigger are:
Event variable | Data type | Description |
---|---|---|
Device Name | STRING | The name of the device whose state has changed. |
State | STRING | This new state of the device. The
value can be:
|