Introduction

An M580 safety PAC can execute single-task and multi-task applications. Unlike a single-task application which only executes the MAST task, a multi-task application defines the priority of each task.

The M580 safety PAC supports the following tasks:

  • FAST

  • SAFE

  • MAST

  • AUX0

  • AUX1

Task Characteristics

The tasks supported by the M580 safety PAC present the following task characteristics:

Task Name

Priority

Time Model

Period Range

Default Period

Watchdog Range

Default Watchdog

FAST

1

Periodic

1...255 ms

5 ms

10...500 ms2

100 ms2

SAFE

2

Periodic

10...255 ms

20 ms

10...500 ms2

250 ms2

MAST1

3

Cyclic4 or Periodic

1...255 ms

20 ms

10...1500 ms2

250 ms2

AUX03

4

Periodic

10...2550 ms

100 ms

100...5000 ms2

2000 ms2

AUX13

5

Periodic

10...2550 ms

200 ms

100...5000 ms2

2000 ms2

1. MAST task is required and cannot be deactivated.

2. If CCOTF is enabled (by selecting Online modification in RUN or STOP in the Configuration tab of the CPU properties dialog), the minimum Watchdog setting is 64 ms.

3. Supported by standalone BMEP58•040S safety PACs. Not supported by BMEH58•040S safety Hot Standby PACs.

4. Standalone BMEP58•040S safety PACs support both cyclic and periodic time models. BMEH58•040S safety Hot Standby PACs support only the periodic time model.

Task Priority

M580 Safety PACs execute pending tasks according to their priority. When a task is running, it can be interrupted by another task with a higher relative priority. For example, when a periodic task is scheduled to execute its code, it would interrupt a lower priority task, but would wait until the completion of a higher priority task.

Task Configuration Considerations

All the non-safe tasks (MAST, FAST, AUX0, and AUX1) operate in the same memory area, while the SAFE task operates in its own, separate memory area. As a result:

  • If one non-safe task exceeds its watchdog, all non-safe tasks enter HALT state, while the SAFE task continues to be operational.

  • If the SAFE task exceeds its watchdog, only the SAFE task enters HALT state, while the non-safe tasks continue to be operational.

When creating and configuring tasks for your application, consider the following task features:

SAFE task:

Design this periodic task to execute only safety-related code sections for safety I/O modules. Because the SAFE task is assigned a lower priority than the FAST task, execution of the SAFE task may be interrupted by the FAST task.

Define the maximum execution time for the SAFE task by setting the appropriate watchdog value. Consider the time required to execute code and to read and write safe data. If the time to execute the SAFE task exceeds the watchdog setting, the SAFE task enters HALT state, and the %SW125 system word displays the detected error code 16#DEB0.

NOTE:
  • Because FAST task has a higher priority than the SAFE task, you may want to include a component for FAST task delay time in the SAFE task watchdog setting.

  • If the overrun of the SAFE task execution equals the “Safety watchdog” (which is a value equal to one and one-half times the SAFE task watchdog setting), the CPU and Copro will enter the ERROR state and the safety function will be applied.

MAST task:

This task can be configured as either cyclic or periodic. When operating in cyclic mode, define a maximum execution time by inputting an appropriate MAST watchdog value. Add a small time interval to this value at the end of each cycle to allow for the execution of other lower priority system tasks. Because the AUX tasks carry a lower priority than MAST, if this time slot is not provided, the AUX tasks may never be executed. Consider adding a time interval equal to 10% of cycle execution time, with a minimum of 1 ms and a maximum of 10 ms.

If the time to execute a cyclic MAST task exceeds the watchdog setting, the MAST task and all other non-SAFE tasks enter HALT state, and the %SW125 system word displays the detected error code 16#DEB0.

When operating in periodic mode, it is possible for the MAST task to exceed its period. In that case the MAST task runs in cyclic mode and the system bit %S11 is set.

FAST task:

The purpose of this periodic task is to execute a high-priority part of the application. Define a maximum execution time by setting the FAST watchdog value. Because the FAST task interrupts execution of all other tasks – including the SAFE task – it is recommended to configure the execution time of the FAST task to be as short as possible. A FAST task watchdog value not much greater than the FAST period is recommended.

If the time to execute the FAST task exceeds the watchdog setting, the FAST task and all other non-SAFE tasks enter HALT state, and the %SW125 system word displays the detected error code 16#DEB0.

AUX tasks:

AUX0 and AUX1 are optional periodic tasks. Their purpose is to execute a low priority part of the application. The AUX tasks are executed only after execution of the MAST, SAFE and FAST tasks has finished.

Define a maximum execution time for the AUX tasks by setting the appropriate watchdog value. If the time to execute an AUX task exceeds the watchdog setting, the AUX task and all other non-SAFE tasks enter HALT state, and the %SW125 system word displays the detected error code 16#DEB0.