Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I setup a quadrature applicati

on to reload a zero on the z pulse while counting up AND reload the stripe count of my encoder (i.e 720) while counting down. I understand how the reload mechanism works in one direction but what about bi-directional??? I am using Traditional NI-DAQ & VB6I am monitoring the position of a rotating shaft. The shaft has a quadrature encoder directly connected with 720 pulses per rev. I am using a 6602 board and would like to have a counter count up from 0 to 719 and reset to 0 (on the index pulse) in the positive direction (A leads B) and count down to 0 and reset to 719 in the negative direction (B leads A) direction. The Z index reload feature is specified as a unidirectional feature. What does one do in a bi-firectional sysytem?

0 Kudos
Message 1 of 4
(3,696 Views)
on to reload a zero on the z pulse while counting up AND reload the stripe count of my encoder (i.e 720) while counting down. I understand how the reload mechanism works in one direction but what about bi-directional??? I am using Traditional NI-DAQ & VB6I don't think that sort of behavior is supported in hardware for the 660x series. There's only one reload value which changes the count register without regard to the direction of approach. However, there may be a simple software solution. Let's look at what you have now:

In the '+' direction, the counter resets to 0, then counts up from 1 to 719 before resetting again. In the '-' direction, the counter resets to 0, then counts down from -1 to -719 before resetting again. You'd like it to count down from 719 to 1 before resetting.

Well, you could just conditally add 720 to the count whenever count < 0. Or you may prefer to use a remainder function on all the data without any conditional.

Sound like it could work for you?

My ow
n wishlist for hardware-driven reset of the count register is:
1. I'd like to do it in modes other than position measurement (especially edge counting mode).
2. I'd like an option like Z index reload phase == 'A any, B any' (meaning, reset the count regardless of whether A & B are high or low)
3. I'd like to select a RTSI signal or other counter output as the Z-index signal source rather than needing to hardwire it.

-Kevin P.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 4
(3,696 Views)
on to reload a zero on the z pulse while counting up AND reload the stripe count of my encoder (i.e 720) while counting down. I understand how the reload mechanism works in one direction but what about bi-directional??? I am using Traditional NI-DAQ & VB6To accomplish this behavior you can simply convert the counter data from a u32 to an i32. Since the counter is 32 bits wide, this should get you the values you desire.

In DAQmx, reading the value in scaled units (degrees) would also give you this behavior.

Hope this helps!
gus....
0 Kudos
Message 3 of 4
(3,696 Views)
on to reload a zero on the z pulse while counting up AND reload the stripe count of my encoder (i.e 720) while counting down. I understand how the reload mechanism works in one direction but what about bi-directional??? I am using Traditional NI-DAQ & VB6Hey Kevin- please email me at gusnati at yahoo dot com

thanks!
gus....
0 Kudos
Message 4 of 4
(3,696 Views)