EasyManuals Logo

Omron NJ501-1500 User Manual

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
Page #216 background imageLoading...
Page #216 background image
2 Instruction Descriptions
2-168
NJ-series Instructions Reference Manual (W502)
MOD
The MOD instruction finds the remainder for division of integers.
* If you omit an input parameter, the default value is not applied. A building error will occur.
The MOD instruction divides dividend In1 by divisor In2 to find the remainder. The data types of In1,
In2, and remainder Out can have different data types.
This instruction performs the calculation with the following formula.
Out = In1 − (In1/In2)* In2 (The decimal point is truncated in the division operation.)
Examples of the values of In1, In2, and Out are given in the following table.
Instruction Name FB/FUN Graphic expression ST expression
MOD Modulo-division FUN Out:=In1 MOD In2;
Variables
Name Meaning I/O Description Valid range Unit Default
In1 Dividend
Input
Dividend
Depends on data type. --- *
In2 Divisor Divisor
Out Remainder Output Remainder 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
In1 OKOKOKOKOKOKOKOK
In2 OKOKOKOKOKOKOKOK
Out OKOKOKOKOKOKOKOK
Function
Value of In1 Value of In2 Value of Out
532
5 −32
−53 −2
−5 −3 −2
(@)MOD
EN ENO
In1 Out
In2

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals