![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268784.webp)
745
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
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...