01-10-2006 01:17 PM
01-10-2006 01:18 PM
(part 2 of 2 due to 5000 char limit)
Can I "DAQmx" create virtual ch.vi, Timing.vi, start task.vi only once thru out this 500 msec for each of the 80 ch or 12 cards? Thus saving setup time?
Using that example and my explaintion at the top for my application: Freq of interest: 50 khz. 50 khz x 10 =500 ksamples/sec.......can't do. Beyond the 6225 capability use the max of 250 ksamples/sec. Remember, we're only going to read 1 channel ( by configuration) at a time on EACH BOARD IN EACH SLOT. One waveform is 20 micro secs long. We'd like 2 waveforms=40 micro. 100 samples/250kS/s=400 micro which will give us 20 waveforms. 400 microS* 960 chs=~400 msec . 100 msec less than what I need. Is this reasonable and "do-able"??
The calculations make sense as far as they go, but in real life it is absolutely NOT do-able because you would also need to perform 960 "reprogrammings" (at minimum a call to Stop Task then another to Start Task) in that other 100 msec. I would guess that those are going to actually require something in the order of seconds. If you also have to call Create Virtual Channel or Clear Task, it gets much worse.
The suggestion I gave tried to eliminate the reprogrammings, the tradeoff being that you would have to UNDERsample the data. So far, it still sounds to me like your actual measurement needs may be able to handle the inevitable information loss that comes with undersampling.
-Kevin P.
01-11-2006 07:07 AM
Kevin,
I'm adiment about this because the Lead Engnr on this project was told by National that this could be done. We've also purchased all the hardware. It now appears from all the discussions from all the different Engrs at National it may not be possible. At least w/o some extensive programming from an expert.
01-11-2006 05:54 PM
I had a limited opportunity to do some very crude time-trial testing. I had only 1 DAQ board and a 2 GHz Pentium.
First test was call DAQmx Create Virtual Channel and DAQmx Timing to pre-define 16 tasks (1 for each unique AI channel on the board).
Then I made a double-nested FOR loop. The outer loop ran 60 times, the inner loop ran 16 times per outer loop (once for each pre-defined task), making a total of 960 iterations. The only thing I did in each loop was call DAQmx Start and then DAQmx Stop on the same task. There were no calls to Read or Clear. In your real app you'd be trying to call DAQmx Stop on one task then DAQmx Start on another. There were a total of 16 unique tasks which were each cycled 60 times. On my system this took about 1300 msec.
Better than I had expected, but then I decided to check the effect of overloading the DAQmx driver with lots of separate tasks.
So I tried pre-defining 960 tasks. Since I only have 16 channels, each set of task settings was re-used 60 times. Again, 960 separate tasks in an array, but only 16 unique settings. This time the outer loop ran only 1 time while the inner loop ran 960 times (once for each task). This time my system needed about 11 seconds for all the reprogramming.
Bottom line: avoid all the stopping and starting! You really need a solution where each board has a single 80-channel task that starts just once at the beginning of the program. During all the middle, you can read the data that's being buffered by the hardware and do your evaluations without stopping the tasks.
Now, the fact that your signals will be sine waves at a constant frequency is great news! I'm quite sure now that the UNDERsampling idea should work for you, once I explain it more understandably. Please try reading it carefully again and post back with specific questions where I'm not clear.
-Kevin P.
01-12-2006 05:25 AM
Let me revisit the undersampling and get back to you. Can you check this Discussion Grp periodically ?
Clint E.
01-24-2006 07:04 AM
I've been working with another engineer that has some expertise in DAQ and undersampling. He explained it well enough and gave me a demo that I think the undersampling technique will work. Thanks everyone for your help and patience, although I don't think this is far from over.
Clint Eastwood
01-24-2006 12:13 PM
02-01-2006 08:58 AM
02-01-2006 03:06 PM
02-02-2006 08:56 AM