Divide DIV

Dest = A ÷ B.

TagAfter two scans
BoxesOut6
Items224
PerBox24

How it works

While the rung is true, writes Source A ÷ Source B to the destination each scan. A fault, such as a divide by zero, leaves the destination unchanged.

How it's used

Use DIV to change units or share out a total.

TagValue
RunMs7500
RunSeconds7

DINT division drops the remainder: 7500 ÷ 1000 is 7.

Operands

OperandData typeRead or write
ADINT, REAL or a numberReads
BDINT, REAL or a numberReads
DestDINT, REALWrites

Common mistakes

  • Dividing by 0Dividing by 0 is a fault. Check B first. DINT division drops the remainder.

Learn it in a lesson