554
7 APPLICATION INSTRUCTION
7.17 Data operation instruction
Bit judgment of 32-bit data
DBON(P)
These instructions check whether (n) bit(s) of binary 32-bit data of the device specified by (s) are on or off, and output the
result to the device specified by (d).
■Descriptions, ranges, and data types
■Applicable devices
*1 T, ST, C cannot be used.
• These instructions check whether (n) bit(s) of binary 32-bit data of the device specified by (s) are on or off, and output the
result to the device specified by (d).
• When the result above is on, these instructions turn (d) on. When the result above is off, these instructions turn (d) off.
• When a constant (K) is specified in the device specified by (s), it is automatically converted into binary.
Ladder diagram Structured text
ENO:=DBON(EN,s,n,d);
ENO:=DBONP(EN,s,n,d);
Operand Description Range Data type Data type (label)
(s) Word device number storing the data 32-bit signed binary ANY32
(d) Bit device number to be driven Bit Bit
(n) Bit position to be checked 0 to 31 16-bit signed binary ANY16
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s)
(d)
*1
(n)
Error code
(SD0/SD8067)
Description
3405 The value specified by (n) is outside the following range.
0 to 31
(n)
0
1
b0b1b2b3b4b5b6b7b8b9b10b11b12b13b14b15
0 1 0 0 1 1 1 11 0 1 0 10 00
K4K5K6K7
K0K1K2K3K8K9K10K11K12K13K14K15
b16b17…b29b30b31
0 1 … 1 11
…K29K30
K16K17K31
(n)=29
(n)=5
(OFF)
(ON)
(s)+1, (s)
(d)
Bit device