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

Table of Contents

Advertisement

7.11.14 HEX, HEXP

Conversion from ASCII to hexadecimal BIN

7.11.14
HEX, HEXP
HEX
HEXP
: Head number of the devices where a character string to be converted to BIN data is stored (character string)
S
: Head number of the devices where the converted BIN data will be stored (BIN 16 bits)
D
n
: Number of characters to be stored (BIN 16 bits)
Internal Devices
Setting
Data
Bit
––
S
––
D
n
Function
(1) Converts the number of characters of hexadecimal ASCII data designated by n stored in the area starting from the
device number designated by
by
.
D
b15
ASCII code for the 2nd digit
S
ASCII code for the 4nd digit
S
+1
Number of
ASCII code for the 2st digit
S
+2
characters
designated
ASCII code for the 4st digit
S
+3
by n
For example, if the number 9 has been designated by n, the operation would be as follows:
b15
S
33
(3)
H
+1
S
31
(1)
When "9"
H
is set
+2
S
42
(B)
H
for n
S
+3
41
(A)
H
S
+4
38
(8)
H
Code "38
" remains unchanged since the designated number of characters is "9".
H
(2) When the number of characters is specified for n, the range of characters designated by
designated by
in which the BIN data will be stored are automatically decided.
D
(3) Accurate processing will be conducted even in cases where the range of devices where the ASCII code to be converted
is being stored overlaps with the range of devices that will store the converted BIN data.
b15
b8b7
D10
32
(2)
H
D11
34
(4)
H
D12
36
(6)
H
D13
38
(8)
H
D14
41
(A)
H
Command
Command
R, ZR
Word
Bit
into BIN values and stores them in the area starting from the device number designated
S
b8b7
b0
ASCII code for the 1th digit
ASCII code for the 3th digit
ASCII code for the 1rd digit
ASCII code for the 3rd digit
b8b7
b0
34
(4)
H
32
(2)
H
36
(6)
H
39
(9)
H
45
(E)
H
b0
31
(1)
D11
H
33
(3)
D12
H
35
(5)
D13
H
37
(7)
H
39
(9)
H
High
Basic
performance
HEX
S
HEXP
S
J
\
U
\G
Word
––
––
b15
b12
b11
b8
b7
D
4th digit
3rd digit
D
+1
4th digit
3rd digit
BIN data
b15
b12
b11
b8
b7
D
1
2
H
H
D
+1
A
9
H
H
+2
D
0
0
H
H
b15
b12
b11
b8
b7
b4
b3
4
3
2
H
H
H
8
7
6
H
H
H
A
0
0
H
H
H
HEX, HEXP
Process
Redundant Universal
LCPU
n
D
n
D
Constants
Zn
Other
K, H
b4
b3
b0
2nd digit
1st digit
2nd digit
1st digit
b4
b3
b0
3
4
H
H
B
6
H
H
0
E
H
H
as well as the device range
S
b0
1
H
5
H
9
H
1
2
3
4
––
––
––
4
6
7
8
483

Advertisement

Table of Contents
loading

Table of Contents