LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the execution of multiple while loops

Highlighted

Hi,

In my project i have three while loops.:

Loop #1 is working as 'Main'
Loop #2 is for Yokogawa power analyser

Loop #3 is for  UV radiometer

I frequently notice that Loop#2 does not execute:

yokogawa_loop.jpg

Can you please tell me why this happens?

Kind regards,
Balázs

0 Kudos
Message 1 of 5
(293 Views)
Highlighted

Without any code it's hard to say what's wrong with the code. (post the code)

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(289 Views)
Highlighted

Hi Balázs,

 


@LTBALAZS wrote:

I frequently notice that Loop#2 does not execute:


When probe 5 isn't executed then the loop didn't start so far!

 

For more detailed analysis you should attach some code…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 3 of 5
(279 Views)
Highlighted

Hi!

 

There are a few issues that could cause your problem. Since you didn't post the other loops I'll speculate on the problem based on the little bit of data flow shown.

 

Your loop has a few dependencies before it can run. Namely, the block diagram constants and the two power analyzer vi's before the loop. Your loop will not run until those vi's have finished, in order, to be specific. My guess is that your power analyzer vi's require you to close a previous session before opening a new one and that while testing your code a session was left open. To solve that, wire your instrument constant to the power analyzer close session vi (assuming that exists) in a new blank vi and run it. That should close the open session and allow you to continue. If that doesn't solve your problem turn on highlight execution before you run your program and the VI that gets hung up and prevents the loop from running should have a green run arrow on top of its icon, that will at least tell you where the problem is.

Philip Bear
Certified LabVIEW Developer
0 Kudos
Message 4 of 5
(273 Views)
Highlighted

My wild guess is your instrument is not responding properly and you are getting timeouts.  But these timeouts are likely in the 10 second range, which means you will have to wait at least 10 seconds before that loop will start.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 5 of 5
(270 Views)