
adccommunitymod (AutomationDirect) asked a question.
H2CTRIO module counting question
Created Date: July 14,2010
Created By: pioplastic
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
Is there a way to have the quadrature counter on a H2CTRIO module only count positive numbers? When my machine is at "Home ", there is a chance that the encoder can send an additional negative pulse which causes the counter to go to maximum and start counting down from there. Thanks, Pioplastic
Created Date: July 14,2010
Created by: bcarlton
It's best to let the counter count as it needs to to prevent loss of position information. How the program uses that information is another thing. if it sees the rollover to a (large?/negative?) number then it should do whatever is appropriate, possibly nothing.
Created Date: July 14,2010
Created by: KPrice
On some projects we handled this situation (possible negative count) by making the home (zero) position with a positive offset. When the counter is reset at the home position, it resets to a positive number offset from zero. In any math scaling, we must subtract the offset. You can setup an alarm if the counter counts too far below the offset, stop is worn for example.
Created Date: July 15,2010
Created by: pioplastic
Thanks all...
Thanks for the ideas on the negative rollover solution. I will try setting the home with a positive offset and then handle the offset in programming. Just didn't know of an easier way to keep the count a positive number.
Created Date: July 29,2010
Created by: stimpsonjcat
Also possible to only move count to the register it gets 'used ' in if it is greater than 0.
Created Date: July 14,2010
Created by: pioplastic
Is there a way to have the quadrature counter on a H2CTRIO module only count positive numbers? When my machine is at "Home ", there is a chance that the encoder can send an additional negative pulse which causes the counter to go to maximum and start counting down from there.
Thanks,
Pioplastic