LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview unable to Abort

Sorry if this is a repeat of another topic, I looked to see if there were any other similar problems on here and I couldn't find any that were quite the same. I'm very new to labview so this may be a really easy thing to solve, but I don't know where to begin. 

 

So I have this VI that someone helped me make that talks to a voltage source and a multimeter, applying a voltage and measuring the resulting current, making a txt file of the output. Sometimes it works fine, but regularly it gets to the end, stops measuring the current (as it should) but the VI is still running and I can't abort it. Neither the button nor the Ctrl + . hotkey work and I just have to close it through the task manager.

 

I really have no idea where to start troubleshooting this, so even a cursory glance followed by a basic instruction on how to get started would be much appreciated!

 

Cheers,

Emily

0 Kudos
Message 1 of 7
(3,036 Views)

You have not attached any of the subVIs, but some look like third party drivers. Most likely the problem is not with LabVIEW, but with these drivers. For example it could be possible that if you abort the VI (without allowing e.g. the "ke2000 close" to properly execute at the end), it could leave something in an undefined state next time the code is run.

 

Once the VI is in a state where it cannot be aborted, go to the diagram and press the highlight execution button (lightbulb). It will place a green arrow over the subVI that is not returning. See if this tells you anything.

Message 2 of 7
(3,010 Views)

Sorry for the slow reply! It is indeed a third party driver, and it is the ke 2000 close sub vi that is where it was stopping it turns out. Good guess! That little lightbulb is so helpful!

 

I changed the for loop to a while loop, and made it so that the stop button stops both while loops, and so allows the program to get to the ke 2000 close sub vi and it seems to work now as long as I use the close button instead of abort.

 

Thanks so much!

Emily

Message 3 of 7
(2,846 Views)

@emilypole wrote:

I changed the for loop to a while loop, and made it so that the stop button stops both while loops, and so allows the program to get to the ke 2000 close sub vi and it seems to work now as long as I use the close button instead of abort.

 


It is always better to (yourself) shut the system down.  Some have argued that Abort is, in fact, dangerous, since you have no idea (and hence no control) over what it is doing.  Particularly when hardware is involved, particularly with multiple software "pieces", you want to "do your own shutdown", and if something "sticks", try to find (and fix) the stickiness.

 

Bob Schor

Message 4 of 7
(2,830 Views)

As someone so eloquently put it: Using the Abort to stop your program is like using a tree to stop you car; it works but the side effects can be horrible.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 7
(2,816 Views)

So the problem is ongoing, it went away for a while when I included the stop button, but I suspect this was a coincidence. However, I am slightly more knowledgeable about what the problem is now. I think that at some point in the execution the VISA connection to the multimeter drops and so when the vi tries to finish with ke2000 close it can't close the session because it isn't communicating with the device. I have put probes in the error wires, and the most common error I get is:

 

Error -1073807360 occurred at VISA write in ke_2000 Error Query.vi->ke2000 Data Read Single.vi -> mainv1.vi

 

I have included the newest version of mainv1.vi as well as the third party sub vi libraries that include the sub vi's where the error is originating.

 

The weird thing is that it only ever happens when the voltage source is on as well. If I switch the voltage source off, it never seems to drop the connection. I suspected it could be some kind of electrical interference so I've moved them apart but nothing I do seems to help. 

 

I have also tried pulling out the cable connecting the multimeter during a test run to see if I get a similar problem, and while it does struggle and it tells me that the connection has been dropped, it doesn't freeze up in the same way.

 

Download All
0 Kudos
Message 6 of 7
(2,717 Views)

I've had similar issues with a balance. Sometimes it seemed to get some 'artifact' on the serial port and the only way to get rid of it was to remove both serial and Power Cables to the device, one wasn't enough.

However, in normal instances if you notice Communication problems you should be able to Close and reopen the Communication (also i typically set the timeout to something like 1 sec).

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(2,696 Views)