FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
10-3
10: D
ATA
C
ONVERSION
I
NSTRUCTIONS
BTOH (BCD to Hex)
Valid Devices
For valid device address ranges, see "Device Addresses" on page 2-1.
Special internal relays cannot be designated as D1.
When T (timer) or C (counter) is used as S1, the timer/counter current value (TC or CC) is displayed. When T (timer) or C (counter) is used as D1,
the data is written in as a preset value (TP or CP) which can be 0 through 65,535.
When the data type is W (word), the valid range of S1 (BCD data) is 0 to 9,999.
When the data type is D (double word), the valid range of S1 (BCD data) is 0 to 99,999,999.
Make sure that each digit of the source designated by S1 is 0 through 9. If the source data exceeds the valid range, a user program execution error
will result, turning on special internal relay M8004 and the ERR LED on the FC6A Series MICROSmart.
When a user program execution error occurs, the execution of the instruction is canceled. The value of D1 is left unchanged and the next instruction
is executed. For user program execution errors, see "User Program Execution Errors" on page 3-10.
Since the BTOH instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used.
Valid Data Types
S1
→
D1
When input is on, the BCD data assigned by S1 is converted into 16- or 32-bit binary data and
stored to the destination assigned by device D1.
Valid values for the source device are 0 through 9,999 (BCD) for word data, and 0 through
99,999,999 (BCD) for double-word data.
BTOH(*)
S1
*****
D1
*****
Device
Function
I
Q
M
R
T
C
D
P
Constant
Repeat
S1 (Source 1)
BCD data to convert
X
X
X
X
X
X
X
—
X
—
D1 (Destination 1)
Destination to store conversion results
—
X
X
X
X
X
—
—
—
W (word)
X
When a bit device such as I (input), Q (output), M (internal relay), or R (shift register) is assigned as the source,
16 points (word data) or 32 points (double-word data) are used.
When a word device such as T (timer), C (counter), or D (data register) is assigned as the source, 1 point (word
data) or 2 points (double-word data) are used.
I (integer)
—
D (double word)
X
L (long)
—
F (float)
—
Summary of Contents for MICROSmart FC6A Series
Page 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Page 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...