Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ Measurement Problems

Solved!
Go to solution

I'm new to LabVIEW and NI products, so please bear with me.

 

Hardware Used:

1x cDAQ 9188

2x NI 9208 input modules

 

Software:

The latest version of LabVIEW

Windows 7 (64 bit)

 

Currently, I'm having a problem getting a high enough sampling rate. My VI is just a while loop that contains two DAQ assistant each producing a signal that gets split and sent to 16 indicators. I have the DAQ assistant set to continuous sampling at 10 hz (with 1 for buffer size). I also put in a timer and a loop counter to see how many iterations it's doing per second. When I run my VI, the loop is iterating at 10 hz, but here is my problem: all the indicators are only updating at about 1 hz!

 

What might be causing this? NI 9208 is supposedly rated at 500 hz (high speed mode) or 50 hz (high resolution mode), what am I doing wrong?

0 Kudos
Message 1 of 4
(3,544 Views)
Solution
Accepted by CarbonPaul

Hi! I've just started using a cDAQ 9188 with an NI 9208 (as discussed in my own latest query), so hopefully I can help.

 

Firstly, could you upload a snapshot of the block diagram you're using?

 

Secondly, are you certain that the NI 9208 is running in high speed mode? If you're building the task programattically (rather than creating it in MAX), there's a specific property node you have to call in order to change it out of its default high resolution mode, and I, at least, found it a bit tricky to find.

 

Remember that the speed of the NI 9208 is measured in samples per second, which are distributed over all of the input channels. If you're reading 16 input channels on one NI 9208, then even in high speed mode, it takes 2 ms per sample, which means 32 ms to collect data from all of the channels, so you'd only get ~ 32 Hz on each channel. In high resolution mode, you'd get about 3 Hz.

 

I think the problem might be the buffer size, however. Why is it set to 1?

 

My advice would be to increase the sampling rate that you set in the DAQ assistant, and either increase the buffer size or let it use the default size (which is based on the sampling rate, I believe).

 

Also, if your loop is iterating at 10 Hz, then try saving a sequential trace of your DAQ Read outputs at each iteration (into a shift register, for example). If your data is only actually changing once per second, then are you getting ten identical DAQ Read outputs in a row? Or are you getting a set of data, and then nine lots of "no data available"? The latter would indicate something to do with your buffer size and sampling method, whereas the former would indicate that the NI 9208 just isn't sampling as quickly as you'd like it to.

0 Kudos
Message 2 of 4
(3,532 Views)

Hello CarbonPaul

 

Thank you for providing that important information right off the bat.  As Optifox suggested, I would look at your buffer size.  As a general rule of thumb, we usually like to set our buffer size to be at least 1/10th of our sampling rate.  This is so that you don't end up running out of memory due to an overflow error.

 

Are you currently receiving any error codes for what is happening on your system?  I also recommend providing the information that Optifox suggested.  This will assist me in assisting you to.

 

Thank you very much for choosing Natural Instruments!

 

Greg S.

Sincerely,

Greg S.
0 Kudos
Message 3 of 4
(3,520 Views)

I was in high resolution mode. I just needed to switch it to high frequency mode. Now I'm getting the correct sample rate. Thanks.

0 Kudos
Message 4 of 4
(3,480 Views)