### IDIV – Integer division

Block SymbolLicensing group: STANDARD

Function Description
The IDIV block performs an integer division of two integer input signals, $\mathtt{\text{n}}=\mathtt{\text{i1}}÷\mathtt{\text{i2}}$, where $÷$ stands for integer division operator. If the ordinary (non-integer, normal) quotient of the two operands is an integer number, the result of integer division is the same. In other cases the resulting value is obtained by trimming the non-integer quotient’s decimals (i.e. rounding towards lower integer number). In case $\mathtt{\text{i2}}=0$, the output $\mathtt{\text{E}}$ is set to on and the output $\mathtt{\text{n}}$ is substituted by $\mathtt{\text{n}}=\mathtt{\text{nerr}}$.

Inputs

 i1 First integer input of the block  $↓$-9,22E+18 $↑$9,22E+18 long i2 Second integer input of the block  $↓$-9,22E+18 $↑$9,22E+18 long

Outputs

 n Integer quotient of the inputs long E Error flag – division by zero bool

Parameters

 vtype Numeric type  $\odot$4 long 2 .... Byte 3 .... Short 4 .... Long 5 .... Word 6 .... DWord 10 ... Large nerr Substitute value for an error case  $\odot$1 long

2019 © REX Controls s.r.o., www.rexygen.com