PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire, display, and write data at 50 samples per second

I have a vi running on a PXI which samples data using two 4220's (all 4 channels) and one 6031 (only 6channels).  I am acquiring data at 100 samples per second, but only need to write the data out at 50 samples per second.  The data needs to be displayed at a minimum of 10samples per second.  The problem is that the VI can not get 50samples per second writen to the file, it writes about 20 to 30samples per second.
I dont know if the issue is displaying the data which is holding up the writing at 50samples per second or if it is something else in the VI.  I have moved the writing of the data to the outside of the while loop, but this did not help enough to reach 50samples/sec.
 
Is it better to change the waveform data types to dynamic waveforms?  Would this increase speed of operations?
 
Galen
 
0 Kudos
Message 1 of 2
(2,577 Views)

Galen,

Looking at your vi, I would recommend writing to your file in a different way.  The function you are using is actually opening, writing, and then closing the file every time you call it.  This greatly increases the amount of resources being used.  Take a look at the Cont Acq to Spreadsheet File.vi example and note that the file is only being opened and closed once.  The data is being written to the file during execution of the program, and then closed when the app is done running.  The example is done in traditional DAQ but you should be able to do something similar with DAQmx.  Try this and let me know if it helps. 

Regards,

LA

0 Kudos
Message 2 of 2
(2,564 Views)