LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot get waveform Graph to show plot


@cbutcher wrote:

Sorry - got it. So, the relevant point is that the Append Waveforms VI doesn't pay any attention to the time stamp - it just concatenates the waveforms provided dt is the same. You can see this in the detailed help, when it says: "The trigger time of waveform B is ignored."

 

The shift register is uninitialized in my previous snippet so on subsequent runs it doesn't do exactly what you want anyway. You should change this to use an empty waveform (you can right-click on the left shift register icon and click create constant) and then you need a way to set the t0 according to your first sample.

 

The simplest way I thought of to do this is simply to check if the loop's 'i' indictor (the iteration number) is equal to zero (there's a primitive for this) and then wire that to a case structure. In the true case, read the t0 of the waveform you create using 'Get Waveform Components', and then use 'Build Waveform' on the waveform wired from the shift register to set t0. Do this before the 'Append Waveform' VI. In the false case, just wire the shift register wire straight through.

 

readt0.png

 

 


I tried this solution, now the starting time is correct, thanks a lot!

I still have an issue though, it seems Delta X might have been wrong, because the readings where in a time span between 8:48:06 to 8:49:15, and while it takes the starting time correctly, due to dt, it says the reading ends at around 10:00:00. I checked the file and it seems like the dt of the readings, is around 0.01, so I tried usind that as a constant, but still the time doesn't fit.

I'm guessing the file i'm generating is wrong or maybe i'm missing something else since my experience to LabView is limited to 3 days so far haha.

 

Haven't been able to test the TDMS method, I will try getting it today.

 

Thanks again!

0 Kudos
Message 11 of 11
(618 Views)