Download Local PDF

Transcript
Move/Logical Instructions (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT)
Boolean AND (BAND)
319
The BAND instruction logically ANDs as many as 8 boolean inputs.
To perform a bitwise AND, see page 13-305.
Operands:
Structured Text
IF operandA AND operandB THEN
<statement>;
END_IF;
Use AND or the ampersand sign “&” as an operator within an
expression. The operands must be BOOL values or expressions that
evaluate to BOOL values. This expression evaluates whether
operandA and operandB are both set (true).
See Appendix B for information on the syntax of expressions within
structured text.
Function Block
Operand
Type
Format
Description
BAND tag
FBD_BOOLEAN_AND
structure
BAND structure
FBD_BOOLEAN_AND Structure
Input Parameter
Data Type
Description
EnableIn
BOOL
Enable input. If cleared, the instruction does not execute and outputs are not updated.
Default is set.
In1
BOOL
First boolean input.
Default is set.
In2
BOOL
Second boolean input.
Default is set.
In3
BOOL
Third boolean input.
Default is set.
In4
BOOL
Fourth boolean input.
Default is set.
In5
BOOL
Fifth boolean input.
default is set.
In6
BOOL
Sixth boolean input.
Default is set.
Publication 1756-RM003I-EN-P - January 2007