Omron CJ - INSTRUCTIONS Reference Manual page 1054

Table of Contents

Advertisement

3. Instructions
It is possible to incorporate two or more TRSM(045) instructions in a program. In this case, the value of
the same specified bit or word will be stored in Trace Memory each time that one of the TRSM(045)
instructions is executed.
Data stored every cycle.
Refer to the Peripheral Device's Operation Manual for details on data tracing.
Hint
The other two ways to control data sampling are sampling at the end of each cycle and sampling at a
specified interval (independent of the cycle time).
The data-tracing operations performed with the Peripheral Device are summarized in the following list.
1. Set the following parameters with the Peripheral Device.
a) Set the address of the bit or word to be traced.
b) Set the trigger condition. One of the three following conditions can control when data stored into
Trace Memory is valid.
i) The Trace Start Bit goes from OFF to ON.
ii) A specified bit goes from OFF to ON.
iii) The value of a specified word matches the set value.
c) Set the sampling interval to "TRSM" for sampling at the execution of TRSM(045) in the program.
d) Set the delay.
2. When the Sampling Start Bit is turned from OFF to ON with the Peripheral Device, the specified
data will begin being sampled each time that TRSM(045) is executed and the sampled data will be
stored in Trace Memory. The Trace Busy Flag (A508.13) will be turned ON at the same time.
3. When the trigger condition (Trace Start Bit ON, specified bit ON, or value of specified word
matching set value) is met, the sampled data will be valid beginning with the next sample plus or
minus the number of samples set with the delay setting. The Trace Trigger Monitor Flag (A508.11)
will be turned ON at the same time.
4. The trace will end when TRSM(045) has been executed enough times to fill the Trace Memory.
When the trace ends, the Trace Completed Flag (A508.12) will be turned ON and the Trace Busy
Flag (A508.13) will be turned OFF.
5. Read the contents of Trace Memory with the Peripheral Device.
1016
Use a Peripheral Device to specify
which address will be traced.
Data from
address m is
stored in
Trace
Memory.
Data from
address m is
stored in
Trace
Trace Memory
Memory.
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents