Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 600

Table of Contents

Advertisement

3. Instructions
Operand Specifications
Word addresses
Area
CIO
WR
HR
TB
C
OK
OK
OK
D
Flags
Name
Error Flag
Equal Flag
Function
SREAD(639) reads the data from the address specified by the stack pointer (TB+3 and TB+2) minus
the offset value in C. SREAD(639) does not change the data in the stack or the stack pointer.
The stack must be defined in advance with SSET(630).
Offset value
C
Hint
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.
564
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
P_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).
• ON if the contents of the stack pointer (TB+3 and TB+2) is less than or equal to the PLC memory
address of first word in the data region of the stack (TB+4). (This is a stack underflow error.)
• OFF in all other cases.
P_EQ
• ON if the output data in D is 0.
• OFF in all other cases.
Stack
TB
n
TB+1
TB+2
m
TB+3
TB+4
A
Pointer
B
C
Last word
in stack
Reads the data (A) without
changing the stack pointer.
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
---
---
OK
OK
OK
OK
---
Operation
PLC memory
address
The data (A) is
not changed.
m
n
A
D
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.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
TR
bits
---
---

Advertisement

Table of Contents
loading

Table of Contents