LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample rate error

Hi everyone!
This is my first massage in this great forum. I'm a beginner in LV so be patient, moreover I apologize for my poor English... Anyway I hope to be clear.
I have to read different signals from different sensors such as pressure sensors and speed sensors. Both of them give to my SCXI module (SCXI-1303) voltage signals. I aquire them with PCI-6220 M series board.
At the beginning I created a task for each signal (using MAX)... They worked properly at the sample rate of 1 KHz only if not running at the same time. I later discovered that more tasks of the same type can't run simultaneously on my board. So I have later created a global channel for each signal and then I have created a new task adding the channel of analog input (voltage type) in it (always using MAX). I chose as sample rate 1KHz as before but now there's an error:

Error -200332 occurred at DAQ Assistant


Possible Reason(s):

Specified sample rate is higher than the fastest rate supported by the device.

Property: SampClk.Rate
Corresponding Value: 1.0 e3

Maximum Value: 480.769231

Why? Where is my mistake?Please help me.
Thank you!!

p.s. I use Labview 8
I love the smell of napalm in the morning
0 Kudos
Message 1 of 8
(4,577 Views)
Well  your error lies in the fact that your board, like you said, cannot sample two channels simulataneously.  Once you get into multiplexing channels (i.e. having more than one channel in a task), your sampling rate drops, as it can only sample each channel so many times per second, and the more channels you add, the less samples you will get per channel.

The good news is, your board is capable of 250 kS/sec so the problem is in your configuration, not a hardware limitation.  Is this going on an RT target?  Maybe a screenshot of your MAX config would help...
0 Kudos
Message 2 of 8
(4,566 Views)

Hi Maverick, 

My suspect is that your difficulties arise from the analog input module in your scxi chassis.

The error you are receiving states that the maximum available rate is 480 Hz.

Maybe you are using some kind of filter and this is limiting your bandwidth.   

Check the manual of your scxi analog module (not the terminal block which is the 1303 as you stated above) you should find something useful in order to get rid of your problem.

 

Kind Regards

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 3 of 8
(4,544 Views)
Hi
Yes yes SCXI-1303 is the external block not the module... ops... my fault.
I missed to say that I use SCXI-1100 module with a 10KHz low-pass filter setting.
Do you think this is the cause of the error message?
I have 4 AI global channels in the task with the error.
Thanks
I love the smell of napalm in the morning
0 Kudos
Message 4 of 8
(4,539 Views)

OK.

This information certainly helps.

As you can see in appendix A page 1 of the 1100 manual the settling time of the 10KHz filter is around 200 us. A little math leads us to 500Hz which is really close to your value. The problem is that the 1100 module has only one filter shared between channels.

This filter needs a bit of time to settle to the correct value while switching from one channel to the other, clearly if you don’t scan between channel you don’t occur in this problem.

I don’t know anything about your application, maybe you can circumvent the problem running one task at a time and closing and opening each task with a ms delay (Typical software time)

 

Kind Regards

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 5 of 8
(4,524 Views)
Excuse me,  
I must go back to my math lessons. 
I lost one zero.
The settling time of 200us leads us to 5KHz, which shared between 4 channel leaves you with a 1250KHz per channel. 
It seems that something else is introducing other delays in your system and brings your bandwidth down to 480 Hz. 
But I hope we are digging in the right direction. 
So let’s try some more math. 
In the Appendix A page 1 we see a settling time of 160us that translates in 6250Hz. 
6250Hz/13 gives exactly your strange number 480.769231Hz. 
So it seems that for some reason your Hw wants to scan between 13 channels. 
Next question is: are your 4 channels contiguous ?
 
Best Regards
FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
Message 6 of 8
(4,512 Views)
Hi
Oh my God... maybe the solution to my problem is not so far...
In that task I have four not contiguous channels of my SCXI-1100 module in slot 4 of my SCXI-1000 chassis:
channel 11: first speed sensor
channel 19: second speed sensor
channel 22: first pressure sensor
channel 23: second pressure sensor
From the first channel of my task to the last one there's 13 channels...
So, is this the reason of my hardware behaviour? Is there a possible solution to this drop of sampling rate? What do you think about it?
Thanks a lot for the suggestions!!

Best regards

I love the smell of napalm in the morning
0 Kudos
Message 7 of 8
(4,499 Views)

BINGO.  The SCXI-1100 can’t perform random scanning. 
Actually your Hw is scanning each channel from 11 to 23 and the daqmx driver discards samples you don’t want to see.
If you bundle together your channels from, let's say, 11 to 14, you should gain back your lost bandwidth.

You should find other information here

http://forums.ni.com/ni/board/message?board.id=170&message.id=7064&requireLogin=False

Kind Regards

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 8 of 8
(4,491 Views)