565
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Table Data Processing Instructions
3
SREAD
SREAD
Applicable Program Areas
Operands
TB: First stack address
TB through TB+3: Stack control words TB+4 through TB+(N-1): Data storage region
Instruction Mnemonic Variations
Function
code
Function
STACK DATA READ SREAD @SREAD 639
Reads the data from the specified data element in
the stack. The offset value indicates the location of
the desired data element (how many data ele-
ments before the current pointer position).
Symbol
SREAD
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
Operand Description Data type Size
TB First stack address UINT Variable
C Offset value UINT 1
D Destination word UINT 1
TB: First stack address
C: Offset value
D: Destination word
SREAD(639)
TB
C
D
TB
0
15
TB+1
0
15
TB+2
0
15
TB+3
0
15
PLC memory address of the last
word in the stack (rightmost 4 digits)
PLC memory address of the last
word in the stack (leftmost 4 digits)
Stack pointer (rightmost 4 digits)
(Initial value is the rightmost 4 digits of
the PLC memory address for TB+4.)
Stack pointer (leftmost 4 digits)
(Initial value is the leftmost 4 digits of
the PLC memory address for TB+4.)
15 0
TB+4
TB+(N–1)
Data storage region
toto