Special offers from our partners!
Find Replacement BBQ Parts for 20,308 Models. Repair your BBQ today.
7-185
BINDA(P),DBINDA(P)
1
2
3
4
6
6
7
8
7.11 Character string processing instructions
7.11.1 Conversion from BIN 16-bit or 32-bit to decimal ASCII (BINDA(P),DBINDA(P))
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored into SD0.
• The device specified by exceeds the range of the corresponding device.
(For the Universal model QCPU only.) (Error code: 4101)
Program Example
(1) The following example program uses the PR instruction to output the 16-bit BIN data W0
value by decimal to Y40 to Y48 as ASCII.
[Ladder Mode] [List Mode]
[Operation]
Conducts ASCII output of Y40 to Y48 by using the PR instruction when X0 goes ON.
Because SM701 is OFF, the PR instruction will output ASCII code until 00
H
is encountered.
(2) The following program uses the PR instruction to output the decimal value of the 32-bit BIN
data at W10 and W11 in ASCII code to Y40 to Y48.
[Ladder Mode] [List Mode]
[Operation]
Conducts ASCII output of Y40 to Y48 by using the PR instruction when X0 goes ON.
Because SM701 is OFF, the PR instruction will output ASCII code until 00
H
is encountered.
DD
Step Instruction Device
D1
D2
D3
20
H
(space)20
H
(space)
35
H
(5)31
H
(1)
b15 b8 b7 b0
32
H
(2)36
H
(6)
00
H
D0
5126
W0
BIN value
PR
is output.
Y40 to Y48
Step Instruction Device
D1
D2
D3
2D
H
()20
H
(space)
20
H
(space)20
H
(space)
b15 b8 b7 b0
33
H
(3)38
H
(8)
D0
PR
Y40 to Y48
34
H
(4)32
H
(2)
35
H
(5)36
H
(6)
33
H
(3)00
H
is output.
38
4 2
563
W11
BIN value
W10
D4
D5
- 3842563