EasyManua.ls Logo

Mitsubishi MELSEC iQ-F FX5 series

Mitsubishi MELSEC iQ-F FX5 series
888 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...
7 APPLICATION INSTRUCTION
7.6 Character string operation instruction
375
7
Processing details
These instructions convert the (n) characters (digits) within the hexadecimal code data specified by (s) to ASCII, and store
the converted data in the device specified by (d) and later.
The 16-bit mode and 8-bit mode options are available for the ASCI(P) instructions. For the operation in each mode, refer to
the proceeding pages.
16-bit conversion mode (while SM8161 is OFF)
Each digit of hexadecimal data stored in the device specified by (s) and later is converted into ASCII code, and transferred to the upper 8 bits and lower 8
bits of each device specified by (d) and later. SM8161 must always be off in the 16-bit conversion mode.
In the following program, conversion is executed as follows:
Devices specified by (s) and later
(D100)=0ABCH
(D101)=1234H
(D102)=5678H
Number of specified digits (characters) and conversion result
Bit configuration when (n) is K4
ASCI D100
SM8161
SM400
X10
D200 K4
16-bit mode
(n)
(d)
K1 K2 K3 K4 K5 K6 K7 K8 K9
D200
D200
D201
D201
D202
D202
D203
D203
D204
"C"
"C"
"C"
"C"
"C"
"C"
"C"
"C"
"C"
"B"
"B"
"B"
"B"
"B"
"B"
"B"
"B"
"A"
"A"
"A"
"A"
"A"
"A"
"A"
"0"
"0"
"0"
"0"
"0"
"0"
"4"
"4"
"4"
"4"
"4"
"3"
"3"
"3"
"3"
"2"
"2"
"2" "1"
"1" "8"lowest-order byte
highest-order byte
lowest-order byte
highest-order byte
lowest-order byte
highest-order byte
lowest-order byte
highest-order byte
lowest-order byte
Do not change
D100 = 0ABCH
D200
D201
0
0 0 0 1 0 1 0 1 0 0 01 1 1
1
0ABC
0
1 0 0 0 0 0 1 0 0 0 01 0 0
1
0 1 0 0 0 0 1 1 0 1 1 00 0 0
0
ASCII code
"0" = 30H "1" = 31H "5" = 35H
"A" = 41H "2" = 32H "6" = 36H
"B" = 42H "3" = 33H "7" = 37H
"C" = 43H "4" = 34H "8" = 38H
"A" 41H "0" 30H
"C" 43H "B" 42H

Table of Contents

Related product manuals