Skip to main content

Set Bit (1)

Instruction Parameters​

Supported PLC Series​

XPnA/1RXPnBXPnEXPnFCP3A/B/P/U
CP4A~D/U
CPnECPnFBPPLC-S
✓✓✓✓✓✓✓✓✓

Supported Data Registers​

MXYKLFTCSZRQD@DConstant
D✓-✓✓✓------✓✓--

Supported Flags​

FlagBitSupport
ErrorF11.0-
ZeroF11.1-
CarryF11.2-

Number of Steps​

Steps
1

Operands​

OperandDescription
DThe only operand.
Entries are only BOOL data registers.
This is the bit value to set to 1.

Notice​

Instruction Behavior

The SET instruction behaves as follows:

  • The SET instruction turns ON the assigned BOOL data register, D, when the execution condition turns ON.
  • The SET instruction does NOT turn OFF the assigned BOOL data register, D, when the execution condition turns OFF.
    • To flip this behavior, refer to the RST instruction.

Examples​