iuhytvYUTCU
Member
We have AOIs for projects, which handle material dosing (by hand or by pipes and pumps), obviously they have comparison between setpoint and actual dosed amount, to ensure dosed amount is within range, not too little nor too much. And obviously they handle floating point numbers as they process quantity, and floating point numbers just have their problems regarding accuracy, which results in headache.
For example if opeator is to dose 0.016 kg of material, and range is +-0.001 kg, which means lower threshold is 0.015 kg, but actually in PLC (AB CLX in this matter) after SUB is scanned, the outcome is 0.015000001, it is obviously greater than 0.015, so if operator scans a package of right 0.015 kg, system will not let the dosing pass.
So guys, when dealing with floating point numbers, what is good practice to your experiences??
For example if opeator is to dose 0.016 kg of material, and range is +-0.001 kg, which means lower threshold is 0.015 kg, but actually in PLC (AB CLX in this matter) after SUB is scanned, the outcome is 0.015000001, it is obviously greater than 0.015, so if operator scans a package of right 0.015 kg, system will not let the dosing pass.
So guys, when dealing with floating point numbers, what is good practice to your experiences??