Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 447

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Number of specified digits (characters) and conversion result
(n)
K1
(d)
D200
lowest-order byte
"C"
D200
highest-order byte
D201
lowest-order byte
D201
highest-order byte
D202
lowest-order byte
D202
highest-order byte
D203
lowest-order byte
D203
highest-order byte
D204
lowest-order byte
(1): Do not change
Bit configuration when (n) is K4
D100 = 0ABCH
0
0
0
0
1
0
1
0
A
D200
0
1
0
0
0
0
0
"A"  41H
D201
0
1
0
0
0
0
1
"C"  43H
• 8-bit conversion mode (while SM8161 is ON)
Each digit of hexadecimal data stored in the device specified by (s) and later is converted into ASCII code, and transferred to the lower 8 bits of each
device specified by (d) and later. SM8161 must always be on in the 8-bit conversion mode.
In the following program, conversion is executed as follows:
SM400
X10
ASCI
D100
(1): 8-bit mode
When SM8161 is set to on, the 8-bit mode is selected.
The conversion processing is executed as follows.
16 bits
0
Low-order 8 bits
Destination
K2
K3
K4
"B"
"A"
"0"
"C"
"B"
"A"
"C"
"B"
"C"
(1)
0
1
0
1
1
1
1
0
B
C
1
0
0
1
1
0
0
0
"0"  30H
1
0
1
0
0
0
0
1
"B"  42H
SM8161
D200
K4
K5
K6
K7
"4"
"3"
"2"
"0"
"4"
"3"
"A"
"0"
"4"
"B"
"A"
"0"
"C"
"B"
"A"
"C"
"B"
"C"
ASCII code
0
"0" = 30H
"1" = 31H
"A" = 41H
"2" = 32H
0
"B" = 42H
"3" = 33H
"C" = 43H
"4" = 34H
0
Devices specified by (s) and later
(1)
(D100)=0ABCH
(D101)=1234H
(D102)=5678H
8 APPLICATION INSTRUCTION
8.8 Character String Operation Instruction
K8
K9
"1"
"8"
"2"
"1"
"3"
"2"
"4"
"3"
"0"
"4"
"A"
"0"
"B"
"A"
"C"
"B"
"C"
"5" = 35H
"6" = 36H
"7" = 37H
"8" = 38H
8
445

Hide quick links:

Advertisement

loading