EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 638

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
605
Table Data Processing Instructions Section 3-16
Flags
Precautions The stack must be defined in advance with SSET(630).
The address in the stack pointer must be greater than the PLC memory
address of the beginning of the data region (TB+4). An error will occur if the
stack pointer is less than the PLC memory address of TB+4, i.e., if a stack
underflow error occurs.
Examples When CIO 0.00 is ON in the following example, SREAD(639) reads the data
in the specified word in the stack starting at D0 and outputs the data to D100.
In this case, the stack pointer indicates D7 and the offset value is 3, so the
data is read from D4.
Name Label Operation
Error Flag ER ON if the specified read location is not within the stack
area.
ON if the offset value specified in C is 0 or greater than
the maximum data region size (FFFB hex).
OFF in all other cases.
Equals Flag = ON if the output data in D is 0000.
OFF in all other cases.
SREAD
D0
&3
D100
0.00
A
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
A
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
D100 A
3
Last word
in stack
Stack
pointer
PLC memory
address
PLC memory address
of last word in the stack
Stack pointer
Last word
in stack
Stack
pointer
PLC memory address of
last word in the stack
Stack pointer
The stack pointer position remains
unchanged after the data is read.

Table of Contents