Modreal - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
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
NJ-series Instructions Reference Manual (W502)
Name
FB/FUN
FUN
I/O
Description
Dividend
Input
Divisor
Output
Remainder
ModReal
EN
ENO
In1
abc
In2
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);
2 Instruction Descriptions
ST expression
Out:=ModReal(In1, In2);
Out
Unit
Default
*
---
---
---
Times, durations,
dates, and text strings
2
2-205

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents