Thank you for your reply Jeremy.
Frankly, this is not the problem. I don't even understand this function.
This: str(int(min(100,max(1,zone_mm))))
It just gives back the zone_mm parameter.
Also, I don't want rounding. That's the whole point. We need precise movements, not rounded off movements. CNT will not be precise in this case.