Tasks

In LogicLab, you have six tasks to select for your PLC program. In the Project panel, expand the Task list to see them.

Moderate and Slow's periods can be changed. To change them:

  1. In the Project panel, expand the Task list.
  2. Right-click Moderate and select Task configuration.
  3. In Task configuration, click the Moderate's Set period and choose Yes.
  4. Click the Moderate's Period and enter the period you want. The suggested value is between Fast and Slow. Because we are adjusting Slow's value in the next step, we set it to 10.
  5. NOTE:  If you click the Period cell but it doesn't become editable, just click it again.

    NOTE:  If you set the Set period to No, the period will be reset to its default value.

  6. Do the same thing to Slow. In Slow's Period, enter the value you want. The value must be a multiple of the Fast task. For example, Fast is set to 10 milliseconds, Slow must be 20, 30, 40 or other value that is a multiple of 10. The value can't be the same as Fast's, and it can't be zero.
  7. NOTE:  If you set the Set period to No, the period will be reset to its default value.

  8. When you finish editing, click OK.

Overtime check for Fast tasks

KINGSTAR LogicLab has the mechanism "overtime check" that detects a Fast task that is running too long. If the Fast's period is too short to run the tasks, an error message will be displayed in the Output pane, and the PLC program will stop running. The figure below shows the error message. The Fast's period is 1 millisecond (1000 microseconds), but LogicLab takes 94098 microseconds to complete the task.

Overtime check doesn't count the access time of I/O modules. For example, if the Fast's period is 1 millisecond, the tasks take 920 microseconds and the access time of I/O modules is 200 microseconds. Overtime check won't count the latter. If there are customized plugins used with KINGSTAR PLC Runtime (llexec), overtime check won't count the process time of the plugins either.

Fast tasks' period and EtherCAT cycle time

The fast tasks' period must be the same as the EtherCAT cycle time. If they are not equal, the following problem may happen:

  1. Synchronization logic: to reduce the delays in communication, Fast tasks synchronize with EtherCAT cycle time. Fast tasks are triggered to run every time the EtherCAT cyclic packet returns. If the Fast tasks' period is not equal to the EtherCAT cycle time that triggers the tasks, issues may arise.
  2. Task's cycle time: the fast tasks may not have stable cycle time.

NOTE:  If you have High-Speed license, supported minimum cycle time for PLC is 250 microseconds.