LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1031 with VI Server

Solved!
Go to solution

Hello,

 

I am working on a project that uses a VI Server to control a piece of hardware persistently across multiple DLL calls. I have several remote calls that simply grab the main server reference and call a remote version of a function.

 

This works for about half of the functions, the other half are returning error 1031. All the remote functions are similar Open Application Reference->lookup full class name of remote VI from exported functions->Open application reference with an input type that is the remote function panel->call by reference->close.

 

This is all within a class on LV2012 and running on windows XP sp2. It was developed in Windows 7 LV2012 and seemed to be behaving there, but the hardware wasn't available for a full test.

 

Thanks,

/r

James

0 Kudos
Message 1 of 7
(3,815 Views)

The error means that the VI Reference type does not match the VI connector pane. Is that the case?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(3,791 Views)

If it is, then something is changing it when it is loaded into memory. Is there any way to determine this?

 

When I call Open VI Reference I have created the type specifier VI refnum from the VI I am calling with that function.

 

/r

James

 

0 Kudos
Message 3 of 7
(3,786 Views)
Are you sure nothing has changed?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 7
(3,783 Views)
Solution
Accepted by topic author jshafer

Correct nothing changed. Though I did discover that the error did exist in Windows 7 just not in the functions I was using to test.

 

I managed to resolve my problem. It turns out that when I was pulling the full VI name from the Exported VI list, all the failing VIs were being pulled with :Instance.0 attached to them. The solution was to ensure that I was just calling className.lvclass:viName.vi without the Instance qualifier.

 

Thanks

 

/r

James

0 Kudos
Message 5 of 7
(3,776 Views)
Good thing to know. Where did the ":Instance.0" string come from? Were the VIs reentrant or something?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 7
(3,764 Views)

I believe that to be the case. For every instance where an exported VI was called as a subVI of another exported VI (advanced functions to increase speed would combine the simpler functions for a call fully on the server before returning results).

 

Since I would match the string of the VI name (minus class), without the necessary class qualifier, that was the first match returned from searching of Exported VIs which I was using to get the full name for the open reference.

 

Hopefully this saves someone else from the same frustration.

 

/r

James

0 Kudos
Message 7 of 7
(3,760 Views)