10.1.8.1
Parameters of the Bit Test Function
Input/ Output
Choices
Description
enable
flow
When the function is enabled, the bit test is
performed.
IN
I, Q, M, T, S, 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
tested.
Valid range is (1 < BIT < (16 * length)).
Q
flow, none
Output Q is energized if the bit tested was a 1.
10.1.8.2
Example
In the example, whenever input %I0001 is set, the bit at the location contained in
reference PICKBIT is tested. The bit is part of string PRD_CDE. If it is 1, output Q
passes power flow and the coil %Q0001 is turned on.
PRD_CDE
BIT_
TEST_
WORD
IN
%Q0001
( )
Q
PICKBIT
BIT
%I0001
10.1.9
Bit Operation Functions Bit Set and Bit Clear
The Bit Set function sets a bit in a bit string to 1. The Bit Clear function sets a bit in a
string to 0.
Each sweep that power is received, the function sets the specified bit. If a variable
(register) rather than a constant is used to specify the bit number, the same function block
can set different bits on successive sweeps.
A string length of 1 to 256 words can be selected. The function passes power flow to the
right, unless the value for BIT is outside the range (1 < BIT < (16 * length) ). Then, OK is
set OFF.
Bit number of IN
OK
Enable
BIT_
SET_
WORD
BIT
Y
First word
IN
Instruction Set Reference
GFK-1503E User Manual 131
For public disclosure
Summary of Contents for VersaMax PLC
Page 16: ...Notes 16 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 38: ...Notes 38 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 50: ...Notes 50 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 92: ...Notes 92 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 112: ...Notes 112 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 224: ...Notes 224 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 292: ...Notes 292 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 316: ...Notes 316 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 317: ......