Conversion From Hexadecimal Ascii To Bin 16-Bit Data, Conversion From Hexadecimal Ascii To Bin 32-Bit Data - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Conversion from hexadecimal ASCII to BIN 16-bit data,
conversion from hexadecimal ASCII to BIN 32-bit data
HABIN(P), DHABIN(P)
Basic
High
Process
performance
HABIN, DHABIN
HABINP, DHABINP
(S): ASCII data to be converted to BIN value or head number of the devices where the ASCII data is stored (character string)
(D): Head number of the devices where the conversion result will be stored (BIN 16/32 bits)
Setting
Internal device
data
Bit
(S)
(D)
Processing details
■HABIN
• Converts hexadecimal ASCII data stored in the area starting from the device number designated by (S) into BIN 16-bit data,
and stores it in the device number designated by (D).
b15
S
ASCII code for the 3rd digit
S
+1
ASCII code for the 1st digit
For example, if the ASCII code of 5A8DH is designated for the area starting from (S), the operation result would be stored at
(D) in the following manner:
b15
S
41
(A)
H
S
+1
44
(D)
H
• The ASCII data designated by (S) to (S)+1 can be in the range of from 0000H to FFFFH.
• The ASCII codes can be in the range of "30H" to "39H" and from "41H" to "46H".
7 APPLICATION INSTRUCTIONS
540
7.11 Character String Processing Instructions
Redundant Universal
LCPU
R, ZR
Word
b8b7
b0
ASCII code for the 4th digit
ASCII code for the 2nd digit
b8
b7
b0
35
(5)
H
38
(8)
H
indicates an instruction symbol of HABIN/DHABIN.
Command
Command
J\
U\G
Bit
Word
b15
D
BIN 16 bits
b15
5A8D
D
H
S
P
S
Zn
Constant
$
b0
b0
D
D
Others

Advertisement

Table of Contents
loading

Table of Contents