I've been coming to this forum for several years finding answers to PLC questions I've had, however I now have a question of my own I can't seem to figure out. Hoping you guys can help me out. Here's what I'm working with, SLC 5/05 with an HSCE card. I've got an AGV that travels back and forth across the floor in a strait line between several production lines, loads finished product off the lines, then brings them all back to a common main line which finishes them and sends them out to the warehouse. I am retrofitting it with a magnetic ring encoder attached to a wheel on the bottom which rides along the ground to get the position. I've got the encoder hooked up to my HSCE card and counting, kind of... That's where I need a little help programming, as I haven't had to program one of these cards before. My issue is my encoder counts 1950 pulses per every 18 inches, however I need it to travel about 80 feet, which would be 960 inches, which is 104,000 pulses. The HSCE card will only count to 32,767. I need to figure out some way to overflow my HSCE count into maybe a Floating Point to accumulate my counts so I can travel the whole line accurately.
What I've currently tried was setting the counter type to Ring Counter with the rollover count set to 29,250, however when the count hits 29,250 it just resets the count and starts over. I also tried setting the counter type to Linear Counter with the Reset Value set to 29,250, then when it runs up to that value it 0's out the count and latches the Overflow/Underflow bit as well as the Critical Error bit then I can't figure out how to unlatch them and get it back to counting again. What I'm trying to do I wouldn't think should be too tricky to setup, I just can't figure it out, and hoping one of you guys has seen this before and can help me out. Another kicker is it travels both ways, so I need to add to my main value as the AGV moves forward, then subtract the value as it moves back to the main line. Thanks in advance!!
What I've currently tried was setting the counter type to Ring Counter with the rollover count set to 29,250, however when the count hits 29,250 it just resets the count and starts over. I also tried setting the counter type to Linear Counter with the Reset Value set to 29,250, then when it runs up to that value it 0's out the count and latches the Overflow/Underflow bit as well as the Critical Error bit then I can't figure out how to unlatch them and get it back to counting again. What I'm trying to do I wouldn't think should be too tricky to setup, I just can't figure it out, and hoping one of you guys has seen this before and can help me out. Another kicker is it travels both ways, so I need to add to my main value as the AGV moves forward, then subtract the value as it moves back to the main line. Thanks in advance!!