‎03-15-2006 11:41 AM
‎03-15-2006 02:12 PM
I assume you want a hardware signal to cause it to reset to 0?
The board *can* do it, but there are some non-trivial limitations. Without more details about your app's needs, it's difficult to guess whether it'll do what *you* need.
Here's what you need to do to allow the value to reset to 0 based on a hw signal:
1. Configure the counter task for position encoding.
2. Enable the z-index reload feature, using 0 as the reload value.
3. Here's the catch: you must also predefine which 1 of the 4 possible A,B states is the one during which hw reset is allowed. If you get a short reset pulse during a different combination of A,B, the pulse will be ignored and the count will not be reset. There is NOT an option to "Don't Care" about the A,B state.
4. Here's a sometimes saving grace: you can perform simple edge counting by calling the encoder a two-pulse encoder while hard-wiring the B input to Gnd. Then A edges increment the count value just like edge counting would (assuming you specify the encoder units as "Ticks"). If your incoming signal is very low duty cycle (short high pulse, long low idle time), you can specify A,B state as Low/Low and have a good chance of catching the reset pulse.
5. You can also set the count value using software, but the task must first be stopped and then re-started after setting the count. This can happen pretty quickly if you only stop and start rather than clear and recreate the task.
-Kevin P.
‎03-16-2006 10:01 AM
‎03-16-2006 02:29 PM
You can set the count using a DAQmx property node, most likely a channel property node. Once you navigate to select the Count property, you can right-click to toggle it to "write mode." Then just wire in the count.
-Kevin P.