10.1.9.1 Parameters of the Bit Set and Bit Clear Functions
Input/ Output
Choices
Description
enable flow
When the function is enabled, the bit operation is
performed.
IN
I, Q, M, T, SA, SB, SC,
G, R, AI, AQ
IN contains the first word of the data to be
operated on.
BIT
I, Q, M, T, G, R, AI, AQ,
constant
BIT contains the bit number of IN that should be
set or cleared.
Valid range is (1 < BIT < (16 * length) ).
ok
flow, none
The OK output is energized whenever the bit
input is valid and enable is energized.
10.1.9.2 Example
In the example, whenever input %I0001 is set, bit 12 of the string beginning at reference
%R0040 is set to 1.
10.1.10 Bit Operation Functions Masked Compare
The Masked Compare function compares the contents of two separate bit strings. It
provides the ability to mask selected bits. Input string 1 might contain the states of
outputs such as solenoids or motor starters. Input string 2 might contain their input state
feedback, such as limit switches or contacts.
Input 1
Bit number of last compare
Enable
MASK_
COMP_
WORD
I1 MC
Input 2
Q I2
Output
Miscompare
BN
Bit number
When the function receives power flow, it begins comparing the bits in the first string
with the corresponding bits in the second string. Comparison continues until a
miscompare is found or until the end of the string is reached.
132 GFK-1503E VersaMax PLC User Manual
For public disclosure