Mitsubishi Electric MELSEC FX3U Programming Manual page 483

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
3. 8-bit conversion mode (while M8161 is ON)
(M8161 is used also for the RS, HEX, CCD and CRC instructions.)
Each digit of hexadecimal data stored in
low-order 8 bits of each device
specified by "n". "0" is stored in high-order 8 bits of each device
M8161 is used also for the RS, HEX, CCD and CRC instructions. When using the 8-bit mode, set M8161 to
normally ON. 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
S
D100 = 0ABCH
D101 = 1234H
D102 = 5678H
Number of specified digits (characters) and conversion result
n
K1
D
D 200
[C]
D 201
D 202
D 203
D 204
D 205
D 206
Does not change
D 207
D 208
Bit configuration in the case of "n = K2"
D 100 = 0ABCH
0
0
0
0
1
0
D200 = B → ASCII code = 42H
0
0
0
0
0
D201 = C → ASCII code = 43H
0
0
0
0
0
• 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.
S
and later. The number of digits (characters) to be converted is
D
M8161
S
D
n
M8161
D100
D200
K4
K2
K3
K4
K5
[B]
[A]
[0]
[4]
[C]
[B]
[A]
[0]
[C]
[B]
[A]
[C]
[B]
[C]
0
1
0
1
0
1
1
1
A
B
0
0
0
0
1
0
0
0
4
0
0
0
0
1
0
0
0
4
16 External FX Device – FNC 80 to FNC 89
16.3 FNC 82 – ASCI / Hexadecimal to ASCII Conversion
and later is converted into an ASCII code, and transferred to
and later.
D
When M8161 is set to ON, the 8-bit mode
is selected. The conversion processing is
8-bit mode
executed as follows
0
Destination
8-bit mode
K6
K7
K8
K9
[3]
[2]
[1]
[8]
[4]
[3]
[2]
[1]
[0]
[4]
[3]
[2]
[A]
[0]
[4]
[3]
[B]
[A]
[0]
[4]
[C]
[B]
[A]
[0]
[C]
[B]
[A]
[C]
[B]
[C]
1
0
0
ASCII codes
[0] = 30H [1] = 31H [5] = 35H
C
[A] = 41H [2] = 32H [6] = 36H
[B] = 42H [3] = 33H [7] = 37H
[C] = 43H [4] = 34H [8] = 38H
0
1
0
2
0
1
1
3
16 bits
Low-order 8 bits
481
11
12
13
14
15
16
17
18
19
20

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents