07-28-2011 08:55 AM
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.
07-29-2011 02:49 PM
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
08-12-2016 11:20 AM
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
08-12-2016 02:03 PM
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
08-12-2016 02:04 PM
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
08-12-2016 03:46 PM
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.