| Type | Function | 
| Description | Divides the operand connected to IN1 by the operand connected to IN2 and returns the remainder of the division at OUT. | 
| Notes | 
A division by zero leads to a runtime exception which results in calling an Event Handler and a controller halt.This applies only if the ENO output is not connected. For the EN/ENO behavior  of the function in case of a division by zero, see the description below.The function provides implicit data type conversion at its input and output parameters according to the rules defined by the IEC 61131 standard. | 
| Parameters | Inputs  IN1 
 
| Data type: | ANY_INT |  
| Description: | Dividend |   IN2 
Output
 
| Data type: | ANY_INT |  
| Description: | Divisor |   OUT 
 
| Data type: | ANY_INT |  
| Description: | Remainder |  | 
| Error behavior |  Error behavior 
The following table shows the errors which may occur while executing the function and the value returned by the function in the corresponding error case. 
 
| Error case | Output value |  
| IN2 = 0
Note: If ENO is not used, controller goes into Halt. | 0 |  | 
| Additional information |  EN/ENO behavior 
The POU is only executed if TRUE  is applied to the EN input. If EN = FALSE, the POU is not executed and ENO = FALSE indicates the inactivity. If any of the errors listed under "Error behavior" occurs while executing the function, ENO is set to FALSE. 
 |