Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Application as a Windows Service using AF

Good evening!

At present I am troubleshooting an application that is built with AF. 

 

Everything works great until I try to run it as a windows service without a user interface. I am following all of the instructions to the letter on how to create a user defined windows service and have srvany.exe call and run the LabVIEW executable. 

 

I created a test app that was not Actor Framework just a couple normal VIs ( a launcher and a VI that ran and logged data to a file on the desktop). What I found was that if I run the launcher that calls the VI to run and then the front panel of the launcher closes and goes out of memory, the application exits but Windows still shows the service as running. 

 

If I run the launcher and then tell it to hide itself and close its reference after running the VI it is launching it works fine.

 

I suspect with AF it may have something to do with the fact that Actor Core is not in the runtime engine and I am not telling any front panels to open. 

 

Will I need to have every single actor core in this application open and hide the front panel for this to work?

 

I also set a tag in the ini file to "HideRootWindow=True".

 

The service will be running on a Windows Server OS that is connected to multiple DAQ chassis and the client does not want to have to log into the server for this to run. There is a client side that is AF as well but it will not be running as a service. 

 

Suggestions? Feedback? Will this not work with AF?

Steven Howell
Controls and Instrumentation Engineer
Jacobs Technologies
NASA Johnson Space Center
0 Kudos
Message 1 of 6
(1,892 Views)

What does your logging tell you?  Does your top-level actor have an error and shut down?

0 Kudos
Message 2 of 6
(1,866 Views)

I had an issue once (with a VERY cryptic error code) where the build process was stripping front panels and was breaking things. Try adding a property node reading a random front panel property to the top level Actor Core. That should keep it in memory. I'd also guess that you only need to do this to the top level actor, but I'm not certain.

 

The MGI Panel Actor toolkit might help here (despite not actually needing panels...). It will let you inherit your actors from a Panel Actor that can do some panel-related operations, like hiding or showing panels, without having to explicitly code all of your Actor Cores to show or hide their panels.

0 Kudos
Message 3 of 6
(1,855 Views)

Count actors.vi already does this. 

 

Its not clear exactly what the behavior was - windows showed the service was still running, but was it actually still running? What exactly is happening when you try this with the actor framework? Do you have built in logging? What do your logs show?

0 Kudos
Message 4 of 6
(1,832 Views)

I finally figured it out. The application was starting up and then immediately stopping due to a login error with the SQL database that is part of this system. AF was doing what it was supposed to be doing but immediately stopped when the error was propagated up the stream. 

 

 

Steven Howell
Controls and Instrumentation Engineer
Jacobs Technologies
NASA Johnson Space Center
0 Kudos
Message 5 of 6
(1,819 Views)

Yay for solved problems!

Message 6 of 6
(1,812 Views)