Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
15 Applied Instructions (External Device (optional device))
15.4 HEX / ASCII to Hexadecimal Conversion
399
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
15.4 HEX / ASCII to Hexadecimal Conversion
Outline
This instruction converts ASCII code into HEX code.
Also available are DABIN instruction for converting ASCII code into BIN data, and DEVAL instruction for
converting ASCII code into binary floating decimal point data.
As for DABIN instruction, refer to section 29.5.
As for DEVAL instruction, refer to section 18.5.
1. Format and operation, execution form
2. Set data
3. Applicable devices
S: Refer to "Cautions".
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.
FX3U(C) FX3G(C) FX3S FX2N(C) FX1N(C) FX1S FXU/FX2C FX0N FX0(S)
Instruction
name
Operation
Execution
form
Expression in each language
Structured ladder/FBD ST
HEX 16 bits Continuous HEX(EN, s, n, d);
HEXP 16 bits Pulse HEXP(EN, s, n, d);
Variable Description Data type
Input
variable
EN Execution condition Bit
Head device in which ASCII code to be converted is stored ANY16
Number of characters in ASCII code to be converted (number of bytes) ANY16
Output
variable
ENO Execution state Bit
Head device for storing converted HEX code ANY16
Operand
type
Bit Devices Word Devices Others
System User Digit designation System User
Special
Unit
Index
Con
stant
Real
Number
Character
String
Pointer
XYMTCS
D.b
KnX KnY KnM KnS T C D R
U\G
VZModifierKH E
""
P
zzzzzzz
S2 S3
zzz
S1 S2
zz
zzzzzz
S2 S3
zz z
HEX
EN
s
ENO
d
n
HEXP
EN
s
ENO
d
n
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