Task Configuration

The default task in the CPU can be used for the application program, containing the utility blocks. Beyond this the following tasks have to be created:

  • HA_Task on CPU, containing the CONTROL and DIAG function blocks.
  • HA_Task on CM574, containing DIAG_ON_CM574 function blocks.

The cycle times are dependent on the CS31 cycle time which is calculated by the Automation_Builder and indicated in the CS31 Bus node (tab “Check CS31 modules”). Minimum HA CPU cycle time must be either 30 ms or (CS31 cycle time) whichever value is higher. HA-CM574-RS cycle time must be always lesser than the CPU cycle time.

HA_CS31_CALLBACK_STOP function must be called in CPU program as a Stop Event under SYSTEM EVENTS with the name starting with “callback” (e.g. “callback_stop”).

Proceed as follows:

  • Select: Task configuration -> system event.
  • Enable the system event Stop.
  • In the ‘Called POU’ column type in the POU name, starting with CALLBACK (e.g. CALLBACK_STOP).
  • Click the ‘Create POU <individual POU name>’ button to create the CALLBACK_STOP (FUN) function in the POU project.
  • Switch to CALLBACK_STOP POU and insert HA_CS31_CALLBACK_STOP function.
../_images/17919afd46aff6f20a33139001a91cff

Callback stop event

If a customer has downloaded the program to the PLC with a wrong callback stop event name then the CPU freezes and is unable to login to the PLC using ETHERNET cable. Users have to download a blank project to the PLC using RS232 communication cable (TK501) in order to return the PLC into healthy stage. After this, the users have to correct the callback stop event name as recommended and restart the download.

Note

The callback stop event should follow the name pattern “CALLBACK_xxx”.

Note

The blocks contained in the library can only be executed in ‘run’ mode of the PLC, but not in ‘simulation’ mode.