Asc, Ascp; Conversion From Hexadecimal Bin To Ascii - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

[Operation]
b15
b8b7
D10
20
(space)
H
D11
2E
(.)
H
D12
33
(3)
H
D13
35
(5)
H
D14
2D
(-)
H
D15
32
(2)
H
D16
00
1 . 2 3 4 5 E
Ignored

7.11.13 ASC, ASCP

Conversion from hexadecimal BIN to ASCII

7.11.13
ASC, ASCP
ASC
ASCP
: Head number of the devices where BIN data to be converted to a character string is stored (BIN 16 bits)
S
: Head number of the devices where the converted character string will be stored (character string)
D
n
: Number of characters to be stored (BIN 16 bits)
Internal Devices
Setting
Data
Bit
––
S
––
D
n
Function
(1) Converts the BIN 16-bit data stored in the area starting from the device designated by
data in hexadecimal representation. Then, stores the converted data into the area starting from the device designated by
, for the number of characters specified by n.
D
b15
b12
b11
b8
b7
S
4th digit 3rd digit 2nd digit 1st digit
S
+1
4th digit 3rd digit 2nd digit 1st digit
4th digit 3rd digit 2nd digit 1st digit
BIN data
b15
b12
b11
b8
b7
S
1
2
H
H
S
+1
5
6
H
H
S
+2
E
F
H
H
S
+3
A
9
H
H
(2) The use of n to set the number of characters causes the BIN data range designated by
storage device range designated by
b0
20
(space)
H
31
(1)
H
D101
32
(2)
H
1 . 2 3 4 5 E -2
34
(4)
H
45
(E)
H
30
(0)
H
-
0
2
Ignored
Command
Command
R, ZR
Word
Bit
b4
b3
b0
D
D
D
D
b4
b3
b0
D
3
4
H
H
D
7
8
H
H
D
D
C
H
H
D
B
6
H
H
D
D
D
D
to be set automatically.
D
D100
High
Basic
performance
ASC
S
ASCP
S
J
\
U
\G
Word
––
––
b15
b8b7
ASCII code for the 2nd digit
ASCII code for the 1st digit
ASCII code for the 4th digit
ASCII code for the 3rd digit
+1
ASCII code for the 2nd digit
ASCII code for the 1st digit
+2
ASCII code for the 4th digit
ASCII code for the 3rd digit
+3
ASCII code for the 2nd digit
ASCII code for the 1st digit
b15
b8b7
33
(3)
34
H
H
+1
31
(1)
32
H
H
+2
37
(7)
38
H
H
+3
35
(5)
36
H
H
+4
44
(D)
43
H
H
+5
46
(F)
45
H
H
+6
42
(B)
36
H
H
+7
00
39
H
H
ASC, ASCP
Process
Redundant Universal
LCPU
n
D
n
D
Constants
Zn
K, H
to ASCII by treating the BIN
S
b0
Number of
characters
designated by n
b0
(4)
(2)
(8)
When "15" is
(6)
set for n
(C)
(E)
(6)
(9)
and the character string
S
1
2
3
4
4
6
7
Other
8
––
––
––
481

Advertisement

Table of Contents
loading

Table of Contents