LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linx Close on App Close

Solved!
Go to solution

The problem I've been having for years with this Linx app is If the program doesn't get turned off by the While Stop button, Linx doesn't close properly and I get an error next time I restart the program. In other words, if I use the LabVIEW white arrow to stop the program, the Linx Close vi never gets activated. I hope this makes sense.

LinxClose.PNG

0 Kudos
Message 1 of 7
(1,817 Views)

So you are saying if you force stop the app, it stops?

 


@RHutchings wrote:

I hope this makes sense.

 


It does make sense, it's the intended way if you force stop the execution.

0 Kudos
Message 2 of 7
(1,760 Views)

Nothing wrong with that VI on my system. It properly stops when pressing the stop button.

 

LabVIEW 2018SP1 32-bit, Windows 10 64-bit

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 7
(1,746 Views)

He says it stops ok if you use the stop button... what he is doing is pressing the abort button.

0 Kudos
Message 4 of 7
(1,736 Views)

My bad, didn't somehow see that "if". To the OP, pressing the abort button can be compared to stopping your car by running it in a wall. Very effective, but not recommended to do to often! 😁 (Unless you work for a crash test site of course. They do that very frequently.)

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 7
(1,730 Views)
Solution
Accepted by topic author RHutchings

@RHutchings wrote:

 In other words, if I use the LabVIEW white arrow to stop the program, the Linx Close vi never gets activated. I hope this makes sense.


I don't think you can use the white run button to stop a VI. You probably use the red button?

 

You can hide the red "Abort Execution" button in VI Properties, Window Appearance, Customize..., Show Abort Button.

 

That should prevent you from pressing it.

 

wiebeCARYA_0-1671016552751.png

After:

wiebeCARYA_1-1671016629550.png

 

 

Alternatives are possible, but require some work. For instance, you can dynamically start a VI that gets a queue, and tries to dequeue an element. When the caller stops, the dequeue fails, and then you can do the close. Tricky and a lot of work if you never did this. Disabling the abort is 2 minutes and works too.

0 Kudos
Message 6 of 7
(1,710 Views)
Disabling the Abort button seems like the best solution. Thank you.
0 Kudos
Message 7 of 7
(1,687 Views)