Tracepoints (TPT)

This instruction is compatible with Studio 5000 Logix Emulate controllers only. This instruction is not compatible with emulated 5580 controllers.
Tracepoints log data you select when a rung is true.
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 trace reports (both on-screen and logged to disk).
Trace This
BOOL
SINT
INT
DINT
REAL
Tag
The tag you want to trace.
Description
Tracepoints are programmed with the tracepoint output instruction (TPT). When the inputs on a rung containing a TPT instruction are true, the TPT instruction writes a trace entry to a trace display or log file.
You can trace many tags with the TPT instruction. However, the formatting string can contain only 82 characters. Because the formatting string requires two characters for each tag you want to trace, you cannot trace more than 41 tags with a single TPT instruction. However, to separate tag data in your traces, you will need to include spaces and other formatting, thus reducing the number of tags that one TPT instruction can effectively trace to far fewer than 41.
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 as shown here:
  • 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 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
Relay Ladder Action
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.
Example
This rung triggers a trace of three analog values when any one of them exceeds a given value (30.01).
Display the tracepoint information in the Format string (myformat).
In this case, the format string contains this text:
  • Analog inputs trace:Analog inputs = %f, %f, and %f
When the tracepoint triggers, the characters before the colon (‘Analog inputs trace’) appear in the title bar of the trace window. The other characters make up the traces. In this example, %f represents the tags to be traced (‘analogvalue1,’ ‘analogvalue2,’ and ‘analogvalue3’).
The resulting traces appear as shown here.
When this trace is logged to disk, the characters before the colon appear in the traces.
This indicates which tracepoint caused which trace entry. This is an example of a trace entry. ‘Analog inputs trace:’ is the heading text from the tracepoint's format string.
Analog inputs trace: Analog inputs = 31.00201, 30.282000, and 30.110001.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.