EasyManua.ls Logo

Omron NJ501-1500

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2 Instruction Descriptions
2-430
NJ-series Instructions Reference Manual (W502)
StringToFixNum
The StringToFixNum instruction converts a decimal text string to a signed fixed-decimal number.
The StringToFixNum instruction converts decimal text string In to a fixed-decimal number. The following
conversion is used.
1
The number in In is multiplied by 1,000.
2
The fractional part is truncated.
3
The result is given as a 32-bit hexadecimal number (DWORD).
A few examples are given below.
Instruction Name FB/FUN Graphic expression ST expression
StringToFixNum Text String-to-
Fixed-decimal
Conversion
FUN Out:=StringToFixNum(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Decimal text
string
Input Decimal text string Depends on data type.
--- ''
Out Fixed-decimal
number
Output Fixed-decimal number Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK
Out OK
Function
(@)StringToFixNum
EN ENO
In Out
def:=StringToFixNum(abc);
LD ST
abc def
StringToFixNum
EN ENO
In

Table of Contents

Related product manuals