From: dan_u on
This is possible. When you build the executables you'll see ini files with them. The ini Files contain the VI server configuration, if you create an exe it'll use the VI server settings of the project by default. To allow access from any machine to any VI in the exe on port 3364, use the following lines in the ini file:server.tcp.enabled=Trueserver.tcp.access="+*"server.tcp.port=3364server.tcp.acl="290000000A000000010000001D00000003000000010000002A10000000030000000000010000000000"server.vi.access=""server.vi.callsEnabled=Trueserver.vi.propertiesEnabled=TrueYou'll have to open an application reference (using the port specified) first, then you can use VI server as you do in LabVIEW.Hope this helps,Daniel
From: aman_bajra on
Thank you for your promot response. Regarding the lines do I replace the contents of my old ini files with these ones. Do I have to replace in both Client and Server?
 
I was going through this knowledgebase "Accessing VIs Inside of a LabVIEW Executable or DLL in LabVIEW 8.2 and Later ( <a href="http://digital.ni.com/public.nsf/allkb/8545726A00272EB0862571DA005B896C" target="_blank">http://digital.ni.com/public.nsf/allkb/8545726A00272EB0862571DA005B896C</a>&nbsp;)" . I use LabVIEW 8.5 so I thought this is the explanation why&nbsp;my VI Server in the executables are not working.
However there is this line in&nbsp;the same knowledge base&nbsp;that says
"Also, this change still permits you to open application references to an EXE, and subsequent VIs referenced by name, through VI Server when it is <a href="http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/vi_server/" target="_blank">enabled for the EXE</a>." .
&nbsp;However I couldnot make it out what does it mean by "enabled for the EXE". Does it refer to&nbsp;the same procedure that I normally do&nbsp;like writing a * for 'allow access' in&nbsp;Exported VIs.
Aman
From: dan_u on
Enable it in the exe is what I described in my post.The last paragraph of the KB article says:Enable TCP/IP support for VI Server for the application.
Open an Application reference to that port on your local
machine (from the LabVIEW functions palette:
"Programming�Application Control�Open Application
Reference", then use "Open VI Reference" and call the VI as you
did in the past.
While it isn't much more work for the caller, you do have to actively
manage your
ports and keep up with the right settings in the ini
files for the EXEs.To specify access and port use the lines of my last post in the ini file. If these lines don't exist you can just add them, but probably you want to use a different port, restrict access (access control list = acl) to certain machines (e.g. localhost) or limit access to certain VIs.Besides setting these parameters in the ini file you can also use application properties. See screenshot.<img src="http://forums.ni.com/attachments/ni/170/321280/1/VI-Srv.PNG"> DanielMessage Edited by dan_u on 05-06-2008 10:39 AM


VI-Srv.PNG:
http://forums.ni.com/attachments/ni/170/321280/1/VI-Srv.PNG
From: aman_bajra on
I tried with your suggestion but it still doesnot seem to work. I have included my sample VI&nbsp;and the executable files. I&nbsp;appended the codes that you supplied at the end of&nbsp;ini files at the end of both.&nbsp;
The zip folder has two folders
call_exe_folder folder which&nbsp;has the executables to call the exe_vi.vi in exe_vi.exe&nbsp; and exe_vi folder
From: aman_bajra on
I tried with your suggestion but it still doesnot seem to work. I have included my sample VI&nbsp;and the executable files. I&nbsp;appended the codes that you supplied at the end of&nbsp;ini files at the end of both.&nbsp;
The zip folder has two folders
call_exe_folder folder which&nbsp;has the executables to call the exe_vi.vi in exe_vi.exe&nbsp; and
exe_vi folder
 |  Next  |  Last
Pages: 1 2
Prev: barre des menu
Next: VI server in executable