**_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_***

These instructions convert BCD bit strings into unsigned integers.
Instruction
**_BCD_TO_***
BCD-to-Unsigned
Integer Conversion
Group
Variables
Name
Meaning
In
Data to
convert
Out
Conver-
sion result
* The valid ranges depend on the data types of In and Out. Refer to Function, below, for details.
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 types of In and conversion result Out. For exam-
ple, if In is WORD data and Out is UINT data, the name of the instruction is WORD_BCD_TO_UINT.
The following example for the WORD_BCD_TO_UINT instruction is for when In is WORD16#3452.
LD
WORD#16#3452
WORD BCD data
WORD#16#3452
In
2-212
Name
FB/FUN
FUN
I/O
Description
Input
Data to convert
Output
Conversion result
OK OK OK OK OK OK OK OK
WORD_BCD_TO_UINT
EN
ENO
In
UNIT data
Out=abc
Graphic expression
(@)**_BCD_TO_***
EN
ENO
In
"**" must be a bit string data type.
"***" must be an integer data type.
Valid range
*
*
Integers
ST
abc:=WORD_BCD_TO_UINT(WORD#16#3452);
abc
3452
NJ-series Instructions Reference Manual (W502)
ST expression
Out:=**_BCD_TO_*** (In);
"**" must be a bit string data
Out
type.
"***" must be an integer data
type.
Unit
Default
0
---
---
---
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