6-76
BIN(P),DBIN(P)
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored into SD0.
• When values other than 0 to 9 are designated to any digits of
(Error code: 4100)
When the QCPU is used, the error above can be suppressed by turning ON SM722.
However, the instruction is not executed regardless of whether SM722 is turned ON or OFF
if the designated value is out of the available range.
For the BINP/DBINP instruction, the next operation will not be performed until the command
(execution condition) is turned from OFF to ON regardless of the presence/absence of an
error.
Program Example
(1) The following program converts the BCD data at X10 to X1B to BIN when X8 is ON, and stores it
at D8.
[Ladder Mode] [List Mode]
S
Programmable Controller input module
Input
power supply
BCD digital switch
COM
1
2
4
8
10
20
40
80
COM
100
200
400
800
0
1
0
0
1
1
0
0
0
1
1
0
COM
COM
X1F
X1E
X1D
X1C
X1B
X1A
X19
X18
X17
X16
X15
X14
X13
X12
X11
X10
Can be used
in other purposes.
Step
Instruction
Device