Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect output of a while-loop to input of the other while-loop

Hi!
I'm trying  to design active noise canceller, which was worked on CDAQ-9172  , under cRIO 9004.
So, I checked  data transmission from my host computer  via FPGA trarget of cRIO9004.
My LabVIEW consists of two part.
The first one is while loop, which  read  data from analog module of 9215 via FPGA trarget of cRIO9004.
It's working and good.
The problem is the second part of while-loop.
 I mean to transmit the data of the first while-loop to input port of the second while-loop.
When I cheked it , the data is not transmitted from  the first while-loop to the second while-loop.
It's a reasonable ,considering a feature of while loop.
But, I want to built  a continuous data as a waveforms in  the second while-loop  from four data of NI9215 afetr sending  data of the first while-loop to input port of the second while-loop.
I checked several examples and documents for it and  could not any information about this case.
Please let me make it.
Sincerely.
 
Jason
0 Kudos
Message 1 of 4
(3,734 Views)
Hi,

Can you also post the FPGA VI ?

Thanks!
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,718 Views)
Hi!
Thanks for your reply.
I attach a AI_4ch_AO2ch of  the FPGA VI.
 
 
Jason Lee
0 Kudos
Message 3 of 4
(3,715 Views)
Hi Jasonlui,

Are you trying to pass data from one loop to the other one SIMULTANEOUSLY? If so, then you cannot accomplish this by simply wiring the output tunnel from  one loop into the input of the the other one. The way tunnels work  is that they store all the information comming into them, and only output it once the loop has finished iterating. Since in your case the loop is running continuosly, no data is actually coming out of the tunnel.

You can accomplish what you are trying to do in one of two ways. You can either use Queues or you can use Local Variables. Please look at the VI attached for an example of how each works.

I have save it for LV 8.5 please let me know if you need a previous version.
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(3,691 Views)