LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Appending waveforms and dt

Greetings.

I have a program that samples an AI source at 372 Hz and streams the data to disk as chunks of waveforms (I am displaying the collected data at the same time). I have a seperate application that reads this data back from the file in order to perform some analysis and display it. I am using the LabVIEW Datalog file format.

Reading the data: I have a While loop that runs through the file reading chunks of waveform data. Each chunk is appended to the previous piece in order to create one big waveform that I can plot to an XY Graph (I am using the XY graph in order to allow the user to zoom in on data easily).

The problem: The resulting complete waveform has the wrong dt values; this screws up the display of the time scale of the graph completely. I checked each waveform as it was being read from the disk and they are all correct -- 0.0028 s (Note: I do get this warning: dt values not equal in Append Waveforms.VI. I believe that warning occurs because Append Waveforms is comparing doubles.) However, the complete waveform has a dt value of 1 s!

Any thoughts as to way dt is being changed on me or how to make it not change?

I am using LabVIEW 6.1.

Dennis Jackson
0 Kudos
Message 1 of 3
(3,271 Views)
A morning of frustrations, finally a post to the forums, and then the answer appears. Sometimes you just need to think outloud.

The solution:

I use a shift register to pass the appended waveform back around the while loop. On the first iteration of the loop, I set t0 to the value of the first waveform read from disk but did not set dt. The time scale and my post-processed data looks perfect now!

Dennis
0 Kudos
Message 2 of 3
(3,266 Views)

Hi Dennis!

 

I seem to have come across a similar problem. If you would be kind enough to click the following link and check out:

 

http://forums.ni.com/t5/LabVIEW/How-to-generate-an-analog-biphasic-single-pulse/m-p/1185189

 

I seem to be having appending two waveforms with different dt values. I tried to understand what you said but is there a way you can put up a screenshot of your block diagram?

 

Thanks in advance,

Upol

0 Kudos
Message 3 of 3
(2,917 Views)