Mitsubishi Electric Q01UCPU User Manual page 489

Hide thumbs Also See for Q01UCPU:
Table of Contents

Advertisement

(1) Inputting numeric values externally to the CPU module
When setting a numeric value to the CPU module externally using a digital switch, BCD (binary-coded decimal)
can be used as DEC (decimal) by the method given below.
(a) Numeric values used inside the CPU module
The CPU module performs program operations in binary.
If the value set in binary-coded decimal is used without conversion, the CPU module performs program
operations regarding the set value as binary.
Therefore, the program operations are not performed correctly.
(b) Using any numeric data regardless of the data type
To convert the data set in binary-coded decimal into binary, which can be used in the CPU module, use the BIN
instruction.
The BIN instruction allows the CPU module to use any external numeric data regardless of the data type.
For details of the BIN instruction, refer to the following.
MELSEC-Q/L Programming Manual (Common Instruction)
[Setting numeric data]
Digital switch
4
3
XF
to
(2) Outputting numeric values externally from the CPU module
When externally displaying numeric values operated in the CPU module, a digital indicator can be used.
(a) Outputting numeric values
The CPU module performs program operations in binary.
If the binary values used in the CPU module are output to a digital indicator, the indicator does not show the
values correctly.
To convert the data set in binary into binary-coded decimal, which can be used in the external indicator, use the
BCD instruction.
The BCD instruction allows the external indicator to display values in decimal.
For details of the BCD instruction, refer to the following.
MELSEC-Q/L Programming Manual (Common Instruction)
CPU module
CPU module
2
1
Input data in BCD.
X0
BINP K4X0 D0
BCD D5 K4Y30
BINP K4X0 D0
BIN data
BCD D5 K4Y30
[Setting numeric data]
Digital indicator
Y3F
to
Y30
Output data
in BCD.
BIN data
APPENDICES
A
487

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents