LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Namespacing objects in a build makes them "different"

I've got a simple application: There's a "Caller" (a built application that the user opens) and a "Callee" VI on disk that the framework opens - nothing too difficult about that so far.  The Caller has an object in it where I set some stuff, then I want to pass the object to the Callee through it's connector pane:


Attached Image: Caller.gif


Then, when called, the Callee displays the stuff to the user:


Attached Image: Callee.gif


When I run this in the development environment, it works fine.  When I build it, it works fine too.


When I build the Caller application, if I include dependancies (read: subVIs) in the Caller and Callee that are the same (read: have the same name), calling the Callee from the built Caller won't work: it errors out with the Callee being "broken" (it's not really broken, there's just a namespace collision, so it refuses to load it).  And I'm cool with that - the solution is to namespace the dependancies in the build, which is fine.


So "what's the problem?!?" I hear you ask!


All this worked great until I started trying to pass an object from the Caller to the Calle through the connector pane.  (I think) Since the class is namespaced differently in the built Caller to the non-built Callee, I get

 

Error 1031 occurred at Open VI Reference in Caller.vi
Possible reason(s): LabVIEW:  VI Reference type does not match VI connector pane. VI Path: C:\Users\christopher_relf\Desktop\Passing Objects between name-spaced application instances\Callee\Code\Callee.vi

 

...which, as you can imagine, sucks.  I totally understand why it's happeneing, and even agree that this is the way it should be, but that doesn't help me complete my application.
I want to pass an object between a namespaced-exe Caller and a VI Callee - I don't want to deconvolute the object's data to an intermediary (like a variant or string I guess) and rebuild it to a copy of the object on the other side (unless I really have to - but I can't think of a generic way to do it that I like right now).

 

Does anyone have any bright ideas?  Hopefully I'm missing something easy, right? :)


I've included an example below.

 

//Crossposted to LAVA.





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 1 of 8
(3,453 Views)

PS: I was able to implement a solution in a way that's outside the context of this discussion, although I'd still like to see a solutio to this question.





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 2 of 8
(3,422 Views)

What version of LabVIEW are you using?

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 3 of 8
(3,393 Views)
2011SP1




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 4 of 8
(3,371 Views)

This is similar to a bug that was reported for LabVIEW 2009. It was supposed to have been fixed in LabVIEW 2009 SP1 and should still be fixed in later versions of LabVIEW. I would like to try to build your application in LabVIEW 2009 SP1 and see if it still has that error. Can you post the specifics of your build so that I can recreate it?

 

Cameron T.

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(3,361 Views)

The source and build are attached in a zip to the original post.





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 6 of 8
(3,338 Views)

It seems like this is being figured out pretty well on the LAVA thread you referenced in your first post. I see that NI Employees are also involved. I recommend you continue the dialogue on LAVA to find an acceptable solution.

 

Cameron T

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(3,321 Views)

Thanks Cameron - I appreciate you taking a look at it.





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
0 Kudos
Message 8 of 8
(3,309 Views)