3
- 80
3.9 Numeric Values which can be Used in Sequence Programs
3
SEQUENCE PROGRAM CONFIGURATION AND
EXECUTION CONDITIONS
(1) Numeric value input from outside to CPU module
When setting a numeric value from an external digital switch or similar device to the
CPU module, BCD (binary coded decimal) can be used as the same setting in DEC
(decimal) by the method given in (b).
(a) Numeric values handled in CPU module
The CPU module performs operation in BIN (binary).
If the value set in BCD is used as-is, the CPU module recognizes the set value as
a BIN and performs operation.
Hence, operation is performed using the value different from the set value.
(
(b) below)
(b) How to enter numeric value without taking into account BIN notation
Use the BIN instruction to convert the data set in BCD into BIN used in the CPU
module.
Using the BIN instruction allows users to set numeric value data from the outside
without taking into account BIN notation.
Remark
Refer to the following manual for details of the BIN instruction.
QCPU (Q Mode)/QnACPU Programming Manual (Common Instructions)
Figure 3.66 Import of data from digital switch to CPU module
[Numeric data designation]
Digital switch
XF
X0
to
4
3
2
1
CPU module
BCD input
BIN data
BINP K4X0 D0
BCD D5 K4Y30