08-25-2005 09:59 AM
08-26-2005 10:00 AM
Hi Chris-
The only way to reset a counter to zero (or other initial count you specify for a task/channel) is to stop and restart the task. There isn't a property or method for setting or resetting the count value when a task is running.
Thanks-
09-23-2005 01:46 PM
09-26-2005 06:35 PM
09-27-2005 01:13 PM
Does that mean that the reset function would only work if there happened to be incoming pulses at the exact instant when the Z input was asserted? If that's the case, then are you saying there's really no way of resetting the counter ahead of time, in anticipation of pulses which will come at an arbitrary later time?
Sometimes, it's necessary to zero out the pulses ahead of time, knowing that when the pulses finally do come in, the count will start from zero. One application that comes to mind is a fluid displacement meter. This device generates a given number of pulses for a given amount of fluid flow. Often times, you want to zero this out before starting the fluid flow. It would be nice to be able to fire the "clear" output just prior to starting the fluid flow.
09-28-2005 11:53 AM
09-28-2005 12:07 PM
Thanks - that's a good suggestion. And I think it will work well in 2-pulse mode (separate up and down pulses). I can imagine that it may be a bit more problematic if we're hooked up to a quadrature encoder, because it might be hard to know the exact states of A and B when Z is asserted. And yes, you certainly can zero out the counter in software (which is what we do now!).
Thanks for your time and help!
08-27-2017 05:00 AM
can you explain it to me in detail? As in what would i need to do if i want to generate say a trigger after every 2000 counts from a counter?