![Omron CJ1G-CPUxx Instructions Manual Download Page 685](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491685.webp)
664
Table Data Processing Instructions
Section 3-17
SREAD(639) can be used to read the data for an item currently on a conveyor.
The position of the desired item is simply the number of items back (the offset
value) from the most recent item added to the conveyor.
Flags
Precautions
The stack must be defined in advance with SSET(630).
The address in the stack pointer must be greater than the PLC memory
address of the beginning of the data region (TB+4). An error will occur if the
stack pointer is less than the PLC memory address of TB+4, i.e., if a stack
underflow error occurs.
Examples
When CIO 000000 is ON in the following example, SREAD(639) reads the
data in the specified word in the stack starting at D00000 and outputs the data
to D00100. In this case, the stack pointer indicates D00007 and the offset
value is 3, so the data is read from D00004.
A
A
B
C
TB
TB+1
TB+2
TB+3
TB+4
D
m
n
C
n
m
PLC memory
address
Pointer
Reads the data (A) in the specified
word and outputs that data to D.
The address of the desired word is
calculated by subtracting the offset
value from the stack pointer address.
Last word
in stack
Stack
Offset value
Reads the data (A) without
changing the stack pointer.
The data (A) is
not changed.
Name
Label
Operation
Error Flag
ER
ON if the specified read location is not within the stack
area.
ON if the offset value specified in C is 0 or greater than
the maximum data region size (FFFB Hex).
OFF in all other cases.
Equals Flag
=
ON if the output data in D is 0000.
OFF in all other cases.
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...