LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Count up and down with PCI-660x

Hi,
I´m trying to count events up and down, controlled by a second line (UP_DOWN). I use a LS7084 from LSI, wich decodes the signal from a quadratur encoder. The encoder has two outputs, clock and up_down. The board is a PCI-6601 and the Software is Labview 7.0.
I´ve got the problem, that all counters always just count up, but I need one which counts up or down, controlled by the UP_DOWN line. On HIGH, the counter should count up, on LOW down. Did anybody know how to configurate the board for counting up and down?
Did anybody has developed a functional VI that solve my problem?
Thanks for help!
Greetings from Germany
Björn
0 Kudos
Message 1 of 2
(2,636 Views)
Two possible answers for you, based on traditional NI-DAQ. Either should work, though I'd recommend #2 unless there's a specific reason you need to do #1.

1. Add a call to 'Counter Set Attribute.vi' to the configuration chain. The attribute and the attribute value type should be 'up down' and 'hardware' to specify hardware control of count direction.
For this to work, the call to 'Counter Group Config' should specify 'event counting', not 'position measurement.' Note that this prevents you from using the encoder's z-index pulse (if it has one) to hardware reset the count value.

2. Bypass the LS7084 and feed the quadrature A&B signals directly to your counter (assuming they are already TTL compatible). Your 6601 is designed to interface di
rectly to quadrature signals. They just need to be wired to the counter's default Source and Up/Down pins.
With this method, your call to 'Counter Group Config' should specify 'position measurement'. There's a handy config vi under the examples directory (look for something like "examples\daq\counter\ni_tio.llb") with a name like 'Counter Encoder (NI-TIO).vi' that'll help you configure for direct encoder position measurement.
This method can also allow you to hardware reset your count value on a z-index pulse (wired to the counter's default Gate input).
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 2
(2,636 Views)