Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Count digital events

Solved!
Go to solution

Hi,

 

I am learning to use encoder using the LabVIEW. As the first step I tried to run the Count Digital Events vi available in the NI Examples. However, it does not work when I choose the counter direction to be external; I am using BNC 2120 DAQ. The input parameters are: Counter 0; Pulses input connected to PFI 8 and Up/Dn input connected to P0.6. I am using LabVIEW 2009. I will really appreciate any pointers. Thanks.

0 Kudos
Message 1 of 3
(3,538 Views)
Solution
Accepted by airydisk

Hello airydisk,

 

I understand you are just getting started taking measurements from an encoder using NI hardware and software.  I recommend taking a look at the position folder in the NI Example Finder.

pos.png

 

You can start out with the Measure Angular Position.vi example.  I assume you want to configure the B line, which dictates the count direction.  You can do this with a DAQmx Channel Property node.

 

bterm.png

 

If you want to specify P0.6 as the B terminal, you can do so by wiring a string into the property node like so.

 

bterm2.png

 

You can also do this with the simple Count Digital Events.vi like so.

 

count.png

 

If this does not point you in the right direction, please let me know exactly what you mean by "does not work".  I assume that you mean the edges seen on PFI8 are incrementing the count, regardless of the state of the signal on port 0, line 6, but I just want to confirm.  Also, please let me know the model of DAQ card you are using.  You can check this by going to Measurement & Automation Explorer (MAX) and looking under Devices and Interfaces.  Launch MAX from the Start menu by navigating to: Start»Programs»National Instruments»Measurement & Automation Explorer.  You can see that on my system, I have a PCI-6024E.

 

max.png

 

Rod T.
0 Kudos
Message 2 of 3
(3,520 Views)

Thanks Rod.

0 Kudos
Message 3 of 3
(3,449 Views)