DL205 User Manual, 4th Edition, Rev. D
5-8
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Comparative Boolean
The DL205 Micro PLCs provide Comparative Boolean instructions that allow you to quickly
and easily solve compare two numbers. The Comparative Boolean provides evaluation of two
4-digit values using boolean contacts. The valid evaluations are: equal to, not equal to, equal
to or greater than, and less than.
In the example ,when the BCD value in V-memory location V1400 is equal to the constant
value 1234, Y3 will energize.
Boolean Stack
There are limits to how many elements you can
include in a rung. This is because the DL205 CPUs 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 you enter a STR instruction, the instruction is placed on the top
of the boolean stack. Any other STR instructions on the boolean stack are pushed down a
level. The ANDSTR, and ORSTR instructions combine levels of the boolean stack when they
are encountered. Since the boolean stack is only eight levels, an error will occur 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
1 STR X1
2
STR X0
3
4
1
2
3
4
AND X3
1
2
3
4
ORSTR
1
2
STR X0
3
OUT
Y0X0
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
NOT X5 OR X4 AND {X1 OR (X2 AND X3)}
ORNOT X5
1
2
3
ANDSTR
XO AND (NOT X5 or X4) AND {X1 or (X2 AND X3)}
1
2
3
STR X0
STR X2
STR X1
STR X0
STR X2
STR X1
STR X0