Divide

Examples

The math function divide is executed by the Divide function block shown below.

Input Operands A & B must be integer values: MI , SI or #constant integer value.

Output Operand C may be a Memory Integer or a System Integer.

The Divide function can only return whole numbers. This function does not support floating point integers. Examples: 7.2 and 9.5.

Use System Integer 4 (SI 4 - Divide Remainder) to find the exact integer value of a division function that may involve a remainder.

Note that you must use the remainder value in SI 4 immediately after the division function. SI 4 will be written over with the next division function and the specific remainder value will be lost.

System Bit 4 (SB 4 - Divide by Zero) will activate if the division operation will inadvertently result in a division by zero and return zero in Operand C.

Related Topics

How do I place a Compare or Math or Logic function block on a net?

How do I execute a Math function between an integer and a MI or SI?

How do I get the remainder value of a Division function?

How do I exchange one element for another within an element family?