The IEC 61131-3 Debugger allows you to step through and test IEC 61131-3 code:
The debugger window contains four sections. From top to bottom, the four sections are:
Section | Purpose |
---|---|
Debug Toolbar | Controls how the debugger steps through the code. |
Module List | Displays the names of the source code files relevant to a debug session. Allows you to switch between source code files. |
Source Window | Displays the current source code file and current execution location. Allows you to set and clear breakpoints in the code. |
Variable Window | Displays the variables in scope at the current location. Allows you to change variable values. |
You can start an IEC 61131-3 debug sessions from:
The debug toolbar provides you with commands to step through IEC 61131-3 code:
Command | Description |
---|---|
![]() | Stops execution immediately. |
![]() | Restarts execution from the start of the program or script. |
![]() |
Continue execution until one of the following occurs:
|
![]() | Displays the current source location. |
![]() | Steps into a function call. |
![]() | Steps over the current line. |
![]() | Returns from the current function. |
The Module List provides the list of source code modules referenced by the current script.
To display the source code for a module: select the module from the list.
To return to the current source location: click the
Display Source Location
button in the toolbar.
The Source Window displays the code you are currently running through the debugger:
From left to right, the Source Window has three areas:
The Debug Marker Area displays debug markers in your code:
Marker | Description |
---|---|
![]() | Shows the current execution location. |
![]() | Shows the location of a breakpoint. |
To set or clear a breakpoint click the Debug Marker Area. Note: The debugger will only allow you to set breakpoints on source code lines that correspond to actual code. For example you cannot set a breakpoint on lines that contain only whitespace or comments.
The Variable Window shows the program variables that are in scope for the current source code location:
To change a value do one of the following:
To learn about IEC 61131-3 Common Elements you can use in Structured Text (ST) programs and functions.
For the meaning of terms used in Fernhill SCADA.