このコンテンツは設定された言語で表示できません。

このコンテンツは表示可能な別の言語で表示されています。 お使いのブラウザに翻訳機能がある場合はご利用ください。

Error 1000 When Aborting a VI Using VI Server

Updated Dec 11, 2023

Reported In

Software

  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

I have a top-level VI that calls a subVI, and due to how the subVI works, the only way to stop it is abort it. When I open a reference to the subVI and use the Invoke node with the Abort VI method, I get the following error:

Error 1000 occurred at Open VI Reference
Possible Reason(s): LabVIEW: The VI is not in a state compatible with this operation.




How can I abort a subVI from my top-level VI?

 

Solution

This error can occur due to different reasons:
 
  1. Because the executions of the top-level VI and the subVI are tied together. 

In order to abort a subVI from another VI, it needs to be running as a VI, not as a subVI. To do this, you'll need to start the subVI through VI Server, using an Invoke node with the Run method. You also need to set the Wait until done option to FALSE to eliminate the data dependencies of the VI. 
  1. One of the subVIs loaded in the NI server is an empty subVI, having a completely empty block diagram.

The error 1000 occurs when LabVIEW is trying to abort the empty subVI. Removing the empty VI from the NI server resolves the issue.

Additional Information

This happens because while the subVI that you called is running, it is not running under its own execution, rather, it is part of the execution of the top-level VI. Though two parts of the main VI may be running in parallel (the subVI and the VI Server Abort command), the subVI is not executing on its own. It is a part of the caller VI. 

The major drawback to using this method is the greater difficulty of passing data values to the called VI. You would need to use the Set Control Value and Get Control Value methods to pass data to and from the called VI.