Download Q-series basic Course(for GX Developer)

Transcript
A: SCHOOL
QB-13
MAIN
Path name
Project name
Program name
BCD (P) BIN BCD data conversion instruction
X7
K50
T0
0
T0
K1500
T0
C10
S
D
BCD
T0
K2Y40
BCD
C10
K4Y50
X6
37
• When the input condition is activated, data in the device designated as S is
automatically judged as a BIN code, and converted into BCD to be transferred to the
device designated as D .
163848192 4096 2048 1024 512 256 128
0
BIN 9999
S
0
1
0
0
1
1
1
0
Must be set to "0"
1
0
0
1
1
Thousand digits
32
16
8
4
2
1
0
0
0
1
1
1
1
BCD conversion
8000 4000 2000 1000 800 400 200 100
BCD 9999
D
64
0
0
1
80
40
20
10
8
4
2
1
1
0
0
1
1
0
0
1
Hundred digits
Ten digits
Unit digits
• As the ordinary digital displays display numbers using BCD code, the BCD instruction
128
64
32
16
8
4
2
1
0
1
0
1
1
1
1
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
0
1
1
Y5B
Y5A
Y57
Y56
Y53
Y52
8
4
2
8
4
1
8
4
2
8
Y50
256
0
Y51
512
1
Y54
1024
0
Y55
2048
0
Y58
4096
0
Y59
8192
0
Y5C
16384
0
Y5D
+
1024
128
32
16
8
4
1
1213
Y5E
can be used to display data of the PLC (current timer and counter values, operation
results).
Y5F
5.2.3
C10
(BIN)
(BCD)
K4Y50
4
Digital display
5 - 18