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.
The trigger can be:
  • 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
  1. In
    Execution
    , right-click the controller and select
    New Task
    .
  2. Configure the settings of the task:
    • Task
      . Enter the name of the task.
    • Description
      . Enter a description of what the task does.
    • Type
      . Select
      Event
      .
    • 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 the
      Period
      rate.
    • (optional)
      Disable automatic output processing
      . Position the switch to Toggle On Position
      On
      to help prevent external output modules from updating the data table values of the controller at the end of the task scan. Position the switch to Switch Disabled icon
      Off
      to enable updates.
    • (optional)
      Inhibit task
      . Position the switch to Toggle On Position
      On
      to help prevent the controller from performing this task. Position the switch to
      Off
      to enable the controller to perform this task.
      TIP:
      FactoryTalk Design Studio
      pre-scans inhibited tasks. If the controller is already in Run mode, the task is enabled and the task is not pre-scanned again
  3. Select
    Create
    . The task appears in the
    Controller
    list.
See Task syntax for a description of the syntax required to create a task in the FactoryTalk Design Studio Code editor.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.