Hi,

There is actually quite a complicated issue with the abort vi call
through activex. It does work in many cases, but is failing when there
are multiple references of a vi open at the same time.
Abort VI does work via activex, just make sure you are closing
un-needed references. Try making a very simple program in VB to do
this, I have tried this in LV and can abort any VI thats running, my
VB isnt up to much i'm afraid.

The fix for the bug is scheduled for the next version of labview.

One work around that i came up with, is to make use of some of the
activex calls you can make. If you have a stop control on the front
panel in lv, set the tab order so that it is first in the list. Then
in VB, get the property of panel, then of controls (which is an array
of references of all controls & indicators), index the first element
of that array, then you can change the value property of that
reference. This programatically stops the program rather than aborting
it, which is safer when doing any hardware I/O. Obviously the stop
control in labview must be programmed to actually stop the VI.

Dont forget to close each reference, that includes the array of
control/indicator references.

Hope that helps, even if the bug exists in the current version of
LabVIEW.

Anthony Sims
Applications Engineer NI-UK

Reply via email to