Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
29 Applied Instructions (Data Table Operation)
29.6 BINDA / BIN to Decimal ASCII Conversion
701
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
Related instructions
Cautions
1) The instruction is provided in the FX3UC PLC Ver. 2.20 or later.
2) Occupied device points
The table below shows the occupied device points of the device specified by for 16-bit operation
(BINDA/BINDAP) when M8091 is ON or OFF and 32-bit operation (DBINDA/DBINDAP).
Error
An operation error is caused in the following cases. The error flag M8067 turns ON, and the error code is
stored in D8067.
1) When the occupied device points of the ASCII code character string in the device specified by
exceed the corresponding device range. (Error code: K6706)
Program example
In the program example below, 16-bit binary data stored in D1000 is converted into decimal ASCII codes
when X000 is set to ON, and the ASCII codes converted by PR (FNC77) instruction are output one by one in
the time division method to Y040 to Y051.
By setting to OFF the output character selector signal M8091 and setting to ON PR mode flag M8027, ASCII
codes up to "00H" are output.
For PR mode flag and PR instruction, refer to Section 14.8.
Instruction Description
ASCI Converts hexadecimal codes into ASCII codes.
HEX Converts ASCII codes into hexadecimal codes.
DESTR Converts binary floating point data into a character string data (ASCII code) with the specified number of digits.
DEVAL Converts character string data (ASCII code) into binary floating point data.
DABIN Converts numeric value data expressed in decimal ASCII codes (30H to 39H) into binary data.
Occupied points of
16-bit operation
M8091=ON 3
M8091=OFF 4
32-bit operation 6
D0
b15 b8 b7 b0
5126
D1000
16-bit
binary data
(BIN)
36H(6) 32H(2)
20H(space)
31H(1)
20H(space)
35H(5)
D1
D2
0000H
D3
M8091=OFF
PR (FNC77)
instruction
Y040 to Y051
"__5126" is output.
X000
BINDA
EN ENO
d
s
RST
EN ENO
d
SET
EN ENO
d
M8091
M8027
D1000
D0
PR
EN
s
ENO
d
D0 Y040
[Structured ladder/FBD] [ST]
RST(X000,M8091);
SET(X000,M8027);
BINDA(X000,D1000,D0);
PR(X000,D0,Y040);