11-18-2008 12:07 PM
Solved! Go to Solution.
11-18-2008 12:11 PM
11-18-2008 12:48 PM
11-19-2008 11:28 PM
Hi jrods,
I have been messing with it for a good bit and can’t seem to get it to work either. I think the problem may lie in the way the client is referencing the VI verse how it is referencing the .exe.
11-20-2008 02:33 AM
There's several points here:
1) change the boolean constant in svcSrvr.vi to a control, else the VI doesn't seem to be included in the exe (even though it's specified in the build specification) [this looks like a bug to me]
2) in the application, use a different port (else the project is still listening on that port and the application can't listen on the same port), i.e. change the port number in the application.ini. Alternative: close the project before running the exe.
3) wire "localhost" (or the machine name) to the machine name input of open application reference.
Hope this helps,
Daniel
11-21-2008 11:08 AM
Did you add the line runAsService=TRUE to the .ini file like this DevZone says you need to. It looks like in the code you attached you had not added it. This could be part of the problem if this is the exact code you are trying to get working.
11-24-2008 05:12 PM
I finally had chance to put my hands into this again. Thanks dan_u as with your advice the application is working now. "localhost" must be wired to the machine name. To keep the locators VI in memory a control must be used instead of the constant that the tutorial suggests. It would be good if NI updates the tutorial.
Thanks again to all the people who took the time to shed some light into this.
11-25-2008 04:31 PM - edited 11-25-2008 04:31 PM
Hi All,
Glad you were able to figure it out. I will look into it and see what I can do to get the document updated.
11-25-2008 05:23 PM
It is known that a constant wired to a case structure will not help to keep a VI in a non-executed case in memory. That's why constants wired to case structures were turned into controls when opening earlier VIs in LV 8 or newer. You also see this if you display constant folding, the non-executed cases are removed.
But what I don't understand is why the VI doesn't seem to be present in the executable if it is explicitely added as dynamic VI in the build specification. Probably constant folding has "more weight" than adding the VI.
I didn't check, but if you remove the case structure and the SubVI completely from the main VI and just leave it as dynamic VI in the build specification it might work.
11-26-2008 02:53 PM
Hi Dan,
You are correct that the constant wired to a case structure will not bring it into memory. This is the same reason why it is not included in the application. With the constant wired to the case structure there is no possible way for it to ever execute since you cannot edit the block diagram of a .exe. The Application builder is smart enough to see this and not include it because there is no way for it to run. It just helps to keep the application from being any larger than it needs to be.