11-09-2010 02:29 AM
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.
Solved! Go to Solution.
11-09-2010 06:43 PM
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.
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.
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.
You can also do this with the simple Count Digital Events.vi like so.
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.
11-23-2010 03:59 AM
Thanks Rod.