DIV (62)
DIV (62)
ID 62
Application: |
PLC |
SIM |
Group: MATH
Short description:
A function that divides two numbers.
Inputs (2):
no. |
type |
impulse |
mark |
notes |
1 |
I |
no |
a |
Long int input no 1 |
2 |
I |
no |
b |
Long int input no 2 |
Outputs (3):
no. |
type |
impulse |
mark |
notes |
1 |
I |
no |
a div b |
Division results |
2 | I | no | a mod b | The rest of the division |
3 | B | no | error | Error of 0 in divisor |
Settings: none
Function operation:
A DIV function divides two numbers. The output a mod b returns the remainder of the division. The error output reports a divide by 0 error.
R registers and M markers used: none