Create an event task
Create a task that performs a function only when a specific event (trigger) occurs. When the trigger for the event task occurs, the event task:
- Interrupts any lower priority tasks.
- Runs one time.
- Returns control to where the previous task left off.
- A change of a digital input.
- A new sample of analog data.
- Certain motion operations.
- A consumed tag.
- An EVENT instruction.
To create an event task
- InExecution, right-click the controller and selectNew Task.
- Configure the settings of the task:
- Task. Enter the name of the task.
- Description. Enter a description of what the task does.
- Type. SelectEvent.
- Trigger. Select the action that triggers the execution of the task.
- Tag. Select the tag that contains the triggering data.
- Execute task if no event occurs within. Enable the task to execute if the timeout period expires before an event triggers the task. To execute the task automatically if the trigger fails within a specified time, assign the timeout value. When the task completes, the timer begins incrementing. The task automatically executes if the timer reaches its preset value before the task is triggered.
- Priority. Enter the priority level of the task. Lower numbers indicate higher priorities for tasks. A task assigned a 1 is a higher priority task than a task assigned a 15.
- Watchdog. Enter the maximum time in milliseconds the task can run before triggering a motor control fault.IMPORTANT: For safety tasks, enter a watchdog less than or equal to thePeriodrate.
- (optional)Disable automatic output processing. Position the switch toOnto help prevent external output modules from updating the data table values of the controller at the end of the task scan. Position the switch toOffto enable updates.
- (optional)Inhibit task. Position the switch toOnto help prevent the controller from performing this task. Position the switch toOffto enable the controller to perform this task.TIP:FactoryTalk Design Studiopre-scans inhibited tasks. If the controller is already in Run mode, the task is enabled and the task is not pre-scanned again
- SelectCreate. The task appears in theControllerlist.
See Task syntax for a description of the syntax required to create a task in the FactoryTalk Design Studio Code editor.
Provide Feedback