90
•
Appendix B: GPIO Control
\n
\r\n
\n\r
Coyote)
Incorrect Lookup Table Usage
Rule
Incorrect Syntax
Correct Syntax
The output must be on the
left hand side of the equation
(the value is being assigned
to Q4, not I5).
I5 = Q4
Q4 = I5
Outputs may not be on the
right hand side of the
equation.
Q1 = I7 & I8
Q2 = Q1 | I5
Q1 = I7 & I8
Q2 = (I7 & I8) | I5
Equations must be separated
by a carriage return or an
EOL symbol.
Q3 = I7,Q15=I8
Q3 = I7
Q15 = I8
How the Lookup Table Works
The Lookup Table has 8 inputs (I0 - I7) capable of two states each (true, false). Thus, the
outputs have a total number of 256 input combinations. The result of each combination can
be 1 or 0.
When you modify the equations in the Lookup Table, the controller calculates the results of
all 256 input combinations and stores the result of each output as a 256-bit lookup table
(hence the name). There are 18 outputs (Q0 - Q17), so the controller calculates 18 different
lookup tables.
The controller then passes the resulting 18 lookup tables to the IP Engine. Knowing the
value of the 8 inputs, the PLC needs only look up the value of the resulting output (for each
output), rather than calculate it. Thus, the Lookup Table can achieve a propagation delay of
only one system clock cycle (30 ns), regardless of the complexity or number of Boolean
expressions.