have a look at function block "ABSROT". It might help you solve your task. Just set the lolim and hilim parameters as a range of the counter output.
Let us know if you managed get the desired behaviour.
Questions about REXYGEN Studio, REXYGEN HMI Designer, ...
Need help configuring some of the I/O drivers? Problems integrating custom hardware or software?
Any other thoughts on REXYGEN or automation and control systems in general?
Found a bug? Missing some feature? Let us know!