Stack Data Read: Sread(639) - Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Table Data Processing Instructions
Precautions
Examples
000000
SNUM
D00000
D00300
Last word
Stack
in stack
pointer

3-17-15 STACK DATA READ: SREAD(639)

Purpose
Ladder Symbol
Variations
Applicable Program Areas
Operands
744
The stack must be defined in advance with SSET(630).
When CIO 000000 is ON in the following example, SNUM(638) counts the
number of words from the beginning of the data region at D00004 to the stack
pointer position - 1 (D00006) and outputs the result to D00300. (In this case,
the stack pointer indicates D00007.)
D00000
PLC memory address of
last word in the stack
D00001
D00002
Stack pointer
D00003
D00004
D00005
D00006
D00007
D00008
D00009
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 elements
before the current pointer position).
This instruction is supported by CS1-H, CJ1-H, CJ1M, and CS1D CPU Units
only.
SREAD(639)
TB
C
D
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Block program areas
OK
TB through TB+3: Stack control words
The first four words of the stack contain the PLC memory address of the last
word in the stack and the stack pointer (the PLC memory address of the next
available word in the stack.)
PLC memory
address
Counts number of data
words. (3 in this example.)
TB: First stack address
C: Offset value
D: Destination word
Step program areas
OK
OK
Section 3-17
D:D00300
0003Hex
SREAD(639)
@SREAD(639)
Not supported.
Subroutines
Interrupt tasks
OK

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents