03-14-2012 06:29 PM
Hi All,
Gumby question today, but I am getting frustrated by error messages telling me that my program is trying to read data that isn't there, or trying to read data that is no longer available.
I am reading voltage outputs from 1-4 pressure transducers. I would like to set up my code to read 10 samples at 10,000 samples/second, so that each read takes 1ms. I would like to create the tasks, set up timing parameters, and start each task when I start each test. After that, I would like to read 10 samples at 10,000 samples/second during each subsequent while loop iteration.
Seems simple, but like I said, I keep getting errors.
Any help would be greatly appreciated.
Thanks!
03-14-2012 06:36 PM
03-14-2012 06:40 PM
I didn't attach my error codes because I thought I was asking a very simple question. Apologies if this is more complicated than I realized.
I just want to read 10 samples at 10K samples/second from all my AI channels on each iteration of a while loop, and I want the code to run as quickly as possible. How should I write code to do that?
03-14-2012 07:05 PM
03-14-2012 07:23 PM
OK. Let me start again.
Please consider me a rank, groveling LabVIEW novice.  I have searched the examples, but have not been able to find any code that shows me how to read analog voltage measurements in each iteration of a while loop, reading 10 samples on one channel at a rate of 10K samples/second during each iteration.  I would like to minimize the loop time, so I would like the code to run as quickly as possible.
If anyone can point me to suitable example code, or offer suggestions as to how I might begin writing such code, I would appreciate it greatly.
I have not written any significant code in this matter, because I don't know where to begin.
Thank you very much for your help.
03-14-2012 07:39 PM
Although I really am treading in unknown waters here, I have tried to create some sample code showing what I want to do.
Here is a basic block of code. Are there values I could plug into the controls shown which would result in my DAQ unit (USB 6211) taking 10 samples during each iteration of the while loop at 10K samples/second? If so, please let me know what they are. If not, please help me understand how I need to change my code.
Many thanks!
03-14-2012 08:07 PM
03-15-2012 04:00 AM - edited 03-15-2012 04:03 AM
Hi,
As long as your sample mode is set to "Continous Samples" then your while loop should measure the number of samples you specify on your read VI.
Also if you want continous sampling you should get rid of the wait VI in your while loop.
-CC