Complete the following steps to create a trigger.
- Open the .lvsc file that contains the statechart for which you want to create triggers.
- Display the Project Explorer window for this .lvsc file.
- Double-click the Edit Triggers and Groups item to launch the Edit Triggers and Groups dialog box.
- Click the Create Trigger button to create a new trigger. The Triggers and Groups list updates to display this new trigger.
- Enter a name for the trigger and press the <Enter> key to accept the name.
- Click the OK button to save changes and close this dialog box.
You can now and configure a transition or static reaction to react to this trigger.
To rename a trigger, select the trigger, press the <F2> key, and enter the new name. Press the <Enter> key to accept the name.
Combining Triggers into a Group
You also can combine triggers into groups. Complete the following steps to combine triggers into groups.
- In the Edit Triggers and Groups dialog box, click the Create Group button. The Triggers and Groups list updates to display this new group.
- Select this new group from the Group Composition pull-down list on the right of this dialog box. You also can double-click a group name in the Triggers and Groups list.
- Select a trigger or group from the Triggers and Groups list. To select multiple items, press the <Ctrl> key as you select triggers and/or groups.
- Click the Add button to add the selection to the current group.
- When you are finished, click the OK button to save changes and close this dialog box.
To remove items from a group, select the item(s) in the Group Composition list and click the Remove button.