Bit Set, Bit Clear - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

4.2.4

Bit Set, Bit Clear

The Bit Set (BIT_SET_DWORD and BIT_SET_WORD) function sets a bit in a bit string to 1. The Bit
Clear (BIT_CLR_DWORD and BIT_CLR_WORD) function clears a bit in a string by setting the bit to 0.
Each scan that power is received; the function sets or clears the specified bit. If a variable rather than
a constant is used to specify the bit number, the same function can set or clear different bits on
successive scans. Only one bit is set or cleared, and the transition information for that bit is updated.
The transition status of all the other bits in the bit string is not affected.
The function passes power flow to the right, unless the value for BIT is outside the specified range.
Operands for Bit Set, Bit Clear
Parameter Description
Length (??) The number of WORDs or DWORDs in the
bit string. 1  Length  256.
IN
The first WORD or DWORD of the data to
process
BIT
The number of the bit to set or clear in IN.
1  BIT  (16 × Length) for WORD.
1  BIT  (32 × length) for DWORD
Example 1
Whenever input V_I0001 is set, bit 12 of the string beginning at reference
%R00040 (as specified by variable V_R0040) is set to 1.
Example 2
Whenever V_I00001 is set, %M00043, the third bit of the string beginning at
%M00041, is set to 1. Note that neither the status nor the transition value of any
of the other bits in the same byte as %M00043 (e.g., %M00041, %M00042,
%M00044, etc.) is affected by the BIT_SET function
GFK-2950C
Chapter 4. Ladder Diagram (LD) Programming
Mnemonics
BIT_SET_DWORD
BIT_SET_WORD
BIT_CLR_DWORD
BIT_CLR_WORD
Allowed Operands
Constants
All except constants, flow, and variables
located in %S
All except variables located in %S - %SC
February 2018
Optional
No
No
No
73

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents