LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution state constantly returning idle

I've inherited some source code previously created in 2014 with the task of updating to 2020 version, however i am stuck with an issue where the code is checking the execution state of another vi and waits for the execution state to change to "run top level" before passing the information. There are 3 separate vis included in this operation called backgroundprocess, service and tool.

 

The tool vi will launch the service vi (attached code snippet) but the service vi will wait to receive information from the backgroundprocess vi before continuing (attached code snippet). The issue i have is the backgroundprocess vi is always returning idle execution state even though i have confirmed the service vi is state as "run top level".

 

Even if i force the the "run top level" case in the backgroundprocess it still doesn't pass this information to the service vi. I'm assuming there is an issue with the vi reference but i cannot seem to figure it out.

 

The code works as expected in 2014 and changing nothing in 2020 version the same code won't work.

 

I cannot attach the full code unfortunately but hopefully the snippets will help.

Download All
0 Kudos
Message 1 of 4
(1,000 Views)

We actually prefer VIs instead of truncated pictures. Also, if you include pictures, at least please embed them into your posts so we don't need to click a dozen times.

 

(And please don't call them "snippets". That word has a very specific meaning in this forum! Your pictures are not snippets!)

 

altenbach_0-1659622783548.png

 

altenbach_1-1659622799000.png

altenbach_2-1659622877879.png

 

 

0 Kudos
Message 2 of 4
(967 Views)

In the background process picture, you check the exe state before the loop, i.e. only once. If this can change during the run, you probably need to check inside the loop.

 

We can't really tell much more, because we cannot see the entire architecture of your code.

 

altenbach_0-1659626019655.png

 

0 Kudos
Message 3 of 4
(964 Views)

Moreover, as long as you are updating the code anyway... get rid of the obsolete RunVI method and use an Asynchronous Call By Reference fire and forget.  You'll thank yourself.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(956 Views)