LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you create a program in Labview that can be run as a Windows Service?

I would like to create a Labview program that can be run as a Windows service.  I have read the following Knowlegebase articles and have done what they say. 

Creating a Windows NT Service Using LabVIEW http://www.ni.com/white-paper/3185/en 

Running a LabVIEW Application as a Windows NT/2000/XP/Server 2008/7  User-Defined Service http://digital.ni.com/public.nsf/allkb/21BA0F671A63A60386256CB4004DF99B

 

When trying to start the service I get an error that says the program didn't respond to the start in a timely manner.  I also set the "run when opened" parameter in the VI.  I am programming in Labivew 2010, proffesional version.  The server is running Windows Server 2008.  Can anyone help?  Is the ini file important in Windows Server 2008?

0 Kudos
Message 1 of 3
(2,615 Views)

I haven't looked through all those links.  But I have created Windows Services from LabVIEW executables way back when WinXP came on the market.

 

The problem with services is that they have no UI.  So you can't really see what is going on.  Your EXE might be failing or hanging due to some kind of error (most liklely a security/permissions error), but you can't see the error.  So my advice is to either:

 

1.  Have your EXE write lots of info to a log file.  Write info that log every step in the application.  If an error ocurrs, have it write the error info to the log file.  That is a very useful debugging tool.

 

2.  Use VI Server functions to monitor the service to see what is going on. 

 

 

http://www.medicollector.com
Message 2 of 3
(2,582 Views)

Excellent idea!  I'll try that.

0 Kudos
Message 3 of 3
(2,551 Views)