Bit Operation Functions Bit Set And Bit Clear - GE VersaMax PLC User Manual

Table of Contents

Advertisement

Input/ Output
enable
IN
BIT
Q
Instruction Set Reference
For public disclosure
10.1.8.1 Parameters of the Bit Test Function
Choices
flow
I, Q, M, T, S, G, R, AI, AQ
I, Q, M, T, G, R, AI, AQ,
constant
flow, none
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.
%I0001
BIT_
TEST_
WORD
IN
Q
PRD_CDE
PICKBIT
BIT

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.
Enable
First word
Bit number of IN
Description
When the function is enabled, the bit test is
performed.
IN contains the first word of the data to be
operated on.
BIT contains the bit number of IN that should be
tested.
Valid range is (1 < BIT < (16 * length)).
Output Q is energized if the bit tested was a 1.
BIT_
OK
SET_
WORD
IN
BIT
Y
%Q0001
( )
GFK-1503E User Manual 131

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents