2 Instruction Descriptions
2-322
NJ-series Instructions Reference Manual (W502)
The MoveBit instruction moves one bit from the bit position InPos in move source In to the bit position
InOutPos in move destination InOut.
The following example is for when InPos is USINT#3 and InOutPos is USINT#5.
• Return value Out is not used when the instruction is used in ST.
• An error occurs in the following cases. ENO will be FALSE, and InOut will not change.
• The value of InPos is outside of the valid range.
• The value of InOutPos is outside of the valid range.
Function
Precautions for Correct Use
MoveBit(abc, USINT#3, def, USINT#5);
LD ST
abc
def
def
USINT#3
USINT#5
MoveBit
EN ENO
In
InPos
InOut
InOutPos
0 0
InPos=USINT#3
In=abc
InOut=def
InOutPos=USINT#5
0 0 1 0 0 0
0 0
1 0 0 0 0 0
Most-significant bit
Bit 0