AND ANDN &
Inputs
|
Input |
Data Type |
Range |
Unit |
Default |
Description |
|---|---|---|---|---|---|
| IN1 | BOOL | First Boolean input. | |||
| IN2 | BOOL | Second Boolean input. |
Outputs
|
Output |
Data Type |
Range |
Unit |
Description |
|---|---|---|---|---|
|
Q |
BOOL |
|
|
Boolean AND of all inputs. |
Truth Table
|
IN1 |
IN2 |
Q |
|---|---|---|
|
0 |
0 |
0 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
1 |
Remarks
- In the FBD
"Function block diagram"
A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks and FFLD languages, the block is called &.- To select the number, right-click on the block and choose the Set number of inputs command in the contextual menu.
- In ST
"Structured text"
A high-level language that is block structured and syntactically resembles Pascal and IL
"Instruction list"
This is a low-level language and resembles assembly languages, &can be used instead of AND.
FBD Language
- In the FBD language, the block can have a maximum of 32 inputs.
FFLD Language
- In the FFLD language, the block can have a maximum of 32 inputs.
IL Language
- In the IL language, the AND instruction performs a logical AND between
the current result and the operand.
- The current result must be Boolean.
Op1: FFLD IN1
& IN2 (* "&" or "AND" can be used *)
ST Q (* Q is equal to: IN1 AND IN2 *)
Op2: FFLD IN1
AND IN2
&N IN3 (* "&N" or "ANDN" can be used *)
ST Q (* Q is equal to: IN1 AND IN2 AND (NOT IN3) *)
ST Language
Q := IN1 AND IN2;
Q := IN1 & IN2 & IN3;
See Also





