![IDEC OpenNet series Скачать руководство пользователя страница 200](http://html.mh-extra.com/html/idec/opennet-series/opennet-series_user-manual_617384200.webp)
14: D
ATA
C
ONVERSION
I
NSTRUCTIONS
O
PEN
N
ET
C
ONTROLLER
U
SER
’
S
M
ANUAL
14-3
BTOH (BCD to Hex)
Valid Operands
For the valid operand number range, see page 6-2.
▲
Internal relays M0 through M2557 can be designated as D1. Special internal relays cannot be designated as D1.
When T (timer) or C (counter) is used as S1, the timer/counter current value is read out. When T (timer) or C (counter) is
used as D1, the data is written in as a preset value which can be 0 through 65535.
Valid values for the source operand are 0 through 9999 (BCD) for the word data type, and 0 through 9999 9999 (BCD) for
the double-word data type. Make sure that each digit of the source designated by S1 is 0 through 9. If the source data is out
of the valid range, a user program execution error will result, turning on special internal relay M8004 and the ERROR
LED.
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 as required.
Valid Data Types
When a bit operand such as I (input), Q (output), M (internal relay), or R (shift register) is designated as the source or des-
tination, 16 points (word data type) or 32 points (double-word data type) are used.
When a word operand such as T (timer), C (counter), D (data register), or L (link register) is designated as the source or
destination, 1 point (word data type) or 2 points (double-word data type) are used.
Operand
Function
I
Q
M
R
T
C
D
L
Constant
Repeat
S1 (Source 1)
BCD data to conver t
X
X
X
X
X
X
X
X
X
—
D1 (Destination 1)
Destination to store conversion results
—
X
▲
X
X
X
X
X
—
—
W (word)
I (integer)
D (double word)
L (long)
X
—
X
—
S1
→
D1
When input is on, the BCD data designated by S1 is converted into 16- or 32-bit
binary data and stored to the destination designated by operand D1.
Valid values for the source operand are 0 through 9999 (BCD) for the word data
type, and 0 through 9999 9999 (BCD) for the double-word data type.
BTOH(*)
S1
*****
D1
*****
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]