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 Ladder editor in online mode 1: 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:

Ladder editor in online mode 2:

Prepared value:

Ladder editor in online mode 3:

Constant value:

Ladder editor in online mode 4:

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).

Ladder editor in online mode 5:

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

Ladder editor in online mode 6:

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:

Ladder editor in online mode 7:

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.