EasyManua.ls Logo

Delta DVP-PM Series - Page 171

Delta DVP-PM Series
561 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5 Categories and Use of Basic Application Instructions
DVP-PM Operation Instruction
5-34
API Mnemonic Operands Function
18
D BCD P
Convert BIN to BCD
Controllers
20PM 10PM
Bit Devices Word Devices Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T C D V Z
S
* * * * * * ***
D
* * * * * ***
BCD, BCDP: 5 steps
DBCD, DBCDP: 6 steps
Operands:
S: Source of data D: Conversion result
Explanations:
1. The content in S (BIN value) is converted into BCD value and stored in D
2. When BCD is used as 16-bit instruction, Z device cannot be adopted; when BCD is used as 32-bit instruction, V
device cannot be adopted.
3. If the conversion result exceeds the range of 0 ~ 9,999, BCD will not be executed. If the conversion result
exceeds the range of 0 ~ 99,999,999, DBCD will not be executed.
4. BCD instruction converts the BIN data in the positioning unit into BCD data for displaying data on external
device (e.g., 7-segment display).
5. Flags:
OX O100
Operation error M1793 M1953
Program Example:
1. When X0 = ON, the binary value of D10 will be converted into BCD value, and the 1s digit of the conversion
result will be stored in K1Y0 (Y0 ~ Y3, the 4 bit devices).
X0
BCD D10 K1Y0
2. If D10=001E (Hex) = 0030 (decimal), the result will be Y0~Y3 = 0000(BIN).

Table of Contents

Related product manuals