2 Instruction Descriptions
BinToBCDs_**
These instructions convert signed integers to signed BCD bit strings.
Instruction
BinToBCDs_**
Signed Integer-to-
BCD Conversion
Group
Variables
Name
Meaning
In
Data to
convert
Format
Data format
number
Out
Conver-
sion result
* The valid range depends on the value of Format. Refer to Function, below, for details.
Bit strings
In
Format
Out
Function
These instructions convert signed integer In to a signed BCD bit string.
The name of the instruction is determined by the data type of Out. For example, if Out is the WORD
data type, the instruction is BinToBCDs_WORD.
2-224
Name
FB/FUN
FUN
I/O
Description
Data to convert
Input
Format of BCD bit string
Output
Conversion result
Refer to Function for the enumerators of the enumerated type _eBCD_FORMAT.
Must be same size of data type as In
Graphic expression
(@)BinToBCDs_**
EN
ENO
In
Out
Format
"**" must be a bit string data type.
Valid range
*
_BCD0 to _BCD3
*
Integers
OK OK OK OK
NJ-series Instructions Reference Manual (W502)
ST expression
Out:=BinToBCDs(In, For-
mat);
"**" must be a bit string data
type.
Unit
Default
0
---
_BCD0
---
---
Times, durations,
dates, and text strings