4 - 45 4 - 45
MELSEC-Q
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
(1) External numeric inputs to High Performance model QCPU
When inputting numeric values to the High Performance model QCPU from an
external source (such as digital switch), use BCD (binary coded decimal) which
allows the same setting as decimal form.
However, the High Performance model QCPU handles the values as BIN data
since the operation is based on BIN form, if it uses values set in the BCD form as
they are.
Therefore, the High Performance model QCPU operates with numeric values that
are different from the set values.
A BIN instruction is provided to convert the BCD input data to the BIN data
compatible with the High Performance model QCPU.
A program which converts numeric data to BIN data can be created at the
sequence program to allow the settings of numeric values from an external
source without being conscious of the corresponding BIN values.
BINP K4X0 D0
BCD D5 K4Y30
Digital switch
[Numeric data designation]
BCD input
BIN data
High Performance model QCPU
XF
X0
1
2
3
4
Fig.4.11 Digital Switch Data Input to High Performance model QCPU
(2) External numeric outputs from High Performance model QCPU
A digital display can be used to display numeric data which is output from the
High Performance model QCPU.
However, BIN date cannot be displayed at the digital display as it is because the
High Performance model QCPU use it for operation.
Therefore BCD instruction is provided for the High Performance model QCPU to
convert the BIN data to BCD data. A program which converts BIN data to BCD
data can be created in the sequence program in order to display the output data
in the same manner as decimal data.
BINP K4X0 D0
BCD D5 K4Y30
High Performance modle QCPU
Digital display
[Numeric data designation]
Y3F
Y30
BIN data
BCD output
Fig.4.12 Digital Display of Data from High Performance model QCPU