From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run LabVIEW executable when user logs off

I have a customer request to do this.

 

My customer has a computer in their plant that I wrote a LabVIEW applicaiton to monitor part of their process.  This computer performs other functions in addition to my program.  Their IT department has changed their policy that mandates that anybody using this computer has to log in under their own user name and password.  Prevoulsy it was just a group  user name and password.  What this means for me is everytime a new user needs to use the PC they have to log off and log back on.  This stops my program.

 

Is there a way to have a LabVIEW executable keep running when different users log off and log on?

 

Thanks

 

Dan

Dan Shangraw, P.E.


   

0 Kudos
Message 1 of 13
(3,687 Views)
ummm... Add it to the startup in windows option for all users? Are you talking windows? or linux/mac?
0 Kudos
Message 2 of 13
(3,683 Views)
I am talking windows.

Dan Shangraw, P.E.


   

0 Kudos
Message 3 of 13
(3,680 Views)
So is there a problem with adding the Executable to the startup? Is there any clean up you would like to do when someone logs off? I think adding it to the start up folder in the Start>>Program Files menu for all users should successfully launch the executable irrespective of who logs in.
0 Kudos
Message 5 of 13
(3,676 Views)

I am also calling the VISA driver, and using the serial port.  Would acess to that be terminated after the user logs off?  Also the LabVIEW executable has a UI.  Would that be a problem?

 

Thanks

 

Dan

Dan Shangraw, P.E.


   

0 Kudos
Message 6 of 13
(3,667 Views)

Sounds like you need a service. It may be a complete architecture change, but you could have an executable running as a service and a user interface executable connecting to it (e.g. via TCP/IP). The service itself can't have a UI.

Without using a service there's no way an application can continue running when a user logs off (afaik).

A service is started even if no user logs on.

There's tools like srvany or similar that allow to run an executable as a service.

 

Daniel

 

Message Edited by dan_u on 08-18-2009 03:13 PM
Message 7 of 13
(3,662 Views)

So it look like in order for this to work I have to redesign my program i.e. splitting it into 2 parts.

 

I have to make an acquistion part and run that as a service.  This part would acquire data from the serial port and store it in some buffer.

 

The second part would be my UI.  This would communicate with the service, pulling data out of the buffer, and sending commands.

 

Does this sound about right?

 

Dan

Dan Shangraw, P.E.


   

0 Kudos
Message 8 of 13
(3,659 Views)

Yes, this sounds about right. The question is how to implement the buffer. Depending on your needs there's different options like a file, database, action engine, queue, ...

 

 

0 Kudos
Message 9 of 13
(3,656 Views)
I think I could figure out the buffer part.  Right now I am thinking some sort of queue or FIFO.  Basicly storing the data in memory when my UI isn't active, so I don't lose data.

Dan Shangraw, P.E.


   

0 Kudos
Message 10 of 13
(3,650 Views)