From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Pass Data between while loops

Solved!
Go to solution

Hi,
I've two loops and just need to pass some values (say 3-4 values) from main loop to secondary loop only once. What is the best way to do it? 
Thanks in advance.

0 Kudos
Message 1 of 4
(3,119 Views)
Solution
Accepted by topic author PadmanabanJ

Hi Padma,

 

use locals, globals, notifier, channels, ...

Put those items in a (typedefined) cluster to ease handling.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,107 Views)

How about using Queues?

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 4
(3,094 Views)

@PadmanabanJ wrote:

I've two loops and just need to pass some values (say 3-4 values) from main loop to secondary loop only once. What is the best way to do it?


Please define "only once".  Do you want the second loop to just use the latest value for a variable(s) that the first loop wrote or do you want to send a message to the second loop to update some state information?  In the first scenario, I would use global variables.  In the second scenario, I would use a Queue or User Event.


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 4 of 4
(3,085 Views)