Ladder editor in online mode
In online mode, the editor provides value monitoring and supports the writing and forcing of current values. You can set breakpoints, and the color-coded representation of the connections allows for a kind of flow control.
Monitoring
In online mode, its actual value is displayed next to each variable in the editor. Constant variables get a green C symbol. The representation of the values is defined in the TwinCAT options, category Ladder editor.
Writing/forcing of values
If a variable is currently forced, this is indicated by directly in front of the forced value. If a value is prepared for writing or forcing, this value is displayed directly after the actual value in angle brackets: <value>.
Examples:
Forced variable:
Prepared value:
Constant value:
Color-coded representation of connections
In the online view of a Ladder diagram, the connecting lines are displayed in color: connections with the value TRUE are indicated by a thick blue line and connections with the value FALSE by a thick black line. Connections of unknown or analog value are displayed normally (thin black line).
The value of the connections is not read from the monitored variables, but calculated in the programming system. This is not a real flow control. |
Example: Connecting lines and breakpoint positions
Breakpoints
Breakpoints are basically possible at positions where the values of variables can change (statement), where the program branches, or where another programming block is called.
In the editor, possible breakpoint positions are indicated by an empty gray circle. Set breakpoints are displayed as a solid red circle. See the figure above: "Example: Connecting lines and breakpoint positions".
Possible breakpoint positions:
- On a callable box (function block, function, program, action, method). Not possible with operator boxes (example: ADD, DIV)
- On assignments
- Before parallel branches
- At the end of the box at the position of the return to the calling box. In online mode, an empty network automatically appears at this point, which is marked with RET instead of a network number.
- On EN input and ENO output of a box
- On the entire network. Indicates only that a breakpoint is set in the network. No breakpoint can be set on the entire network.
Breakpoints in methods: TwinCAT automatically sets a breakpoint in all methods that can be called. This means that if a method managed by an interface is called, breakpoints are set in all methods that occur in function blocks that implement this interface, as well as in all derived function blocks that use the method. If a method is called via a pointer to a function block, TwinCAT sets the breakpoints in the method of the function block and in all derived function blocks that use the method. |