From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send waveform data between loops?

Hello,

 

I'm trying to write a programm, that in one thread aquire signal, send the data to other loop, which parallely process the signal.

 

My queues are not working due to not sending the complete qunks between the loops. Only two values are sent.

 

What am I doing wrong?

 

Thanks for help. The sample code is below

0 Kudos
Message 1 of 7
(3,036 Views)

Have you tried to simplify your code?  What happens if you remove the Queue and just run the Producer (top) loop by itself, maybe with a Stop wired to the Stop Indicator of the While Loop?  [Make a copy of your VI, then ruthlessly edit the copy, deleting everything you don't need for the test.  It will help you follow your own code if you work real hard at keeping your wires straight.  Do you know about the Diagram Cleanup Tool (which I dislike and never use, but I make my wires straight from the beginning)?  It does wonders for your code ...

 

Bob Schor

0 Kudos
Message 2 of 7
(3,001 Views)

Hi Ola.dysko,

 

 

                            I have checked your code, and it seems that the Queues are working just fine.  You did set 2 channels with 5000 samples for each, therefore the function "Sound Input Read.vi" will return at each iteration 2 waveforms with 5000 samples each ( so basically, the "2 values " that you have mentioned are in fact 2 waveforms ).  If you place a Waveform Graph in the processing loop, and wire it to the Queue data, you will see all your values. 

 

Regards,

 

Denis  

0 Kudos
Message 3 of 7
(2,979 Views)

Why do you convert the Waveform to dynamic?



Remember Cunningham's Law
0 Kudos
Message 4 of 7
(2,955 Views)

@PeterFoerster wrote:

Why do you convert the Waveform to dynamic?


I would also argue why even 2 graphs.  But if you really want 2 graphs, then a simple Index Array would have done the job.  We expect more from NI responders.


GCentral
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
0 Kudos
Message 5 of 7
(2,942 Views)

@crossrulz wrote:
 We expect more from NI responders.

I'm not sure I follow. Do you mean I should not have posted earlier? I just wanted to understand the thought process behind it.



Remember Cunningham's Law
0 Kudos
Message 6 of 7
(2,936 Views)

@PeterFoerster wrote:

crossrulz wrote:  We expect more from NI responders.

I'm not sure I follow. Do you mean I should not have posted earlier? I just wanted to understand the thought process behind it.


Notice @DStavilaNI's badge.  It is blue, meaning they work for NI.  You did nothing wrong.  I was just adding to your comment about the converting to the horrible Dynamic Data Type.


GCentral
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
0 Kudos
Message 7 of 7
(2,933 Views)