340
6 BASIC INSTRUCTIONS
6.4 Bit Processing Instructions
6.4 Bit Processing Instructions
Setting a bit in the word device
BSET(P)
These instructions set the 'n'th bit in the specified word device to 1.
■Execution condition
■Description, range, data type
■Applicable devices
Ladder ST
ENO:=BSET(EN,n,d);
ENO:=BSETP(EN,n,d);
FBD/LD
Instruction Execution condition
BSET
BSETP
Operand Description Range Data type Data type (label)
(d) Set target device 16-bit signed binary ANY16
(n) Set target bit position 0 to 15 16-bit unsigned binary ANY16
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(d)
(n)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)