EasyManuals Logo

Mitsubishi FX1S Series User Manual

Mitsubishi FX1S 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 FX1S Series

Questions and Answers:

Question and Answer IconNeed help?

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

Mitsubishi FX1S Series Specifications

General IconGeneral
ModelFX1S Series
I/O Points10 to 30 points
Program Memory2000 steps
Power SupplyAC
CommunicationRS-422
ExpansionNo expansion
Programming LanguageLadder Logic
Input Voltage100-240V AC
Built-in High-Speed CounterUp to 60 kHz (single-phase)
WeightApprox. 0.3 kg
Dimensions90 x 60 x 75 mm

Related product manuals