Conversion From Ascii To Hexadecimal Bin (Hex(P)) - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

7.11.14

Conversion from ASCII to hexadecimal BIN (HEX(P))

HEX(P)
HEX
HEXP
Setting
Data
S
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
the area starting from the device number designated by
Number of
characters
designated
by n
For example, if the number 9 has been designated by n, the operation would be as follows:
When "9"
is set
for n
(2) When the number of characters is specified for n, the range of characters designated by
as well as the device range designated by
automatically decided.
Command
Command
: 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
R, ZR
Bit
Word
––
––
D
n
b15
b8b7
ASCII code for the 2nd digit
S
ASCII code for the 4nd digit
S
+1
ASCII code for the 2st digit
S
+2
ASCII code for the 4st digit
S
+3
b15
b8b7
S
33
(3)
H
S
+1
31
(1)
H
+2
S
42
(B)
H
S
+3
41
(A)
H
S
+4
38
(8)
H
Code "38
" remains unchanged since the designated number of characters is "9".
H
Basic
HEX
HEXP
J
\
U
\G
Bit
Word
into BIN values and stores them in
S
D
b0
D
ASCII code for the 1th digit
ASCII code for the 3th digit
D
+1
ASCII code for the 1rd digit
ASCII code for the 3rd digit
b0
34
(4)
H
b15
32
(2)
H
36
(6)
D
H
39
(9)
D
+1
H
45
(E)
D
+2
H
in which the BIN data will be stored are
D
HEX(P)
High
Process
Redundant Universal
performance
n
S
D
n
S
D
Constants
Zn
K, H
––
––
.
b15
b12
b11
b8
b7
b4
b3
4th digit
3rd digit
2nd digit
4th digit
3rd digit
2nd digit
BIN data
b12
b11
b8
b7
b4
b3
1
2
3
H
H
H
A
9
B
H
H
H
0
0
0
H
H
H
1
2
LCPU
3
4
6
6
Other
––
7
––
––
8
b0
1st digit
1st digit
b0
4
H
6
H
E
H
S
7-229

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents