LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring continuous waveform data

I have written a LabVIEW device driver for a piece of non-NI hardware.  I am mimicking the DAQmx drivers as closely as possible.  My Read VI outputs an array of waveform data for the 8 channels on the device.  Since I get an array of doubles from the low level device driver, I build the waveform as follows:

 

1.)  Get the current time, the # of samples acquired, and the data acquisition rate

2.)  Divide the # of samples by the acquisition rate, which gives me the acquisition duration

3.)  Subtract the acquisition duration from the current time to get t0

4.)  Take the inverse of the acquisition rate to get dt

 

The problem I'm having with this approach is that there seems to be some overlapping between samples with regard to the timestamps.  If I wire these values in to a chart, the chart is continuously refreshed and all previous data is no longer displayed.  I really would like it if each new iteration of waveforms was a perfect continuation of the previous iteration.

 

Does anyone have some experience with this kind of problem and could give me feedback?

0 Kudos
Message 1 of 2
(2,319 Views)

Hello,

 

I have looked into the chart indicators in Labview. If you use a waveform chart there are 3 settings that you must configure. You need to set your desired chart history length, have x-axis auto scaling enabled, and select the desired update mode. Also, if you do not have auto scaling enabled, it will appear that all the data is being overwritten.

 

In regards to your overlapping samples, would you be able to post a screenshot of the chart?

 

Eric

Eric Liauw
Senior AE Specialist - Automated Test | CLD | CTA
National Instruments
0 Kudos
Message 2 of 2
(2,290 Views)