aart-jan Posted September 3, 2006 Report Share Posted September 3, 2006 Hi all, I have deviced a way to have multiple executables communicate with each other and tried to use it in an application. I have one application make a weakly typed call to another vi inside another executable. While calling this vi, it passes user event refnums that are used for communication between the executables. It works! After quite a bit of development, all of a sudden I got errors calling another executable. The executable runs fine on its own, but breaks if called by another executable. It has something to do with a compile time error.. So here's my fear: I guess I am really not launching another executable, and hence the vi that I run from inside the executable does not provide any namespace protection. When it needs referenced vi's inside the called executable that have the same name as in the calling executable, it will load those in stead! At least, that's what I fear. I am looking for solution for this issue. I could put all the VI's in a library, but that seems a little silly. I could give all vi's a unique name, but that's not very useful when using all kinds of common libraries. I could launch the application using the "Open application reference" function, but I have not yet tested whether it will still be able to communicate between executables using user event or queues. Looking forward to your thoughts. Aart-Jan Quote Link to comment
Yair Posted September 4, 2006 Report Share Posted September 4, 2006 Are you calling the exe using System Exec or are you calling the top level directly? Is this what you're doing? If not, it might help you. Quote Link to comment
Ton Plomp Posted September 4, 2006 Report Share Posted September 4, 2006 Are you calling the exe using System Exec or are you calling the top level directly?Is this what you're doing? If not, it might help you. Hi All, I'm working with AartJan on this issue and ran into a rather strange item. Let me describe what I do: -I set the INI settings of the LabVIEW executable I want to connect to -I launch the exe -I try to connect to the VI server inside the exe (this will fail sometimes with error 68 connection refused) -I load a normal VI (not in the exe) into the executable application instance In the VI loaded via VI server I try to determine which application instance I'm in. I do this with the following code properties: App.Name App.Kind The VI does not return a name (or error), but the app.kind is invalid. I have never seen this before but the same code inside the executable runs normal, and the development VI that loads the app. instance and this vi reports the correct items... Does anyone have seen this behaviour (app.kind=invalid)? Ton Quote Link to comment
Ton Plomp Posted September 6, 2006 Report Share Posted September 6, 2006 Does anyone have seen this behaviour (app.kind=invalid)?Ton With Darren's Nugget I've confirmed that the VI is loaded into the exe but there is still an invalid app Ton Quote Link to comment
aart-jan Posted September 9, 2006 Author Report Share Posted September 9, 2006 Are you calling the exe using System Exec or are you calling the top level directly?Is this what you're doing? If not, it might help you. I run the VI's/executables making a weakly typed vi server call to the topVI inside the executable. There I set the value of a control which enables communication between called and caller VIs using user events. That all workes really nice and enables a very nice feature: the called executable can offer synchronous as well as asynchronous responses to the caller executable. For example: you can instruct an e-mail checker executable to respond every time an e-mail from a certain address arrives. The caller executable will then receive a user event with a new mail message. I would like it very much if the executables could really run independently and still send messages using such things as queues and events Quote Link to comment
Yair Posted September 9, 2006 Report Share Posted September 9, 2006 I would like it very much if the executables could really run independently and still send messages using such things as queues and eventsDid you try the method in my link? Once you do that, you can run the executable independently or using System Exec and it will be loaded into the same RTE instance as the other executable. Then, they should be able to share everything. Just note the warnings given by Damien Gray. Quote Link to comment
aart-jan Posted September 10, 2006 Author Report Share Posted September 10, 2006 Did you try the method in my link? Once you do that, you can run the executable independently or using System Exec and it will be loaded into the same RTE instance as the other executable. Then, they should be able to share everything. Just note the warnings given by Damien Gray. Haven't tried. Definitely will. Thanks! BTW. While running in the same run time instance, I assume that the executables will provide name space protection..? Quote Link to comment
Yair Posted September 10, 2006 Report Share Posted September 10, 2006 While running in the same run time instance, I assume that the executables will provide name space protection..? The way I understand it, they do not provide protection. Loading into the same memory space also means that you load into the same name space. But I guess you will have to try it to be sure. In any case, I didn't really understand your method of communicating between executables, but I don't think that VI name collisions would cause it to fail (at least not while you're in the same RTE instance). If the VIs are the same (which I assume they are), then all you will need is for the references to be valid, and that should be handled by loading the EXEs into the same RTE instance. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.