05-21-2009 02:49 PM
Hi-
I am working with an application to record some analog voltage data using the DAQ and measurement studio. I wanted to ask some general questions on how to attack the problem as opposed to hacking out some sloppy code.
I will likely be recording sessions of up to an hour with DAQ acquisition at 100hz. Is it best practice to define my buffer as a very large array at the start of the acquisition session and then just keep filling that array as the data recording progresses? Is there a more efficient way to acquire the samples from the daq every tenth of a second, yet display multiple seconds on my plot other than manually recording the previous acquisitions then generating a waveform/waveformplot from previous daq waveform samples?
Also, when plotting multiple plots on the same waveform, how can you change the color of the lines? I can set one line color using the waveformplot option, however I can't figure out how to update the other two plot line colors. Thanks in advance-
05-22-2009 05:18 AM
Hi RS9,
Good Morning and I hope your well today.
Thanks for the post.
Have you seen the following example?
Measurement Studio Analog Input: Acquiring and Logging Data in Visual Basic
Or studied any of the analog examples which install with the DAQ driver?
I would recommend not storing all the Data that you acquire in LabVIEW in an array will require one continous block of memory, at there is a limit to how large this can be. For your application you may be ok, 3600 seconds (1 hour) x 100 Hz (rate) = 360k Samples. I would recommend logging these to a measurement file, text file as per the example above in-order to perform post anylsis.. or further anylsis by reading a chunk from the file (or before you save it).
You can alter the history of the chart & the amount of data it displays by altering the properties and methods for the chart, are you familiar with this? Same for the plot line colours, there should be a property for that line object.. please let me know if you need further support.
Hope this helps,