Sample program
When CIO 0.00 is ON in the following example, SINS(641) inserts the source data in D100 at the
specified address in the stack starting at D0. In this case, the stack pointer indicates D7 and the offset
value is 3, so the source data is inserted in D4. The existing data is shifted down one word and the data
in D7 is overwritten. At the same time the stack pointer will be incremented from D7 to D8.
0.00
SINS
D0
#0003
D100
Stack
pointer
Last word
in stack
Stack
pointer
Last word
in stack
CS/CJ/NSJ Series Instructions Reference Manual (W474)
D0
PLC memory address
of last word in the stack
D1
D2
Stack pointer
D3
D4
B
D5
C
3
D6
D
D7
D8
D9
+1
D0
PLC memory address
of last word in the stack
D1
D2
Stack pointer
D3
D4
A
D5
B
D6
C
D7
D
+1
D8
D9
PLC
memory
(Insert)
D100
The stack pointer is incremented
by +1 after the data is inserted.
3. Instructions
3
A
565
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers