grnick50
Lifetime Supporting Member
Dear All,
Happy new year. I wish you all the best for 2012.
I am writing an application using an AB ML1000 to apply positioning using an encoder on a dough folding machine. I am forced to use ML1000 as it was surplus at my client's stock.
In the program I need to calculate the actual position in percent of the travel of the folder arm. I was thinking to calculate:
(actual_pulses / max_possible_pulses)*100.
But then I realize that ML1000 does not use floating point maths. So plan B was to calculate:
(actual_pulses * 100) / max_possible_pulses
But then I realize that the maximum value of the actual pulses can be only 327 which is unexeptably low.
If actual_pulses exceed 327 e.g actual_pulses = 328, then 328*100=32800 which overflows the controler and gives a fault.
Is there a work around to calculate this percentage?
BR
Nik
Happy new year. I wish you all the best for 2012.
I am writing an application using an AB ML1000 to apply positioning using an encoder on a dough folding machine. I am forced to use ML1000 as it was surplus at my client's stock.
In the program I need to calculate the actual position in percent of the travel of the folder arm. I was thinking to calculate:
(actual_pulses / max_possible_pulses)*100.
But then I realize that ML1000 does not use floating point maths. So plan B was to calculate:
(actual_pulses * 100) / max_possible_pulses
But then I realize that the maximum value of the actual pulses can be only 327 which is unexeptably low.
If actual_pulses exceed 327 e.g actual_pulses = 328, then 328*100=32800 which overflows the controler and gives a fault.
Is there a work around to calculate this percentage?
BR
Nik