Error 1031 When Running a VI With LabVIEW CLI

Updated Oct 15, 2019

Reported In

Software

  • NI LabVIEW Command Line Interface

Issue Details

I have written a VI that I would like to run with the LabVIEW command line interface (CLI) using the built-in operation RunVI. When I attempt to run the command I receive an error 1031, "VI Reference type does not match VI connector pane".

Solution

In order to run a VI using the RunVI operation, the VI must have the correct connector pane, as shown below.

The controls and indicators must have the types below:

TerminalData TypeDescription

Command line arguments for the VI.

CLI for LabVIEW exit code that the VI returns.

Output or error information to include in the CLI for LabVIEW console or log file.

 

Additional Information

The RunVI operation is written to be as generic as possible, but if you need to run a VI with a different connector pane it is possible to create a custom operation.

The built-in operations are also written using LabVIEW and can serve as a useful template for developing your own custom operations.