1015
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Debugging Instructions
3
TRSM
Debugging Instructions
TRSM
Applicable Program Areas
Flags
There are no flags affected by this instruction.
Function
Before TRSM(045) is executed, the bit or
word to be traced must be specified with a
Peripheral Device. Each time that TRSM(045)
is executed, the current value of the specified
bit or word is sampled and recorded in order
in Trace Memory. The trace ends when the
Trace Memory is full. The contents of Trace
Memory can be monitored from a Peripheral
Device when necessary.
• This instruction only indicates when the specified data will be sampled. All other settings and data
trace operations are set with a Peripheral Device.
• TRSM(045) does not require an execution condition and is always executed as if it had an ON
execution condition. Connect TRSM(045) directly to the left bus bar.
• Use TRSM(045) to sample the value of the specified bit or word at the point in the program when the
instruction’s execution condition is ON. If the instruction’s execution condition is ON every cycle, the
specified bit or word’s value will be stored in Trace Memory every cycle.
Instruction Mnemonic Variations
Function
code
Function
Trace Memory Sampling TRSM --- 045
When TRSM(045) is executed, the status of a pre-
selected bit or word is sampled and stored in
Trace Memory.
Symbol
TRSM
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage OK OK OK OK OK OK
TRSM(045)
Tracing ends when
Trace Memory is full.
Trace Memory
Data sampling
Specified bit or word
PC data area
TRSM(045) executed.