EasyManuals Logo

Mitsubishi FX1N Series Programming Manual

Mitsubishi FX1N Series
466 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
Page #242 background imageLoading...
Page #242 background image
FX Series Programmable Controlers Applied Instructions 5
5-122
5.9.4 HEX (FNC 83)
Operation:
This instruction reads n ASCII data bytes from
head source address (S) and converts them in to
the equivalent Hexadecimal character. This is then
stored at the destination (D) for n number of bytes.
Points to note:
Please note that this instruction works in reverse to the ASCI instruction, i.e. ASCII data
stored in bytes is converted into associated hexadecimal characters. The HEX instruction can
be used with the M8161 8bit/16bit flag. In this case the source data (S)is read from either the
lower byte (8bits) when M8161 is ON, or the whole word when M8161 is OFF i.e. using the
example above with the following data in devices D50 and D51 respectively (43
H,41H)
(42
H,31H) and assuming M8161 is ON.
The ASCII data is converted to its
hexadecimal equivalent and stored
sequentially digit by digit from the destination
head address.
If M8161 had been OFF, then the contents of
D20 would read CAB1
H.
Mnemonic Function
Operands
Program steps
SDn
HEX
FNC 83
(Converts
ASCII to
HEX)
Converts a data
value from ASCII
in to a
hexadecimal
equivalent
K, H, KnX, KnY,
KnM, KnS
T, C, D
KnY, KnM, KnS
T, C, D, V, Z
K, H
Note:
n=1to256
)
HEX,
HEXP:
7steps
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
M10
K 4
[ S ] [ D ]
D20HEX D50
[ n ]
Source (S)
D51
b8-15
b0-7
D20
Destination
(D)
b12-15
b8-11
b4-7
b0-3
Data
-
-
A
1
HEX DEC
ASCII Code
43
41
42
31
67
65
66
49
Symbol
'C'
'A'
'B'
'1'
D50
b8-15
b0-7
For further details regarding the use of the HEX instruction and about the available ASCII data
ranges, please see the following information point ASCII Character Codes under the ASCI
instruction on the previous page.
Important:
If an attempt is made to access an ASCII Code (HEX or Decimal) which falls outside of the
ranges specified in the table on previous page, the instruction is not executed. Error 8067 is
flagged in data register D8004 and error 6706 is identified in D8067. Care should be taken
when using the M8161 flag, and additional in the specification of the number of element n
which are to be processed as these are the most likely places where this error will be caused.

Table of Contents

Other manuals for Mitsubishi FX1N Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi FX1N Series and is the answer not in the manual?

Mitsubishi FX1N Series Specifications

General IconGeneral
Programming LanguageLadder Logic
Output TypeRelay, Transistor
Operating Temperature0 to 55°C
Power Supply100-240V AC or 24V DC
Program Capacity8K steps
Communication PortsRS-422
Data Memory8000 words
High-speed CountersUp to 6 channels
Expansion ModulesAvailable
Pulse Output2 points

Related product manuals