From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6602 up-down counter direction

Hi,
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

 

Question:
Is there any way, under software control, to reverse the sense of the direction input?

 

Thanks,
Kirk Mitchell
Project Engineer

0 Kudos
Message 1 of 6
(4,825 Views)

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.

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 2 of 6
(4,809 Views)

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.

Oh well.

Thanks much for your input,

Kirk

0 Kudos
Message 3 of 6
(4,779 Views)
What are the signals ? I think there is a software solution if they were quadrature signals (eg A and B channels of a quadrature encoder).
0 Kudos
Message 4 of 6
(4,771 Views)

  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?

Thanks,

Kirk 

 

0 Kudos
Message 5 of 6
(4,763 Views)

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

0 Kudos
Message 6 of 6
(4,741 Views)