![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030784.webp)
744
Table Data Processing Instructions
Section 3-17
Precautions
The stack must be defined in advance with SSET(630).
Examples
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.)
3-17-15 STACK DATA READ: SREAD(639)
Purpose
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.
Ladder Symbol
Variations
Applicable Program Areas
Operands
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.)
SNUM
D00000
D00300
000000
D00000
D00001
D00002
D00003
D00004
D00005
D00006
D00007
D00008
D00009
D:D00300
0003Hex
PLC memory
address
Stack
pointer
Stack pointer
Last word
in stack
PLC memory address of
last word in the stack
Counts number of data
words. (3 in this example.)
SREAD(639)
TB
C
D
TB: First stack address
C: Offset value
D: Destination word
Variations
Executed Each Cycle for ON Condition
SREAD(639)
Executed Once for Upward Differentiation
@SREAD(639)
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Not supported.
Block program areas
Step program areas
Subroutines
Interrupt tasks
OK
OK
OK
OK
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...