Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
15 Applied Instructions (External Device (optional device))
15.3 ASCI / Hexadecimal to ASCII Conversion
395
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.3 ASCI / Hexadecimal to ASCII Conversion
Outline
This instruction converts HEX code into ASCII code.
Also available are BINDA instruction for converting BIN data into ASCII code, and DESTR instruction for
converting binary floating decimal point data into ASCII code.
As for BINDA instruction, refer to section 29.6.
As for DESTR instruction, refer to section 18.4.
1. Format and operation, execution form
2. Set data
3. Applicable devices
S: Refer to "Cautions".
Function and operation
1. 16-bit operation(ASCI/ASCIP)
Of the HEX code stored after the device specified by , n characters (digits) are converted into ASCII
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
ASCI 16 bits Continuous ASCI(EN, s, n, d);
ASCIP 16 bits Pulse ASCIP(EN, s, n, d);
Variable Description Data type
Input
variable
EN Execution condition Bit
Head device in which HEX code to be converted is stored ANY16
Number of characters in HEX code to be converted (number of digits) ANY16
Output
variable
ENO Execution state Bit
Head device for storing converted ASCII 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
zzz zzzz
S2 S3
zz z zz
S1 S2
zz
zzzzzz
S2 S3
z
ASCI
EN
s
ENO
d
n
ASCIP
EN
s
ENO
d
n
Command input
Head device in which HEX
code to be converted is stored
Head device for storing
converted ASCII code
Number of characters in
HEX code to be converted
(number of digits)
ASCI
EN
s
n
ENO
d1