Timeout on an SFC Step
"Sequential function chart"
It can be used to program processes that can be split into steps.
The main components of SFC are:
- Steps with associated actions
- Transitions with associated logic conditions
- Directed links between steps and transitions 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
In computer science, runtime (or run-time) describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time).
Within KAS, runtime also refers to the virtual machine that manage the program written in a computer language while it is running, each time the activation time of the step becomes greater than the specified timeout:
- The error string is sent to the KAS IDE
"Integrated development environment"
An integrated development environment is a type of computer software that assists computer programmers in developing software.
IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger and shown in the Log window.
Log Message Strings
Sending log message strings to the log window requires the:
- Runtime
In computer science, runtime (or run-time) describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time).
Within KAS, runtime also refers to the virtual machine that manage the program written in a computer language while it is running 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
"Structured text"
A high-level language that is block structured and syntactically resembles Pascal program in the N action block of the step:
if GSn.T > timeout then /* 'n' is the number of the step */
...statements...
end_if;





