Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming quadrature encoder

I'm trying to program a incremental optical encoder with nidaqmx 7.4, with C#, using the PCI-6071e card. I want to measure position, velocity, and acceleration.

As per the "How Do I Use a Quadrature Encoder with My Data Acquisition Board?" document, channel A of the encoder is connected to ctr0_source, channel B is connected to DIO6, and index is connected to ctr1_source.

I'm trying to run the the MeasAngularPositionBuffered_Cont_ExtClk example. However, an exception is thrown when calling myTask.CIChannels.CreateAngularEncoderChannel.

The messagebox says "Selected physical channel does not support the measurement type required by the virtual channel you are creating. Create a channel of measurement type that is supported by the physical channel, or select a physical channel that supports the measurement type"

Also, there is an option in the example program to enable the Z index. How does that program know which channel to read the index pulse?

I'm new at data acqusition, so any other hints regarding optical encoders are appreciated.

Thanks,

Gerry
0 Kudos
Message 1 of 4
(4,024 Views)
I found the example you're using Gerry, and I'll look into this for you this afternoon.

Message Edited by Support on 04-26-2005 12:25 PM

0 Kudos
Message 2 of 4
(4,013 Views)
Gerry,

To do position measurements (and therefore run that example) you would need an M Series or TIO card. You can read more about it in the DAQmx Help file if you search under "position."

This is under C:\Program Files\National Instruments\NI DAQ\DAQmx Help
0 Kudos
Message 3 of 4
(4,002 Views)
You also may be able to measure position using the "Count Edges" measurement with an external direction control. This may be enough for your purposes. Just bear in mind that quadrature encoders typically give off noisy signals, so you might have to build an external circuit to clean up the input signals. Let me know if you need more information on doing this with your E Series device.

gus....
0 Kudos
Message 4 of 4
(3,997 Views)