Command New Breakpoint

Symbol: Command New Breakpoint 1:

Function: The command opens the Breakpoint Properties dialog.

Call: Debug menu, button Command New Breakpoint 2: New in the Breakpoint view (PLC > Window > Breakpoints).

Requirement: The PLC project is in online mode.

Command New Breakpoint 3:

The command Toggle Breakpoint can be used to set a new breakpoint directly at the current cursor position in online mode.

See also:

Breakpoint Properties dialog

Enable breakpoint immediately

Command New Breakpoint 4: The breakpoint is activated.

Command New Breakpoint 5: The breakpoint is not activated. To activate later, click the button Command New Breakpoint 6: in the view Breakpoints.

Condition tab

The dialog defines the conditions under which the program execution should stop at the breakpoint.

Command New Breakpoint 7:

Tasks

Only break if the breakpoint is hit in one of the following tasks

Command New Breakpoint 8::TwinCAT only evaluates the breakpoint if it is reached by certain tasks. The required tasks must be activated.

For example, you can define a single "debug task" and thus prevent other tasks that also use the function block from being affected during debugging.

Hit Count

Hit Count

Break always: The program always stops at this breakpoint.

Alternative: The program stops at the breakpoint when the breakpoint is hit as often as defined below (enter the desired number of hits or select from the number list):

  • Break if the Hit Count matches
  • Break if the Hit Count is a multiple of
  • Break if the Hit Count is greater or equal

Condition

Break, if TRUE

Definition of conditional breakpoints. The condition can only be entered in online mode.

Command New Breakpoint 9:: TwinCAT evaluates the specified condition and stops the program at this breakpoint if the result is TRUE. Valid Boolean expressions can be entered as a condition. Examples: x>100, x[y]=z, a AND b, boolVar.

Command New Breakpoint 10:

The use of conditional breakpoints slows the code execution, even if the condition is not TRUE.

Location tab

Command New Breakpoint 11:

POU

Function block of the active PLC project in which the breakpoint is to be positioned.

Position

Position of the breakpoint in the POU. Specification in the form of line and column numbers (text editor) or as network or item numbers.

Instances

For function blocks, you must specify whether the breakpoint should be set in the implementation or in an instance

Command New Breakpoint 12: TwinCAT sets the breakpoint in the instance. With this option, you select the instance path.

Command New Breakpoint 13: TwinCAT sets the breakpoint in the implementation.

Execution point settings tab

Here an existing breakpoint can be converted into an execution point.

Command New Breakpoint 14:

Execution point (Execution does not stop at breakpoint)

Command New Breakpoint 15:: The breakpoint becomes the execution point. The execution does not stop at this point, but the specified code is executed.

enabled: Command New Breakpoint 16:, disabled: Command New Breakpoint 17:

Execute the following code

Code that is executed when the execution point is reached.

Loop constructs (For, While) and IF or CASE expressions are not possible.

Print a message in the device log

This option is not available.

See also: