Program instructions
7.1 Bit logic
S7-200 SMART
174 System Manual, V2.3, 07/2017, A5E03822230-AF
STL logic stack instructions
The AND Load instruction (ALD) combines the values in the first and second levels of the stack using a logical
AND operation. The result is loaded in the top of stac
k. After the ALD is executed, the stack depth is decreased
by one.
The OR Load instruction (OLD) combines the values in the first and second levels of the stack, using a logical
OR operation. The result is loaded in the top of the stack. After the OLD is executed, the stack depth is de-
The Logic Push instruction (LPS) duplicates the top value on the stack and pushes this value onto the stack.
The bottom of the stack is pushed off and lost.
The Logic Read instruction (LRD) copies the second stack value to the top of stack. The stack is not pushed or
popped, but the old top-of-stack value is destroyed by the copy.
The Logic Pop instruction (LPP) pops one value off of the stack. The second stack value becomes the new top
The Load Stack instruction (LDS) duplicates the stack bit (N) on the stack and places this value on top of the
stack. The bottom of the stack is pushed off and lost.
AENO is used in the STL representation of the LAD/FBD box ENO bit. AENO performs a logical AND of the
ENO bit with the top of stack for the same effect as the ENO bit of a LAD/FBD box. The result of the AND op-
eration is the new top of stack.
1
Not applicable for LAD or FBD