**_To_Bcd - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

**_TO_BCD_***

These instructions convert unsigned integers to BCD bit strings.
Instruction
**_TO_BCD_***
Unsigned Integer-
to-BCD Conversion
Group
Variables
Name
Meaning
In
Data to
convert
Out
Conversion
result
* The valid ranges depend on the data types of In and Out. Refer to Function, below, for details.
Bit strings
In
Out
OK OK OK OK
Function
These instructions convert data to convert In (which must be an unsigned integer) to a BCD bit string.
The name of the instruction is determined by the data types of In and conversion result Out. For exam-
ple, if In is UINT data and Out is WORD data, the name of the instruction is UINT_TO_BCD_WORD.
The following example for the UINT_TO_BCD_WORD instruction is for when In is UNIT#3452.
LD
UINT#3452
UNIT data
In
UINT#3452
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
Input
Data to convert
Output
Conversion result
OK OK OK OK OK OK OK OK
UINT_TO_BCD_WORD
EN
ENO
In
WORD BCD data
16#3452
Out=abc
Graphic expression
(@)**_TO_BCD_***
EN
ENO
In
"**" must be an integer data type.
"***" must be a bit string data type.
Valid range
*
*
Integers
ST
abc:=UINT_TO_BCD_WORD(UINT#3452);
abc
2 Instruction Descriptions
ST expression
Out:=**_TO_BCD_*** (In);
"**" must be an integer data
Out
type.
"***" must be a bit string
data type.
Unit
Default
---
0
---
---
Times, durations,
dates, and text strings
2
2-245

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents