Timeout on an SFC Step

The system can check timeout on any SFC step activity duration.

For that, enter this instruction in the main Action list of the step:

__StepTimeout ( timeOut , errString );

Where:

  • timeout is a time constant or a time variable specifying the timeout duration.
  • errString is a string constant or a string variable specifying the error message to be output

At runtime, each time the activation time of the step becomes greater than the specified timeout:

  • The error string is sent to the KAS-IDE and shown in the Log window.

Log Message Strings

Sending log message strings to the log window requires the:

  • Runtime to be connected through ETHERNET.
  • Runtime system supports plain text trace messages.

Important

You can put this statement within a #ifdef __DEBUG test so timeout checking is enabled only in debug mode.

Alternatively, if you need to make more specific handling of timeouts, you can enter this ST program in the N action block of the step:

if GSn.T > timeout then /* 'n' is the number of the step */
...statements...
end_if;