Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchrononous measurement of 3 encoder positions and analog signal

Hi--

I'm working on a project in which I need to collect data from 3 encoders (via 3 counters) and 1 analog signal synchronously.  I was hoping to get some high-level guidance here on the best approach.

 

I was contemplating using the internal clock to trigger measurements from the 4 sources.  My questions are the following:

  • what would be the best practice for this kind of data acquisition?
  • are there any good counter/analog examples that people can point me to?  I'm developing in VB but any text examples would be helpful.
  • is there a way to run a single task to read all 3 counters?  the way i've implemented it right now is with 3 separate tasks.  it works, but i worry about synchronicity at higher sampling rates.

Any assistance would be greatly appreciated.

Thanks!

Sandheep

0 Kudos
Message 1 of 3
(2,110 Views)

Hi sandheep,

 

Strategies for synchronizing DAQmx tasks can be found here: http://www.ni.com/tutorial/5376/en/

 

The only strategy that won't work for your application is sharing a single task for all three channels.  You can't put different channel types in the same task, and in fact, you can only have one counter per task as well.  Otherwise you can use any of the examples from that tutorial as a starting point.

 

The pictures on that page are snippets, and can be dragged and dropped into LabVIEW to automatically copy the code.

 

Thanks,

Michael B.
Product Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,076 Views)

Michael--

 

Thanks for the response--I think that maybe the "if it ain't broke don't fix it" approach might apply well here. 

 

Thanks!

Sandheep

0 Kudos
Message 3 of 3
(2,073 Views)