LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get error 1031 when using vi server to call an exported vi?

I'm trying to call a vi that is inside an exe using vi server.

 

For some reason I keep getting error 1031 "VI Reference type does not match VI connector pane" from the open vi reference primitive.

 

However:

If I statically link to the vi using the same type specifier, it works just fine.

 

I've attach 2 code capture screen shots.  One shows the original code that generates the 1031 error.  The other shows calling it directly locally and that code executes with no problem.

 

Oh and also, if I don't connect the type input I can open a reference to the remote vi and interact with it.

 

I've also attached a code capture screen shot as well.

 

So it appears that the vi server connection to the exe is not transferring the VI reference type correctly??  Has anyone had any experience with this?

 

I have no idea why this is happening.  Anyone have any thoughts? 

 

I'm using LV2009SP1 by the way.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Download All
0 Kudos
Message 1 of 6
(4,565 Views)

When you are trying to call into an executable, LabVIEW will not necessarily know what type it is. You are getting this error because you cannot use a strict type definition in certain cases, this being one of them. Some cases will require you to use a strict type definition due to their architecture but again, due to the structure of your applications, you can't use the strict type definition. Your other two examples use the correct passive types and therefore do not get the error. Hope this answers your questions!

 

Mychal F

Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,532 Views)

Question is can I use a strictly type VI path (vi's name) and the VI connector type without error 1031 in a built executable? What are the conditions I cannot use "Strict Type Definition" in an executable? If not are you saying I cannot use Call by Reference in an executable?

 

I have same problem, error 1031 says the connector typeVI does not match VI.

 

I currently have an executable that uses Call by Reference some work but 1 throws error 1031. I open the called VI resaved it updated the Type VI on the block diagram and the error persist.

 

Rich J

0 Kudos
Message 3 of 6
(3,773 Views)

Anyone,

Alternately, Can I do something to adjust the compiler optimization to force Open VI Reference & Call asynchronously to work for an executable? Without Open VI Ref working it will kill my executable build. On start up, prior to the Do While statement, Asynchronous Call work as expected. But inside the loop, Open VI reference throws error 1031.

 

Asynchronous Call becomes useless in a executable.

Rich J

0 Kudos
Message 4 of 6
(3,763 Views)

Not sure if I can help you Rich but I wonder if that obsure right-click option for the CBR node "Adapt to reference Input" is active ?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 6
(3,762 Views)

I saved my work, closed the project, close Labview, reopen project, create the same build to debug and the error code went away. I have no clue how or why.

 

Prior to the error code occuring my executable worked ok, I went into the Build setting to Optimize the build per instructions in the help, ran my executable to debug and the error 1030 started. Closing the project appears to fixed the problem.Smiley Surprised

Message 6 of 6
(3,754 Views)