ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append Waveform, keep time stamp

Solved!
Go to solution

I am reading from a USB module with data acquisition at 500 Hz. In order to achieve this within the loop time, I need to acquire multiple samples per loop. Once I have those samples (output in waveform), is there a way to append the waveform that maintains the time stamps?

 

I am currently using the "get time array", then inserting that data into a shift register of the same. I'd like to re-insert that data into the rest of the appended waveform to make writing the information that much easier. If that doesn't work, I'll probably just stick to making a 2D string array to write the data.

 

Thank you!

0 Kudos
Message 1 of 28
(7,189 Views)

Look for the Append Waveforms VI.  It is in the Waveform->Analog Waveform palette.  I think that does what you are looking for.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 28
(7,178 Views)

I tried the append waveform, but when I do that all dt and timestamp data appears to be removed (dt goes from .002 to 1)

0 Kudos
Message 3 of 28
(7,165 Views)
Please show your code. You are doing something wrong.
0 Kudos
Message 4 of 28
(7,154 Views)

I am using Labview 2014, and have included the .vi and picture.

 

 

Download All
0 Kudos
Message 5 of 28
(7,116 Views)

Here is the picture with timing visible.

Append Waveform

0 Kudos
Message 6 of 28
(7,112 Views)
You have an unitialized shift register. That is why you have the default dt of 1.
0 Kudos
Message 7 of 28
(7,105 Views)

Do I need a seed value for the initialization? A constant doesn't appear to solve the problem. Thank you for your help on this.

 

Appended Waveform example.JPG

 

 

0 Kudos
Message 8 of 28
(7,098 Views)

I'm hoping to be able to be able to keep the t0 data from the first measurement.

0 Kudos
Message 9 of 28
(7,097 Views)

You need the correct dt and t0 in the initalizing constant Leave Y and Attributes empty.  dt and t0 of waveform B are ignored by append waveform and the dt and t0 on the SR will be preserved and propigated through the loop.

Capture.PNG


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 28
(7,082 Views)