AB Modulo instruction

Can someone give me an idea as to why I would use a modulo instruction. I asked our senior Engineer, but left more confused, than before I asked him. TIA.

Hey Mike,

It’s not a commonly used instruction, that being said it stems from a simple mathematical calculation that you will find in almost every calculator.

Image a production line that packs 8 bottles into 1 box and 36 boxes into one pallet. At the end of the shift, the team has produced 20 pallets. However, the “case packer” made 750 boxes and the “bottler” made 6010 bottle. What happened?

750 MOD[36] = 30 cases were left over.
6010 MOD [8] = 2 bottles were left over.

It’s just an example of how these operators could be used…

Hope that helps,
Vlad

1 Like