Bit Operation Functions - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

4.2 Bit Operation Functions

The Bit Operation functions perform comparison, logical, and move operations on bit strings.
Function
Mnemonics
Bit Position
BIT_POS_DWORD
BIT_POS_WORD
Bit Sequencer BIT_SEQ
Bit Set, Clear
BIT_SET_DWORD
BIT_SET_WORD
BIT_CLR_DWORD
BIT_CLR_WORD
Bit Test
BIT_TEST_DWORD
BIT_TEST_WORD
Logical AND
AND_DWORD
AND_WORD
Logical NOT
NOT_DWORD
NOT_WORD
Logical OR
OR_DWORD
OR_WORD
Logical XOR
XOR_DWORD
XOR_WORD
Masked
MASK_COMP_DWORD
Compare
MASK_COMP_WORD
Rotate Bits
ROL_DWORD
ROL_WORD
ROR_DWORD
ROR_WORD
Shift Bits
SHIFTL_DWORD
SHIFTL_WORD
SHIFTR_DWORD
SHIFTR_WORD
GFK-2950C
Chapter 4. Ladder Diagram (LD) Programming
Description
Bit Position. Locates a bit set to 1 in a bit string.
Bit Sequencer. Sequences a string of bit values, starting at ST.
Performs a bit sequence shift through an array of bits. The maximum
length allowed is 256 words.
Bit Set. Sets a bit in a bit string to 1.
Bit Clear. Clear a bit within a string by setting that bit to 0.
Bit Test. Tests a bit within a bit string to determine whether that bit is
currently 1 or 0.
Compares the bit strings IN1 and IN2 bit by bit. When a pair of
corresponding bits are both 1, places a 1 in the corresponding
location in output string Q; otherwise, places a 0 in the corresponding
location in Q.
Logical invert. Sets the state of each bit in output bit string Q to the
opposite state of the corresponding bit in bit string IN1.
Compares the bit strings IN1 and IN2 bit by bit. When a pair of
corresponding bits are both 0, places a 0 in the corresponding
location in output string Q; otherwise, places a 1 in the corresponding
location in Q.
Compares the bit strings IN1 and IN2 bit by bit. When a pair of
corresponding bits are different, places a 1 in the corresponding
location in the output bit string Q; when a pair of corresponding bits
are the same, places a 0 in Q.
Masked Compare. Compares the contents of two separate bit strings
with the ability to mask selected bits.
Rotate Left. Rotates all the bits in a string a specified number of
places to the left.
Rotate Right. Rotates all the bits in a string a specified number of
places to the right.
Shift Left. Shifts all the bits in a word or string of words to the left by a
specified number of places.
Shift Right. Shifts all the bits in a word or string of words to the right
by a specified number of places.
February 2018
67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents