LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application.exe as windows service with console

Hello.

 

I read here topic about create application as windows servis, but not find solution for my problem:

 

Using nssm.cc I create windows servise from my Labview exe application and windows servise work corectly, but my application need sometime change parametars for work. I can't find solution for this: How open my Application.exe to change some parametars for servise and after close Application services need continue work with new parametar. I try change service settings "Allow service to interact with desktop" but this not work. ...when start my application I recive meessage from application  resources is in use (VISA COMport.....) from my services. How I can  using service and application in same time for change some parametars for work service?

 

Thanks.

0 Kudos
Message 1 of 4
(2,960 Views)

Note: I was find some topic with same problem but links inside topic is expire:

http://forums.ni.com/t5/LabVIEW/running-labview-program-as-system-service/m-p/878148

0 Kudos
Message 2 of 4
(2,921 Views)

I'm dealing with the same issue. The solution, I think, is to call your communication VI in the application that has the VISA session open.

 

Your Labview-windows service can use Labview Server to communicate with other Labview applications - including running VIs inside their application instance. I found the easiest way to do this was to give each PROJECT that builds an APPLICATION a unique service name in the project settings. Then when you build the application it will be referrable by that service name through this function:

 

http://zone.ni.com/reference/en-XX/help/371361H-01/glang/open_application_reference/

 

 

You then use the application reference to call the VI. So wrap up your communication VIs and allow them to be accessible to or by your service.

 

Hope that helps.

Message 3 of 4
(2,852 Views)

Hello majoris.

 

Thanks for answer. I solve this using STM in LabView examples.

 

Thanks.

0 Kudos
Message 4 of 4
(2,719 Views)