Omron CS1G/H-CPUxxH Instructions Manual page 692

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Table Data Processing Instructions
Examples
000000
SINS
D00000
#0003
D00100
Stack
pointer
Last word
in stack
Stack
pointer
Last word
in stack
3-17-18 STACK DATA DELETE: SDEL(642)
Purpose
Ladder Symbol
When CIO 000000 is ON in the following example, SINS(641) inserts the
source data in D00100 at the specified address in the stack starting at
D00000. In this case, the stack pointer indicates D00007 and the offset value
is 3, so the source data is inserted in D00004. The existing data is shifted
down one word and the data in D00007 is overwritten. At the same time the
stack pointer will be incremented from D00007 to D00008.
D00000
PLC memory address
of last word in the stack
D00001
D00002
Stack pointer
D00003
D00004
B
D00005
C
−3
D00006
D
D00007
D00008
D00009
+1
D00000
PLC memory address
of last word in the stack
D00001
D00002
Stack pointer
D00003
D00004
A
D00005
B
D00006
C
D00007
D
+1
D00008
D00009
Deletes the data element at the specified location in the stack, outputs that
data to the specified destination word, and shifts the remaining the data in the
stack upward. The offset value indicates the location of the desired data ele-
ment (how many data elements before the current pointer position).
This instruction is supported by the CS1-H, CJ1-H, CJ1M, and CS1D CPU
Units only.
PLC
memory
(Insert)
D00100
The stack pointer is incremented
by +1 after the data is inserted.
SDEL(642)
TB: First stack address
TB
C: Offset value
C
D: Destination word
D
Section 3-17
A
671

Advertisement

Table of Contents
loading

Table of Contents