LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQ question

Hello everyone, I have a question regarding a DAQ I'm using for a project I'm doing. I'm using a NI DAQpad 6251 and I need to connect 5 analog signals and a counter to the device. I want to take as many samples per second as possible. Regarding the counter, I don't understand how it works. Does it use an interrupt to tell you that's count has been received? Is it possible for the DAQ to do the counting for you and then pull the total count when needed hence taking very little bandwidth?

0 Kudos
Message 1 of 4
(745 Views)

Hi eton,

 


@etonsrawi wrote:

I'm using a NI DAQpad 6251 and I need to connect 5 analog signals and a counter to the device. I want to take as many samples per second as possible. 

Is it possible for the DAQ to do the counting for you and then pull the total count when needed hence taking very little bandwidth?


Yes, that's possible!

Did you examine the DAQmx example VIs coming with LabVIEW?

They explain how to use AI channels and counter inputs!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(735 Views)

In addition to @GerdW's excellent suggestion, there are some good DAQmx Tutorials on the Web from NI and others.  Try doing a search for "Learn DAQmx" or "DAQmx Tutorial".

 

The "Examples that ship with LabVIEW" tend to be "one VI that can do almost everything, 90% of which you won't use", while the Tutorials often focus on "How to do one (simple) thing", and depend on you to put the "things you want to do" together.  I, personally, prefer the latter method, but that might be because I started out with a "do Everything" piece of code that was totally undocumented and a pain to figure out.

 

Bob Schor

0 Kudos
Message 3 of 4
(674 Views)

Here's a great place to start:  Getting Started with NI-DAQmx - NI

 

Look carefully at the Field Wiring links if you are trying to collect multiple signals at high sample rates.  There are tricks to help the multiplexor switch quickly without corrupting your signals, but it takes some effort and forethought on your part.

 

Skip all the DAQ Assistant stuff.  Real DAQmx isn't that hard to learn and what you are describing needs to coded properly.

 

Of course, the manual has some great info too:  M Series User Manual - NI

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 4
(667 Views)