Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the proper way to set up an encoder on an Elvis prototyping board with Labview 2010?

I am using a PCI-6024E with an Elvis I and MCU Project Board. I've tried using the quadratureencoderm-series.vi as well as experimenting with the counter channels in the Measurement and Automation Explorer; however I have been unable to find the proper channels to read the data from this encoder. I'm having trouble configuring the counter to work properly. Can anyone tell me which pins I should be connecting the encoder signals to? I've attached a datasheet for the motor and the encoder. Any help would be appreciated.

0 Kudos
Message 1 of 8
(6,334 Views)

After looking at the quadratureencoderm-series.vi, it looks like it is aimed at M or X series cards and your DAQ card is an E series (older, legacy).  We have some documentation geared specifically towards encoders with E-series cards like yours that might be useful for you. This is where I would start:

 

http://zone.ni.com/devzone/cda/tut/p/id/4623

National Instruments
0 Kudos
Message 2 of 8
(6,318 Views)

Thanks! That looks like it shoudl fix things. Is there anything special that I would need to do since I'm using an Elvis and prototyping board? I assume the pin names written on the prototyping board are the same as what's being read by the PCI card?

0 Kudos
Message 3 of 8
(6,313 Views)

Looking at the Elvis prototyping board there are two counters. CTR0 and CTR1; however, each of them only has an OUT, GATE, and SOURCE. So far all of the tutorials refer to counters having either A and B inputs or SOURCE and UP/DOWN. Is the prototyping board for the Elvis compatible with quadrature encoders? Thanks again.

0 Kudos
Message 4 of 8
(6,310 Views)

Have you seen this KnowledgeBase Article?  It details using a quadrature encoder with an E-series card and a NI elvis. There is an example at the bottom of the article as well.

 

http://digital.ni.com/public.nsf/allkb/4B5F127B479B7FB886256D9C008290B3?OpenDocument

National Instruments
0 Kudos
Message 5 of 8
(6,302 Views)

When I try to load Quad Encoder with NI ELVIS.vi the vis listed below are missing. I did a search for them and no luck. 

 

Counter Control.vi

Counter Get Attribute.vi

Counter Set Attribute.vi

Counter Group Config.vi

 

Is there anywhere I can go to download these vis or is there a more current encoder tutorial? Thanks again. You've been very helpful.

0 Kudos
Message 6 of 8
(6,296 Views)

Hi jns0086,

 

I see your problem.  I believe that example was written using Traditional DAQ, a set of drivers and functions that have since been replaced by DAQmx. What version of LabVIEW and Windows are you using?  There are some compatibility issues depending on your version on LabVIEW and your operating system.

 

In the meantime, if you have everything connected properly, you should be able to count your edges using one of the built-in LabVIEW examples.  Go to Help>Example Finder and then browse for Hardware Input and Output > DAQmx > Counter Measurements > Count Digital Events > Count Digital Events.vi.  See if that helps.

 

Have a great day,

 

Chris

Applications Engineering

Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(6,286 Views)

Thanks Chris. I'll give that a shot.

 

Right now we're using Labview 2010 with Windows 7.

0 Kudos
Message 8 of 8
(6,277 Views)