Mitsubishi Electric FX3G SERIES Programming Manual page 464

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
2. 16-bit conversion mode (while M8161 is OFF) (M8161 is also used for the RS, HEX, CCD and CRC
instructions.)
Each digit of hexadecimal data stored in
order 8 bits and low-order 8 bits of each device
specified by "n".
Each ASCII code is stored in either the high-order 8 bits or low-order 8 bits of each device
M8161 is used also for RS, HEX, CCD and CRC instructions. When using the 16-bit mode, set M8161 to normally
OFF. M8161 is cleared when the PLC mode is changed from RUN to STOP.
M8000
Command
input
FNC 82
ASCI
Operation
In the following program, conversion is executed as follows:
M8000
X010
FNC 82
ASCI
Devices after
D100 = 0ABCH
D101 = 1234H
D102 = 5678H
Number of specified digits (characters) and conversion result
n
D
Low-order 8 bits of D200
High-order 8 bits of D200
Low-order 8 bits of D201
High-order 8 bits of D201
Low-order 8 bits of D202
High-order 8 bits of D202
Low-order 8 bits of D203
High-order 8 bits of D203
Low-order 8 bits of D204
Bit configuration in the case of "n = K4"
D 100 = 0ABCH
0
0
0
0
0
D 200
0
1
0
0
[A] → 41H
D 201
0
1
0
0
[C] → 43H
• When outputting data in the BCD format for a printer, for example, it is necessary to convert binary data into BCD
data before executing this instruction.
462
M8161
S
D
M8161
D100
D200
S
K1
K2
[C]
[B]
[C]
Does not change
1
0
1
0
1
0
1
A
B
0
0
0
1
0
0
1
[0] → 30H
0
0
1
1
0
1
0
[B] → 42H
16.3 FNC 82 – ASCI / Hexadecimal to ASCII Conversion
S
and later is converted into ASCII code, and transferred to the high-
and later. The number of digits (characters) to be converted is
D
16-bit mode
n
16-bit mode
K4
K3
K4
K5
K6
[A]
[0]
[4]
[3]
[B]
[A]
[0]
[4]
[C]
[B]
[A]
[0]
[C]
[B]
[A]
[C]
[B]
[C]
ASCII code
1
1
1
0
0
C
[0] = 30H [1] = 31H [5] = 35H
[A] = 41H [2] = 32H [6] = 36H
[B] = 42H [3] = 33H [7] = 37H
1
0
0
0
0
[C] = 43H [4] = 34H [8] = 38H
0
0
0
1
0
16 External FX Device – FNC 80 to FNC 89
and later.
D
K7
K8
K9
[2]
[1]
[8]
[3]
[2]
[1]
[4]
[3]
[2]
[0]
[4]
[3]
[A]
[0]
[4]
[B]
[A]
[0]
[C]
[B]
[A]
[C]
[B]
[C]

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents