Bcd_To - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions

BCD_TO_**

The BCD_TO_** instruction converts BCD bit strings into unsigned integers.
Instruction
BCD_TO_**
BCD Data Type-to-
Unsigned Integer
Conversion Group
Variables
Name
Meaning
In
Data to
convert
Out
Conver-
sion result
*1 The valid ranges depend on the data types of In and Out. Refer to Function, below, for details.
*2 If you omit the input parameter, the default value is not applied. A building error will occur.
Bit strings
In
OK OK OK OK
Out
Function
These instructions convert data to convert In (which must be a BCD bit string) into an unsigned integer.
The name of the instruction is determined by the data type of conversion result Out. For example, if Out
is the UINT data type, the instruction is BCD_TO_UINT.
The following example for the BCD_TO_UINT instruction is for when In is WORD#16#3452.
LD
WORD#16#3452
WORD BCD data
In
WORD#16#3452
2-218
Name
FB/FUN
FUN
I/O
Description
Input
Data to convert
Output
Conversion result
OK OK OK OK OK OK OK OK
BCD_TO_UINT
EN
ENO
In
UNIT data
Out=abc
Graphic expression
(@)BCD_TO_**
EN
ENO
In
"**" must be an integer data type.
Valid range
*1
*1
Integers
ST
abc:=BCD_TO_UINT(WORD#16#3452);
abc
3452
NJ-series Instructions Reference Manual (W502)
ST expression
Out:=BCD_TO_** (In);
"**" must be an integer
Out
data type.
Unit
Default
*2
---
---
---
Times, durations,
dates, and text strings

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents