Problem: I monitored the values of the boxes' weights, why were they varying so much?
For example, running the simulation multiple times using just the small box, sometimes the weight is above 5, most of the time around 4, but occasionally going above cut off 4.5 which causes this to be treated as medium box. I made sure to set this as Real data type, and I have made sure the sensor's placement is such that when the full box enters the scale, then it's weighed.
I found a solution after experimenting here and there. Note I am using PLCSIM (not real hardware)
- Had to stop the load conveyor (Q0.1) during the weighing process

Had to introduce a delay before writing the sensor reading into the array


Example of sporadic inconsistent weights; boxes that are large overshoot to 8, and small boxes undershoot to below 3.5

Example of consistent weight measurements (stable readings for Large box does not vary much and should hover around 7.5 value)
