For each DIV32, change it to a normal divide ...

Was: Limit1 = DIV32 10

  To:  Limit1 = Limit1 / 10

or you can combine them with the previous statements

Limit1 = (BAR_range * 3) / 10

for all the occurances.

And change the WORD vars to LONG.
<br>