Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions API 19 Operands: S : Source of data D : Result of conversion Explanations: 1. The content in S (BCD value) is converted into BIN value and stored in D 2. When BIN is used as 16-bit instruction, Z device cannot be adopted; when BIN is used as 32-bit instruction, V device cannot be adopted. 3. The valid range of source S : BCD (0 to 9,999), D BCD (0 to 99,999,999) 4. Constant K and H will automatically be converted into BIN format, therefore BIN instruction do not need to be adopted for constants. 5. Flags: Program Example: When X0 = ON, the BCD value in K1M0 will be converted into BIN value and stored in D10. X0 Points to note:: 1.

When DVP-PM 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 PLC. 2. On the contrary when DVP-PM needs to display a value on a BCD format 7-segment displayer, BCD instruction is required to convert the internal data into BCD value then sent the value to the displayer. 3. When X0 = ON, the BCD value of K4X0 is converted into BIN value and sent to D100. The BIN value of D100 will then be converted into BCD value and sent to K4Y20.

X0 DVP-PM Application Manual 5-35 Mnemonic Operands Function Controllers 20PM 10PM D BIN P Convert BCD to BIN Type OP Bit Devices Word Devices Program Steps X Y M S K H Kn X KnY KnM KnS T C D V Z BIN, BINP: 5 steps DBIN, DBINP: 6 steps S * * * * * * * * * D D * * * * * * * * P D OX O100 Operation error M1793 M1953 BIN K1M0 D10 BIN K4X0 D100 BCD D100 K 4Y20