Breakpoint Positions

Breakpoint positions include all positions in a program at which values of variables can change or where the program flow branches off. (Exception: function calls. If necessary, a breakpoint in the function must be set here.) At the positions lying inbetween, a breakpoint would not even make sense, since nothing has been able to change in the data since the preceding breakpoint position.

This results in the following breakpoint positions in the IL:

  • At the start of the POU
  • At every LD, LDN (or, in case a LD is located at a label, then at the label)
  • At every JMP, JMPC, JMPCN
  • At every label
  • At every CAL, CALC, CALCN
  • At every RET, RETC, RETCN
  • At the end of the POU

Structured Text accommodates the following breakpoint positions:

  • At every assignment
  • At every RETURN and EXIT instruction
  • in lines where conditions are being evaluated (WHILE, IF, REPEAT)
  • At the end of the POU

Breakpoint positions are marked by darker line number fields (in the color which is set in the project options):

../_images/9810fa7abdc85ee90a317f3447b2fee1

How do you set a breakpoint?

In order to set a breakpoint, click the line number field of the line where you want to set a breakpoint. If the selected field is a breakpoint position, then the color of the line numbers field will change from dark gray to light blue, and the breakpoint will be activated in the PLC.

Deleting Breakpoints

Correspondingly, in order to delete a breakpoint, click on the line number field of the line with the breakpoint to be deleted.

Setting and deleting of breakpoints can also be selected via the menu ( ‘Online’ ‘Toggle Breakpoint’), via the function key <F9>, or via the symbol in the tool bar.