6 - 74 6 - 74
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
High Performance
QnA Q4AR
Basic
QCPU
PLC CPU
Process CPU
6.3.11 Conversion from block BIN 16-bit data to BCD 4-digit data
(BKBCD, BKBCDP)
Usable Devices
Internal Devices
(System, User)
MELSECNET/10(H)
Direct J
\
Set
Data
Bit Word
File
Register
Bit Word
Special
Function
Module
U
\G
Index
Register
Zn
Constant
K, H
Other
S
D
n
[Instruction Symbol] [Execution Condition]
Command
Command
BKBCDP
BKBCD
n
n
S
D
S D
BKBCDP
BKBCD
[Set Data]
Set Data Meaning Data Type
S
Head number of device storing BIN data
D
Head number of device which will store BCD data after conversion
n
Number of data blocks converted
BIN 16 bits
[Functions]
(1) Converts BIN data (0 to 9999) n-points from device designated by
S
to BCD, and stores result
following the device designated by
D
.
+(n-2)
BCD conversion
0
BIN 1234
0 0 0 0 1 0 0 1 1 0 100 1 0
0
BIN 5678
0 0 1 0 1 1 0 0 0 1 011 1 0
0
BIN 1545
0 0 0 0 1 1 0 0 0 0 010 0 1
+1
n
These should be set to 0
0
BIN 4321
0 0 1 0 0 0 0 1 1 1 000 0 1
0
BIN 5555
0 0 1 0 1 0 1 1 0 1 100 1 1
+(n-1)
+2
0BCD 1234 0 0 1 0 0 1 0 0 0 1 101 0 0
0
BCD 5678
1 0 1 0 1 1 0 0 1 1 110 0 0
0
BCD 1545
0 0 1 0 1 0 1 0 1 0 001 0 1
0
BCD 4321
1 0 0 0 0 1 1 0 0 1 000 0 1
0
BCD 5555
1 0 1 0 1 0 1 0 1 0 101 0 1
S
D
S
S
S
S
+1
+(n-1)
+2
+(n-2)
D
D
D
D
n
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
2000
1000
800
400
200
100
80
40
20
10
8
4
2
1
4000
8000
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com