2 Standard Functions
2 - 62
NX-series Safety Control Unit Instructions Reference Manual (Z931)
DIV
This function divides integers or a duration.
If you omit an input or output parameter, a building error will occur.
An error will not occur if the output terminal is not used or if it is connected to an input terminal on the
next instruction.
This function divides dividend In1 by divisor In2 and outputs the result to output value Out.
Any remainder is truncated.
You cannot include more than one duration in the values to divide.
To divide a duration, set a duration for In1 and Out and set an integer for In2.
Do not allow the divisor to equal 0.
If the divisor is 0, a Division by Zero error will occur and the program will stop.
Instruction Name FB/FUN Graphic expression
DIV Division FUN
Variables
Name I/O Description Valid range Default
In1 Dividend Input Dividend Depends on data type. ---
In2 Divisor Input Divisor Depends on data type. ---
Out Output value Output Output value Depends on data type. ---
Boolean Bit strings Integers Durations
BOOL
SAFEBOOL
BYTE
SAFEBYTE
WORD
SAFEWORD
DWORD
SAFEDWORD
INT
SAFEINT
DINT
SAFEDINT
TIME
SAFETIME
In1 OK OK OK OK OK OK
In2 OK OK OK OK
Out OKOKOKOKOKOK
Function
Additional Information
DIV