LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI connected to run methods shows reentrant error at one location but not at another location

I have a labview program with two VIs. One is the main VI and the second is subVI. I am creating a static VI reference of the subVI in the main VI and then running by connecting it to the invoke node run VI method. Now the subVI is in non-reentrant execution mode. I run the main VI and the program works fine. Now I created another program in another folder and I copied the subVI from the other folder into this folder. I did the same thing here that is create a main program and put the sub VI in a static reference and connect it to run method of invoke node. But then I am getting an error that this will not run in non-reentrant execution mode. How is it at one place it works and in another place it does not. It's the same program at both place. So I changed it to shared clone reentrant execution. Then there is no error but the subvi is not running and I am not getting any output from subVI. What is the problem here. Kindly do help me. Thanks. 

0 Kudos
Message 1 of 7
(913 Views)

Hi govindsankar,

 


@govindsankar wrote:

I have a labview program with two VIs.

Now I created another program in another folder and I copied the subVI from the other folder into this folder. 


Why do you need to copy a VI to call it in another manVI?

Why don't you attach a ZIP file containing all items to demonstrate your problem?

Best regards,
GerdW


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

Its a different project and a different VI in an entirely different folder. I need all the VIs associated with that in that same folder. So i have to make a copy of that in this new folder. Ok I have uploaded two zip files. The main in TestVIs that work is UI For IOeco 3 and sub VI is UI For IOeco Maunel Eingabe 1. The main in doesnt work is Initial process and in the block diagram in the case structure in case Manuel Eingabe you will see the same subVi UI For IOeco Maunel Eingabe 1 used just like before. I hope this is enough. 

Download All
0 Kudos
Message 3 of 7
(887 Views)

Hi govindsankar,

 

I just tried "that works": It does NOT work…

 

You cannot call the "Run" method for a VI already included as subVI of your mainVI!

You can show the frontpanel of that VI in a subPanel, but it already "runs" as it is called as an ordinary subVI…

 

And you really should cleanup those block diagrams, they are way too big and loaded with Rube-Goldbergs!

(Using the same icon for several VIs doesn't help either.)

Best regards,
GerdW


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

Ok I got it but for some reason that does work in me. I dont know why. Anyway, if I cannot do both that is use the run VI method and put a sub VI then I need some data from the subVI after opening its front panel in the subpanel. How do I get that data. 

0 Kudos
Message 5 of 7
(869 Views)

Please look at the attached video where i show that it works in that works zip folder. The attachment is in the form of a link to google drive because the video I took is over 100 MB. Please check it. Thank You. 

 

https://drive.google.com/file/d/1ANJBi6gbLd7m-sKcpJWfiHYsAgvc7kjA/view?usp=sharing

 

 

0 Kudos
Message 6 of 7
(858 Views)

Thank You. I just solved the problem. There are two differences between the one that does work and one that doesnt work. First is wiring the error from run vi. In the one that does work I have wired the error from run vi to start of the sequence structure. So there also an error happens but since it is wired, it doesnt pop up like a message whereas in the one that doesnt work since it was not wired it pops up as a message. But still the program was not working since I was not getting an output. But then I found the problem. Second is I used QMH in one that doesnt work whereas the one that works just a while loop. I assumed if no new queues are formed then the last queue will repeatedly executed inside a while loop. That was my mistake. It seems that once a queue is executed it waits for the next queue so the case structure doesnt get executed again. So whatever changes I make in the subpanel will not happen. So I made it in a way that the same case is added to the queue at the end of the current queue, so it gets repeated again and again. When I did that i finally got it to work. But I could still use the solution for the question i asked above. Thank you.

0 Kudos
Message 7 of 7
(847 Views)