LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI still runnning

HI
I have a sub VI wich is still running when I close my application and I can't find were it is still executing code exactly.
Because my application is managed by a grafcet when you quit the application in the menu VI It send an event to the other VIs to stop them,
but I still Have on of my sub VI wich is still running and I don't know what keeps executing after the message have been sent
Does anybody have an idea on how to find the VI part wich is still running
Thanks

Olivier

0 Kudos
Message 1 of 14
(4,428 Views)
Hi Olivier,

well, you already seem to know which subVI is showing the problem. Could you attach it here in the forum?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 14
(4,410 Views)
Apparently this subVI is running in the background with the front panel hidden. One way to locate it is to go through all the pieces of code that launch dynamically and find the one that doesn't handle the shutdown event properly. As you are doing this be on the lookout for situations in which unreported errors could keep the shutdown logic from working as it should - for instance an error occurring very early on could keep the shutdown event from being registered.

A second way to find the offending VI would be for you to could create a separate VI that calls the application method to list the names of all VIs in memory (if this sounds confusing let me know and I'll post one that I use). Next run your main application and shut it down. Finally, run the listing application you created and it should show you what VIs are currently still in memory. From there you can figure out why this subVI isn't stopping when it should.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 3 of 14
(4,409 Views)

Have a look at tst's reply (#9) where he posts an attachment called LV Task Man.  You can use part of this code to list opened vi's, therefore getting the name of the vi that is still running.  You can also shut it down using the same application.  It basically does what Mike describes in his 2nd paragraph.

http://forums.ni.com/ni/board/message?board.id=170&message.id=255509

RayR

0 Kudos
Message 4 of 14
(4,406 Views)
HI
No I'm sorry I can't It is too big to be uploaded in here
0 Kudos
Message 5 of 14
(4,402 Views)
I don't understand what you mean. The VI is only 40k.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 14
(4,396 Views)
Hi Olivier,

you can't?!? Too big to upload one vi???

When your vi is so big you can't upload it here then surely the problem is within this vi...
What did you do to get such a big vi? Can't you split it up into smaller subvis?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 14
(4,396 Views)
What is the size of your vi??
0 Kudos
Message 8 of 14
(4,388 Views)

Back to the original Q.

Use the VI Hiarchy screen to find VI's laoded in memory (ctrl-a).

Either start at the top or the bottom. If starting at the bottom, look for VI's that are resrved to run (run arrow is NOT bold).

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 14
(4,380 Views)
Hi,
It's about 7megs
Olivier
0 Kudos
Message 10 of 14
(4,378 Views)