LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to queue two waveforms in dynamic data

I am collecting two waveforms of voltage data via a DAQ assistant. The output is dynamic data which I can view as two waveforms via a chart. 
 
I am sending the retrived data to a queue for storage until a seperate loop can flush the queue and write the data to a measurement file via the Write to Measurement File vi.
 
When I retrive my measurement file only one of the two waveforms have been stored.
 
I have troubleshot the issue and have determined the correct data is going into the queue but only one waveform is being flushed from the queue.
 
Does anyone have any ideas on how to accomplish this?
 
Thanks,


Message Edited by John@Saft on 01-31-2008 09:00 AM
0 Kudos
Message 1 of 9
(6,844 Views)
0 Kudos
Message 2 of 9
(6,833 Views)
Attached is a modified example that shows my issue.
 
There are two signals being sent to the Queue but I can only get one out via the Flush Queue.
 
Thanks,
0 Kudos
Message 3 of 9
(6,829 Views)
Hi John,
you only insert one element into the queue, so you can remove only one. i change your example and hope it helps you.
Mike
0 Kudos
Message 4 of 9
(6,818 Views)
I would recommend a dequeue operation rather than a flush queue operation in the lower loop.  What are you trying to do in the lower loop?
 
There is a 1-D array of dynamic data going into a For loop (array of remaining elements in queue) assume that only one item is in the array, that means the for loop will only run once due to autoindexing.  The shift register is uninitialized so it will either be empty or have data left over from the last iteration.  It runs once so i is equal to 0.  So the one element of dynamic data gets converted to a waveform.  I don't know how that mini Express VI for dynamic to waveform handles a conversion where there are multiple signals in the dynamic data type.  There is a lot of mystery behind the dynamic datatype.  Express VI's create them, but most people on the forums really don't know what is going on in the background with them.
 
I the conversion from dynamic data to waveform is only taking the first waveform.  If you double click on that you see the output is single waveform.  You may want to change it to 1-D array of waveforms.  Then I think you'll get both.  Then you can manipulate them as needed.
0 Kudos
Message 5 of 9
(6,817 Views)


MikeS81 wrote:
Hi John,
you only insert one element into the queue, so you can remove only one. i change your example and hope it helps you.
Mike


Yes, but that one element he sends is a dynamic data type that contains both signals.  So the real question is what does he want to do with those two signals in the end.  That will affect the code in the lower loop, and how he passes those signals to the lower loop through the queue.
0 Kudos
Message 6 of 9
(6,814 Views)

My final goal is to write the waveform data for both signals  to a measurement file via the Write To Measurement File vi.

 

Thanks,

0 Kudos
Message 7 of 9
(6,805 Views)
I still don't understand the purpose of the conversion to waveforms and appending, then back to dynamic data.
 
Why not do this?  See attached.
Message 8 of 9
(6,794 Views)
THANKS ALL,
 
The sample provided by Ravens Fan worked great.
 
I will take this example and incorporate into my working code and see if it will work.
 
 
Thanks to all.
0 Kudos
Message 9 of 9
(6,786 Views)