Discussion:
Append waveform does not keep the time stamp after 1st waveform
(too old to reply)
BenBabb
2008-08-14 20:40:10 UTC
Permalink
Hello all,I am using a PXI-6225 to acquire a data over 60s.  I have my rate set to 100Ks/s and the samples per channel to 50K.  I am measuring two inputs.  The problem I am having is with append waveform.vi.  The first acquisition has the right time stamp, but after the first append operation the d0 is set the same for all waveforms so my data won't graph correctly, it basically gets overlaid on top of the previous waveform. Is there any way that I can extract the time stamp value that corresponds to the Y value from the waveform data type?  What I would like to happen is have all the waveforms that I acquire append in order with the time stamps not changing for each waveform I try to append.Thanks in advance,Ben
BrowningG
2008-08-15 19:40:22 UTC
Permalink
Hello Ben, 
I am assuming that you are performing a continuous acquisition to get your data.&nbsp; Let me know if this isn&rsquo;t the case.&nbsp; This <a href="http://digital.ni.com/public.nsf/allkb/5D42CCB17A70A06686256DBA007C5EEA?OpenDocument" target="_blank">knowledgebase</a> describes some of the behavior that occurs when DAQmx creates a timestamp for its data.&nbsp; If you double-click on the Append Waveform VI from the block diagram, you can see how this subVI operates (I have included an image of it here).&nbsp;
<img src="Loading Image..." border="0"> Basically it gets the Y data from waveform B and adds it to the end of the Y data from waveform A.&nbsp; As a result, it keeps the timestamp from waveform A to become the timestamp from waveform B.&nbsp; This function will only output a single waveform.&nbsp; So, if you are continuously acquiring data for 60 seconds, the sample clock for the task is always running.&nbsp; In this case the data is continuous so only one timestamp is needed (the timestamp from the first read) and your data will still be correct.&nbsp; Make sure the later waveform (the one with the later timestamp) is the input for B.&nbsp; This will place the new data after the old data. &nbsp;This way the data will appear to start at the first read&rsquo;s timestamp and continue for the next 60 seconds.&nbsp; Post back if you have any questions.&nbsp; Message Edited by BrowningG on 08-15-2008 02:29 PM


AppendWaveform.gif:
http://forums.ni.com/ni/attachments/ni/250/42392/2/AppendWaveform.gif
Loading...