Mitsubishi MELSEC-Q/L Programming Manual page 470

Table of Contents

Advertisement

STR, STRP, DSTR, DSTRP
Program Example
(1) The following program converts the BIN 16-bit data stored at D10 when X0 is turned ON in accordance with the digit
designation of D0 and D1, and stores the result from D20 to D23.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operation]
D10
12672
D20
D21
D0
7
D22
D1
1
D23
(2) The following program converts the BIN 32-bit data stored at D10 and D11 when X0 is turned ON in accordance with the
digit designation of D0 and D1, and stores the result at from D20 to D26.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operation]
D11
D10
D10
12345678
D0
12
D1
9
468
Device
b15
b8b7
31
(1)
20
(space)
H
H
36
(6)
32
(2)
H
H
2E
(.)
37
(7)
H
H
(2)
00
32
H
H
Sets the data.
Sets the total number of digits.
Sets the number of digits in decimal fraction.
Device
b15
b8b7
D20
30
(0)
20
H
D21
30
(0)
H
D22
32
(2)
H
D23
34
(4)
H
D24
36
(6)
H
D25
38
(8)
H
D26
00
H
Sets the data.
Sets the total number of digits.
Sets the number of digits in decimal fraction.
b0
1267.2
b0
(space)
H
2E
(.)
H
0.012345678
31
(1)
H
33
(3)
H
35
(5)
H
37
(7)
H

Advertisement

Table of Contents
loading

Table of Contents