EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Conversion from ASCII to Hexadecimal bin

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
574
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
Conversion from ASCII to hexadecimal BIN
HEX(P)
Processing details
Converts the number of characters of hexadecimal ASCII data designated by n stored in the area starting from the device
number designated by (S) into BIN values and stores them in the area starting from the device number designated by (D).
For example, if the number 9 has been designated by n, the operation would be as follows:
(S): Head number of the devices where a character string to be converted to BIN data is stored (character string)
(D): Head number of the devices where the converted BIN data will be stored (BIN 16 bits)
n: Number of characters to be stored (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S) 
(D) 
n 
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
HEX
HEXP
n
n
S D
S D
HEX
HEXP
b15 b8 b7 b0
b15 b12 b8b11
b7
b4 b0b3
(S)
(S)+1
(S)+2
(S)+3
(D)
(D)+1
·
BIN data
ASCII code for the 1st digitASCII code for the 2nd digit
ASCII code for the 3rd digitASCII code for the 4th digit
ASCII code for the 1st digitASCII code for the 2nd digit
ASCII code for the 3rd digitASCII code for the 4th digit
4th digit 3rd digit 2nd digit 1st digit
4th digit 3rd digit 2nd digit 1st digit
Number of
characters
designated
by n
34H (4)33H (3)
32H (2)31H (1)
36H (6)42H (B)
39H (9)41H (A)
38H (8) 45H (E)
0H
0H
EH
AH 9H
BH
6H
1H 2H 3H 4H
0H
(S)
(S)+1
(S)+2
(S)+3
(S)+4
(D)
(D)+1
(D)+2
b15 b12 b8b11 b7 b4 b0b3
b15 b8 b7 b0
When "9"
is set
for n
Code "38H" remains unchanged since the designated number of characters is "9".

Table of Contents

Related product manuals