Trace Memory Sampling - Trsm(45) - Omron SYSMAC C200HS Operation Manual

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Special Instructions
5-25-3 TRACE MEMORY SAMPLING – TRSM(45)
Description
AR Control Bits and Flags
Precautions
Example
Data tracing can be used to facilitate debugging programs. To set up and use
data tracing it is necessary to have a host computer running LSS; no data
tracing is possible from a Programming Console. Data tracing is described in
detail in the LSS Operation Manual. This section shows the ladder symbol for
TRSM(45) and gives an example program.
TRSM(45) is used in the program to mark locations where specified data is to be
stored in Trace Memory. Up to 12 bits and up to 3 words may be designated for
tracing (refer to the LSS Operation Manual for details).
TRSM(45) is not controlled by an execution condition, but rather by two bits
in the AR area: AR 2515 and AR 2514. AR 2515 is the Sampling Start bit.
This bit is turned ON to start the sampling processes for tracing. The Sam-
pling Start bit must not be turned ON from the program, i.e., it must be turned
ON only from the peripheral device. AR 2514 is the Trace Start bit. When it is
set, the specified data is recorded in Trace Memory. The Trace Start bit can
be set either from the program or from the Programming Device. A positive
or negative delay can also be set to alter the actual point from which tracing
will begin.
Data can be recorded in any of three ways. TRSM(45) can be placed at one
or more locations in the program to indicate where the specified data is to be
traced. If TRSM(45) is not used, the specified data will be traced when
END(01) is executed. The third method involves setting a timer interval from
the peripheral devices so that the specified data will be tracing at a regular
interval independent of the cycle time (refer to the LSS Operation Manual).
TRSM(45) can be incorporated anywhere in a program, any number of times.
The data in the trace memory can then be monitored via a Programming
Console, host computer, etc.
The following control bits and flags are used during data tracing. The Tracing
Flag will be ON during tracing operations. The Trace Completed Flag will turn
ON when enough data has been traced to fill Trace Memory.
Flag
Function
AR 2515
Sampling Start Bit
AR 2514
Trace Start Bit
AR 2513
Tracing Flag
AR 2512
Trace Completed Flag
If TRSM(45) occurs TRSM(45) will not be executed within a JMP(08) – JME(09)
block when the jump condition is OFF.
The following example shows the basic program and operation for data tracing.
Force set the Sampling Start Bit (AR 2515) to begin sampling. The Sampling
Start Bit must not be turned ON from the program. The data is read and stored
into trace memory.
When IR 00000 is ON, the Trace Start Bit (AR 2514) is also turned ON, and the
CPU looks at the delay and marks the trace memory accordingly. This can mean
that some of the samples already made will be recorded as the trace memory
(negative delay), or that more samples will be made before they are recorded
(positive delay).
Ladder Symbol
TRSM(45)
Section 5-25
277

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents