Asci (Fnc 82) - Mitsubishi FX1S Series Programming Manual

Melsec-f
Hide thumbs Also See for FX1S Series:
Table of Contents

Advertisement

FX Series Programmable Controlers
5.9.3

ASCI (FNC 82)

Mnemonic
ASCI
FNC 82
(Converts
HEX to
ASCII)
16 BIT OPERATION
Points to note:
Please note that data is converted 'as read', i.e. using the example above with the following
data in (D9,D8) ABCD
(in this case n= 6) and converting them to ASCI will store values in 6 consecutive bytes from
D20, i.e. D20 = (67, 68), D21 = (69, 70) and D22 = (50, 54) respectively. In true characters
symbols that would be read as CDEF26.
This can be shown graphically as in the table
to the right. Please take special note that the
source data (S) read from the most significant
device to the least significant. While the
destination data (D) is read in the opposite
direction.
The ASCI instruction can be used with the
M8161, 8 bit/16bit mode flag. The effect of this
flag is exactly the same as that detailed on
page 10-20. The example to the right shows
the effect when M8161 is OFF.
If M8161 was set ON, then only the lower
destination byte (b0-7) would be used to store data and hence 6 data registers would be
required (D20 through D25).
ASCII Character Codes
The table below identifies the usable hexadecimal digits and their associated ASCII codes
HEX
Character
HEX 30
ASCII
Code
DEC 48
Character
Symbol
Function
Converts a data
K, H, KnX,
value from
KnY,
hexadecimal to
KnM, KnS
ASCII
T, C, D, V, Z
32 BIT OPERATION
,EF26
. Taking the first n hexadecimal characters (digits) from the right
H
H
0
1
2
3
4
31
32
33
34
49
50
51
52
'0'
'1'
'2'
'3'
'4'
Operands
S
D
KnY, KnM,
KnS
T, C, D
PULSE-P
Operation:
Th is i ns tru c tio n re a d s n h e xa d ec im a l da ta
characters from head source address (S) and
converts them in to the equivalent ASCII code.
This is then stored at the destination (D) for n
number of bytes.
Source (S) Data
b12-15
b8-11
D9
b4-7
b0-3
b12-15
b8-11
D8
b4-7
b0-3
5
6
7
8
9
35
36
37
38
39
53
54
55
56
57
'5'
'6'
'7'
'8'
'9'
Applied Instructions 5
FX
FX
FX
1S
1N
Program steps
n
K, H
ASCI,
ASCIP:
Note:
7 steps
n = 1 to 256
)
A
ASCII Code
Destination
(D)
B
HEX DEC
C
43
b8-15
D20
D
44
b0-7
E
45
b8-15
D21
F
46
b0-7
2
32
b8-15
D22
6
36
b0-7
A
B
C
D
E
41
42
43
44
45
65
66
67
68
69
'A'
'B'
'C'
'D'
'E'
5-121
FX
2N
2NC
Symbol
67
'C'
68
'D'
69
'E'
70
'F'
50
'2'
54
'6'
F
46
70
'F'

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx1n seriesFx2nc seriesFx2n series

Table of Contents