Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple AI-multiple AO- Synchronization-2 while loops

Solved!
Go to solution

Hi all,

 I want to characterize my RF circuit using an extra control board and PXI-6229 card.I have written a simple VI in Labview, which is almost similar to the example, multiple-AI-AO-Synchronization, given in LABVIEW. According to my VI, 4 analog outputs with different dc-offsets, amplitudes and phase values should be generated for my RF circuit and 2 analog inputs should be acquired by this circuit simultaneously and continuously. But the problem at my VI is that I try to observe two diagrams at the same time in order to see the changes at the generated and acquired signals. However, I cannot see both signals simultaneously. The second while loop, which belongs to the acquisition of analog signals, does not start whereas the first loop generates the analog signals continuously. How can I  synchronize these two while loops in order to observe both sides in the diagrams?

I attached my VI.

 

Thanks in advance.

 

Eray T.

 

0 Kudos
Message 1 of 3
(3,277 Views)
Solution
Accepted by topic author Ali Eray

Hi Eray,

 

I will be brief and I will keep it simple. If i understand, you struggle with dataflow in LabVIEW. While working in LabVIEW, you should understand the order in which blocks (nodes/functions/structers) are executed in LabVIEW - dataflow. Each block can be executed just when it has values on each input. This means, that if 2 blocks are connected with wire, the 2nd block waits till the first finishes execution.

 

In your case it means, that 2nd loop can't run before the first loop (with DAQ Assistant) finishes its execution, because the wires comes from inside of the first loop, then they go to some DAQmx functions, and then from DAQmx functions they go to 2nd loop.

 

In principle, what you could do is to put the content of the first loop, where you prepare the signal to be generated into the 2nd loop. Of course without DAQ Assistant. Instead of it, you can use DAQmx write within the 2nd loop.

 

 

Regards,

Martin

Certified-LabVIEW-Developer_rgb.jpg

Message 2 of 3
(3,272 Views)

Hi Martin,

I exactly did what u recommended. I took the DAQ Assistant out of my design and erased the first while loop needed for the generation of analog outputs while keeping the second one same. It works perfectly! Thank you for your advice!

Greetings,

Eray T.

0 Kudos
Message 3 of 3
(3,234 Views)