Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

2 while loops

I am using one while loop to acquire current  from a motor controller . I am using a second while loop to move the motor by sending commands to it.

I want to use the current data in the first loop and send it to the second loop for processing .

 

How do i send this data to the second while loop ?

0 Kudos
Message 1 of 2
(2,657 Views)

Hi,

 

Thanks for the post and I hope your well today.

 

You have two options:

 

1) Use variables - this method is good for control signals (such as stop etc) but not great for avoiding loss of data.

 

2) Using queues you can store data in a buffer, and then 'get' the data back as and when you want it in the 2nd loop. For more info on queues, please look in the LabVIEW example finder, Help>>Find Examples>> Search 'queues' and take a look at Queue Basics.vi. 

 

I hope this helps to get you started!

 

Kind Regards,
James.

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 2
(2,656 Views)