LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Expert comment on .exe problem

Hi,


What you explain is how it should work. You don't really explain what you want, but I think this is your problem:


When you build an executable all sub vi's (reentrant or not) are included in that executable. They don't act as vi's anymore, but as subroutines to that executable.


If two executables share the same vi's, they will still use there own instances of those vi's.


If you want two executables to communicate, you'll have to use some sort of communication mechanism. Sub vi's will not work. Even when you call vi's dynamically, each exe will make it's own instance, and you'll end up with the same vi running twice.


So if you want the first exe to open 1.vi, 2.vi, 3.vi and 4.vi, and you want the second exe to open 5.vi, 6.vi, 7.vi and 8.vi, you'll have to implement this by hand. Some ways to do this:


Memory mapping. Both exe's have a shared peace of memory. The exe's can write some flag, and check this flag to see if the other exe was first. Then it opens 1,2,3,4 or 5,6,7,8 depending on the outcome.


File. Same idea, but communication is done through a file.


Registry. Same idea, but the lag is set in the registry.


Checking process. Same idea, but use api's to check if the other process is running.


Hope it helps,


Wiebe.


"ramji" <x@no.email> wrote in message news:1146564612104-359414@exchange.ni.com...
Dear All ,
&nbsp;
Iam using two exe 's . for example a.exe and b.exe
&nbsp;
a. exe contains ( one.vi , two.vi , three.vi , four.vi ) and b.exe contains ( eight.vi, nine.vi,ten.vi)&nbsp; . there&nbsp;are some subvi's which is common in all vi 's . but that subvi's are reentrant.
&nbsp;
&nbsp;
Now , when iam running a.exe first and b.exe second .... it opening all the application correctly without any problem .
&nbsp;
But if i run b.exe first and a.exe second ..... then b.exe opens eight.vi , nine.vi , ten.vi , one.vi ,two.vi&nbsp; and a.exe opens one.vi, two.vi, three.vi, four.vi .
&nbsp;
Problem ( Why iam getting this repetation of vi.)
&nbsp;
I made all probability of creating the exe like shutting down the server and making exe , creating exe in laptop and tansfering it to server , but nothing helps .
&nbsp;
Regards
&nbsp;
Ramji
0 Kudos
Message 11 of 11
(357 Views)