EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 414

Mitsubishi Electric MELSEC FX Series
838 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
Loading...
7 Applied Instructions
7.9 External Device (optional device)
412
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Function and operation explanation
1. 16-bit operation(HEX/HEXP)
Of the ASCII code stored after the device specified by , n characters are converted into HEX code, and
stored in the device after the one specified by . In this instruction, the mode usable when converting
includes 16-bit mode and 8-bit mode. As for the operation of each mode, refer to the following pages.
2. <16-bit conversion mode> When M8161=OFF(M8161 is used commonly with RS, ASCI,
CCD, CRC instructions)
ASCII characters stored in higher and lower 8 bits (bytes) in the device specified by are converted into
HEX data, and transferred to the device specified by in every four digits. The number of characters to be
converted is specified by n.
M8161 is used commonly with RS, ASCI, CCD, CRC instructions. When using in 16 bits, you must keep
always OFF.
M8161 is cleared when changed from RUN to STOP.
Operation
In the case of the program shown below, the conversion is executed as follows.
Conversion source data
ASCII code HEX conversion
D 200 lower 30H 0
D 200 higher 41H A
D 201 lower 42H B
D 201 higher 43H C
D 202 lower 31H 1
D 202 higher 32H 2
D 203 lower 33H 3
D 203 higher 34H 4
D 204 lower 35H 5
Command input
Head device in which ASCII
code to be converted is stored
Head device for storing
converted HEX code
Number of characters in
ASCII code to be converted
(number of bytes)
HEX
EN
s
n
ENO
d
Command input
Head device in which ASCII
code to be converted is stored
Head device for storing
converted HEX code
16-bit mode
Number of characters in
ASCII code to be converted
(number of bytes)
HEX
EN
s
n
ENO
d
M8000
OUT
EN ENO
d
M8161
X010
HEX
EN
s
ENO
d
n
D200 D100
K4
M8000
16-bit mode
OUT
EN ENO
d
M8161

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals