Error 1031 When Running a VI With LabVIEW CLI

Updated Aug 24, 2023

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 (input, outputs & connector pane pattern), as shown below.


 

The controls and indicators must have the types below:

TerminalData TypeDescription


String 1D Array

Command line arguments for the VI.


I32

CLI for LabVIEW exit code that the VI returns.


String

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.