Thanks for your reply Mr Spok,
Yes I still have quite a few inputs open. But as far as know those absolute encoders are very expensive? I thought of another way. I installed 32 pins in a circle around the centre pipe of the pivot and as the pivot turns a mcroswitch is triggered as it moves over each pin. I then use a retentive counter to store the position value(1 – 32) on the plc. Everything works well when the pivot is moving forward as the counter gets to 32 I reset it again to 0 and it starts counting further. My problem is when the pivot is in reverse and the counter counts down eg. 3, 2, 1, 0… then when it gets to zero it must change to 32, 31, 30, 29 eg. And I cannot get it to change to 32 from 0.
Any ideas?
Regards
Christo