Standard
RLL
Instructions
5--7
Standard RLL Instructions
Boolean Instructions
DL105 PLC User Manual, 3rd Edition
There are limits to how many elements you can include in a rung. This is because the
DL105 PLCs use an 8-level boolean stack to evaluate the various logic elements.
The boolean stack is a temporary storage area that solves the logic for the rung.
Each time the program encounters a STR instruction, the instruction is placed on the
top of the stack. Any other STR instructions already on the boolean stack are pushed
down a level. The ANDSTR, and ORSTR instructions combine levels of the boolean
stack when they are encountered. An error will occur during program compilation if
the CPU encounters a rung that uses more than the eight levels of the boolean stack.
The following example shows how the boolean stack is used to solve boolean logic.
X1 OR (X2 AND X3)
STR X0
STR X1
STR X2
1
STR X0
2
3
4
5
6
7
8
1
STR X1
2
STR X0
3
4
5
6
7
8
1
STR X2
2
STR X1
3
STR X0
4
5
6
7
8
AND X3
1
X2 AND X3
2
STR X1
3
STR X0
4
5
6
7
8
ORSTR
1
2
STR X0
3
8
OUT
Y0
X0
X1
X2
X3
X4
X5
STR
OR
AND
ORSTR
ANDSTR
Output
STR
STR
AND
X4 AND [X1 OR (X2 AND X3)]
AND X4
1
2
STR X0
3
8
NOT X5 OR X4 AND [X1 OR (X2 AND X3)]
ORNOT X5
1
2
STR X0
3
8
ANDSTR
X0 AND (NOT X5 OR X4) AND [X1 OR (X2 AND X3)]
1
2
3
8
S
S
S
S
S
S
S
S
Boolean Stack
Содержание DL105
Страница 2: ...DL105 PLC User Manual Manual Number D1 USER M...
Страница 308: ...1B DL105 Error Codes In This Appendix Error Code Table...
Страница 314: ...1C Instruction Execution Times In This Appendix Introduction Instruction Execution Times...
Страница 324: ...1D Special Relays In This Appendix DL105 PLC Special Relays...
Страница 327: ...1E PLC Memory In This Appendix DL105 PLC Memory...
Страница 329: ...1F European Union Directives CE In This Appendix European Union EU Directives Basic EMC Installation Guidelines...