Delta Electronics Extension Digital I/O Module DOP-EXIO14RAE User Manual
Page 108

Appendix D Use of Application Instructions|DOP-EXIO Series
Revision March, 2008, Doc. Name: 2007PDD23000014
D-27
Mnemonic
Operands Function
BIN
D
S
D
Binary
Bit Devices
Word Devices
X Y M S K H
KnX
KnY
KnM KnS
T
C
D
E
F
S
D
y
Note:
1. If S and D are used in device F, only 16-bit instruction is applicable.
16-bit instruction (5 Steps)
BIN
Continuous
execution
32-bit instruction (9 Steps)
DBIN
Continuous
execution
y
Flags: M1067 (Calculation error)
M1068 (Calculation error locked)
Operands:
S
: Source of data
D
: Conversion result
Explanations:
1. The
content
in
S
(BCD value) is converted into BIN value and stored in D.
2. Valid
range
of
S
: BCD (0 ~ 9,999), DBCD (0 ~ 99,999,999)
3. Provided the content in S is not a BCD value (in hex and any one of its digits does not fall in the
range of 0 ~ 9), an operation error will occur, and M1067 and M1068 will be On.
4. Constant K and H will automatically be converted into BIN format. Thus, they do not need to adopt
this instruction.
Program Example:
When X0 = On, the BCD value of K1M0 will be converted to BIN value and stored in D10.
X0
BIN
D10
K1M0
Remarks:
Explanations on BCD and BIN instructions:
1. When DOP-EXIO series needs to read an external DIP switch in BCD format, BIN instruction has
to be first adopted to convert the read data into BIN value and store the data in DOP-EXIO series.
2. When DOP-EXIO series needs to display its stored data by a 7-segment display in BCD format,
BCD instruction has to be first adopted to convert the data into BCD value and send the data to
the 7-segment display.
3. When X0 = On, the BCD value of K4X0 is converted into BIN value and sent it to D100. The BIN
value of D100 will then be converted into BCD value and sent to K4Y20.