Breakpoints (BPT)

This instruction is compatible with Studio 5000 Logix Emulate controllers only. This instruction is not compatible with emulated 5580 controllers.
Use the debug instructions to monitor the state of your logic when it is in conditions that you determine.
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
This instruction is not available in structured text.
Operands
There are data conversion rules for mixed data types within an instruction. See Data conversions.
Ladder Diagram
Operand
Type
Format
Description
Format
String
Tag
A string that sets the formatting for the text that appears in the trace window for the breakpoint.
Trace This
BOOL, SINT, INT, DINT, REAL
Tag
The tag that has a value you want to display in the trace window.
Description
Breakpoints are programmed with the Breakpoint output instruction (BPT). When the inputs on a rung containing a BPT instruction are true, the BPT instruction stops program execution. The software displays a window indicating that the breakpoint triggered and the values that triggered it.
When a breakpoint triggers, the emulator displays a window informing you that a breakpoint occurred. The title bar of the window shows the slot containing the emulator that encountered the breakpoint.
When you click OK, the emulator resumes program execution. If the conditions that triggered the breakpoint persist, the breakpoint will recur.
In addition, the emulator opens a trace window for the breakpoint. The trace window displays information about the breakpoint and the values.
IMPORTANT:
When a breakpoint triggers, you will not be able to edit your project until you permit the execution to continue. You can go online with the emulator to observe the state of your project, but you will not be able to edit it. If you try to accept a rung edit while a breakpoint is triggered, you will see a dialog box saying the controller is not in the correct mode.
String Format
With the Format string in the tracepoint and breakpoint instructions, you can control how the traced tags appear in the traces or breakpoint windows. The format of the string is:
  • heading:(text)%(type)
where heading is a text string identifying the tracepoint or breakpoint, text is a string describing the tag (or any other text you choose), and %(type) indicates the format of the tag. You need one type indicator for each tag you are tracing with the tracepoint or breakpoint instruction.
For example, you could format a tracepoint string as shown.
  • My tracepoint:Tag 1 = %e and Tag 2 = %d
The %e formats the first traced tag as double-precision float with an exponent, and %d formats the second traced tag as a signed decimal integer.
In this case, you would have a tracepoint instruction that has two Trace This operands (one for a REAL and one for an INT, although the value of any tag can be formatted with any flag).
The resulting tracepoint window that would appear when the tracepoint is triggered would look like the example.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Condition
Action Taken
Prescan
The rung becomes false.
Rung-condition-in is false
The rung becomes false.
Rung-condition-in is true
The rung becomes true.
Execution jumps to the rung that contains the LBL instruction with the referenced label name.
Postscan
The rung becomes false.
Examples
You can display many tag values with the BPT instruction. However, the formatting string can contain only 82 characters. Because the formatting string requires two characters for each tag you want in the breakpoint, you cannot trace more than 41 tags with a single BPT instruction. However, to separate tag data in your traces, you will need to include spaces and other formatting, thus reducing the number of tag values that one BPT instruction can effectively display to far fewer than 41.
This rung shows a breakpoint that stops program execution when an analog value is greater than 3.02 or less than 2.01.
Display the breakpoint information in the Format string (myformat). In this case, the format string contains the following text:
  • Breakpoint:The input value is %f
When the breakpoint triggers, the breakpoint trace window shows the characters before the colon (‘Breakpoint’) in the title bar of the trace window. The other characters make up the traces. In this example, %f represents the first (and in this case, the only) tag to be traced (‘analogvalue’).
The resulting traces appear as shown here.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.