Modreal - Omron NY532-5400 Reference Manual

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

Advertisement

ModReal

The ModReal instruction calculates the remainder of real number division.
Instruction
ModReal
Real Number
Modulo-division
Variables
Name
Meaning
In1
Dividend
In2
Divisor
Out
Remainder
* If you omit an input parameter, the default value is not applied. A building error will occur.
Bit strings
In1
In2
Out
Function
The ModReal instruction divides dividend In1 by divisor In2 to find the remainder.
The following example is for when In1 is REAL#−9.9 and In2 is REAL#−3.14. The value of variable
abc will be REAL#−0.48.
LD
REAL#-9.9
REAL#-3.14
The ModReal instruction divides In1 by In2 to find the remainder.
The remainder of −9.9/(−3.14) is −0.48, so the value of abc will be REAL#−0.48.
In1
REAL#-9.9
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
Dividend
Input
Divisor
Output
Remainder
ModReal
EN
ENO
In1
abc
In2
Remainder calculated.
/ In2
REAL#-3.14
Graphic expression
(@)ModReal
EN
ENO
In1
In2
Valid range
Depends on data type.
Depends on data type.
Integers
OK OK
OK OK
OK OK
ST
abc:=ModReal(REAL#-9.9, REAL#-3.14);
Out=abc
REAL#-0.48
2 Instruction Descriptions
ST expression
Out:=ModReal(In1, In2);
Out
Unit
Default
*
---
---
---
Times, durations, dates,
and text strings
2
2-233

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents