7-188
7.11 String Processing Instructions
7.11.9 16-/32-bit BIN data to character string data conversion
STR, DSTR
(2) In the following program, the 32-bit BIN data stored in Var_D10 are converted to character
string data in accordance with the digit specification of D0 and D1 when X0 turns ON, and
stores the result to Var_D20. (Var_D0 is declared as a global variable assigned with D0 and
D1.)
[Structured ladder]
[ST]
IF X0 THEN
DMOVP(TRUE,12345678,Var_D10);
MOVP(TRUE,12,D0);
MOVP(TRUE,9,D1);
DSTRP(TRUE,Var_D0,Var_D10,Var_D20);
END_IF;
[Operation]
20
H
(
space
)
30
H
(0)
2E
H
(.)
30
H
(0)
b15
b8 b7
b0
31
H
(1)
32
H
(2)
00
H
12345678
Var
_
D
10
12
9
D
0
D
1
33
H
(3)
34
H
(4)
35
H
(5)
36
H
(6)
37
H
(7)
38
H
(8)
D
11
D
10
" 0.012345678"
Var
_
D
20[1]
Var
_
D
20[2]
Var
_
D
20[0]
Var
_
D
20[3]
Var
_
D
20[4]
Var
_
D
20[5]
Var
_
D
20[6]
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......