01-24-2013 08:26 AM
Hii,
In our program we are filling a queue with data from *.tdms file (each 40 samples are entered to the queue (as element))all the time until stop button is pushed.
when 10 secs are passed we want all the data from the queue to analyze and plot. It seems we get when using "get queue status" (which gives as an output all elements in the current status) we get all the elements and 1D waveform, when plotting it it plots each element in different color (that is one problem), and we cannot analyze it (for example finding threshold, averaging or whatever (second problem) , because it is not waveform.
trying to solve this problem we have searched much in NI forums but found nothing.
We need your help urgently!
01-24-2013 08:36 AM
Hi Hanan,
cleaning up a block diagram is not your favorite task, isn't it? 😄
Well, GetQueueStatus isn't the preferred way to read ("Dequeue") queue elements: you get back an array of cluster of elements. You have to re-sort your elements to get back your (probably intended) array of elements...
01-24-2013 08:40 AM
Indeed, the get q stauts returns an array of element, in your case an array of waveform and when you feed this into a waveform graph it give one plot per element in the array, which of course doent help you.
So you need to concatenate all the waveform chunks, there is a VI for that in the waveform palette, here's one way of doing it :
hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
01-24-2013 08:45 AM
GerdW , Thanks for your quick response.
How should we do so?
And if you have a better way to get back our data from these elements (we will need to get back a waveform with size of "#elements x 40 samples"), please share it with us.
Thanks in advance,
Hanan
01-24-2013 08:48 AM
Yes we thought about that, but we don`t want to "dequeue" the elemnts, we want to keep them.
01-24-2013 08:50 AM
01-24-2013 08:59 AM
Yep, just mix you code and my example, feed the 1D array of waveform you can from the get Q statue to index on the for loop and you're done.
Good luck
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
01-24-2013 09:43 AM
Hi again.
But the suggested example uses "dequeue", and we don`t want that.
Please find attached an example we have modified to explain our problem.
In the example you can see both graphs : the white one (the result of using dequeue) is the needed result, the second graph (full of colors) is what we get when we don`t use dequeue (1D of waveform instead of waveform).
Thanks,
Hanan
01-24-2013 09:47 AM
01-24-2013 09:56 AM
Oh maybe you ment that the problem can be solved by deleting the :"dequeue" from the loop?
because in that way it works.
Thanks for your help team (in israel and in the USA)
Hanan 🙂