12-13-2022 12:57 PM
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.
Solved! Go to Solution.
12-14-2022 12:48 AM
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.
12-14-2022 02:22 AM
Nothing wrong with that VI on my system. It properly stops when pressing the stop button.
LabVIEW 2018SP1 32-bit, Windows 10 64-bit
12-14-2022 02:58 AM
He says it stops ok if you use the stop button... what he is doing is pressing the abort button.
12-14-2022 03:08 AM - edited 12-14-2022 03:09 AM
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.)
12-14-2022 05:17 AM
@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.
After:
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.
12-14-2022 08:04 AM