Fraction - Omron NY532-5400 Reference Manual

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

Advertisement

Fraction

The Fraction instruction finds the fractional part of a real number.
Instruction
Fraction
Real Number
Fraction
Variables
Name
Meaning
In
Real
number
Out
Fractional
part
* If you omit an input parameter, the default value is not applied. A building error will occur.
Bit strings
In
Out
Function
The Fraction instruction finds the fractional part of real number In.
The following example is for when In is REAL#−123.456. The value of variable abc will be
REAL#−0.456.
LD
REAL#-123.456
The Fraction instruction finds the fractional part of In.
The fractional part of −123.456 is −0.456, so the value of abc will be REAL#0.456.
In
REAL#-123.456
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
Input
Real number
Output
Fractional part
Fraction
EN
ENO
In
abc
Fractional part extracted.
Graphic expression
(@)Fraction
EN
ENO
In
Out
Valid range
Depends on data type.
Depends on data type.
Integers
OK OK
OK OK
ST
abc:=Fraction(REAL#-123.456);
Out=abc
REAL#-0.456
2 Instruction Descriptions
ST expression
Out:=Fraction(In);
Unit
Default
---
*
---
---
Times, durations, dates,
and text strings
2
2-235

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents