We use a PCI-6602 counter/timer card in an automated test fixture.
The software is written for Labwindows/CVI using NI-DAQmx.
Counter 0 is configured as an up/down counter as follows:
SOURCE_0 (PFI_39) on Pin 2 = count input
UP_DOWN_0 (PFI_37) on Pin 40 = direction input
Is there any way, under software control, to reverse the sense of the direction input?
The only way I can think of doing it would be to have one of the DIO lines on the PCI-6602 control some external circuitry to change the sense direction. The 6602 does not allow for this internally.
OK, Thats what I suspected.
We're already using the hardware solution on another channel.
This is an addition that would be easier if it could be done in software.
Thanks much for your input,
The signals originate on a resolver to digital converter and get processed by some logic into count and direction.
We have to use the count and direction signals.
I'm curious, how do you "reverse" the quadrature count direction?
Instead of using the default terminals for the counter inputs, you can use DAQmx properties to specify the terminals to which the A and B signals of the quadrature encoder are connected. By inverting these connections (case in your code), you will get an inverted count direction.
For A input : funtions palette >> Measurement I/O >> DAQmx - Data Acquisition >> DAQmx Channel Property Node >> place on diagram >> Property >> Counter Input >> Position >> A Input >> Terminal