TTABLE (truth table)

The TTABLE instruction provides the value of the output based on the combination of inputs. If the value is 0xABCD and In3 through In0 corresponds to the number 7, then TTABLE is the value of bit 7 in the table (which is 1). The least significant bit in the table is bit 0.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
TTABLE
TTABLE
TTABLE parameters
Parameter
Parameter Type
Data Type
Description
Table
Input
UINT
Truth table of BOOLEAN function.
IN0
Input
BOOL
Any BOOL input value.
IN1
Input
BOOL
Any BOOL input value.
IN2
Input
BOOL
Any BOOL input value.
IN3
Input
BOOL
Any BOOL input value.
TTABLE
Output
BOOL
The value of the output according to the combination of inputs.

TTABLE input combinations

The TTABLE instruction has four inputs, and therefore 16 combinations. These combinations are found in a truth table; for each combination, the output value can be adjusted. The number of configurable combinations depends on the number of inputs connected to the function.
Truth Table combination example.
Number
In3
In2
In1
In0
1
0
0
0
0
2
0
0
0
1
3
0
0
1
0
4
0
1
0
0
5
0
1
0
1
6
0
1
1
0
7
0
1
1
1
8
1
0
0
0
9
1
0
0
1
10
1
0
1
0
11
1
0
1
1
12
1
1
0
0
13
1
1
0
1
14
1
1
1
0
15
1
1
1
1

TTABLE examples

TTABLE function block diagram example
TTABLE function block diagram example
TTABLE ladder diagram example
TTABLE ladder diagram example
TTABLE structured text example
TTABLE structured text example
Results
Results
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal