program exit


Recommended Posts

Around the end of the month.

But I just remember that another user had pointed me to a Windows technique for stopping processes. He was using it to kill the windows on-screen keyboard, but I just checked it and it appears to work to stop DAQFactory. The command is:

system.shellexecute("TaskKill","","/IM DAQFactoryExpress.exe")

Of course for all you users of regular DAQFactory, you'd replace DAQFactoryExpress.exe with DAQFactory.exe

One important note: if the document has been modified (i.e. * in the title bar), DAQFactory will ask if you want to save the document, so it won't completely quit without user intervention. You could use the /F option for taskkill to forceably close DAQFactory, but this is probably not a good idea.

My thanks to Cristhian for finding this handy function!

Link to comment
Share on other sites

Actually,as I thought, there is already a quit() function. Its system.quit(). For some reason it wasn't showing up in the function list when you typed "system.", but that has been fixed.

There is also a system.reboot() and system.shutdown() function. They do what you'd think they'd do (in addition to quiting DAQFactory) and give you 30 seconds warning. Once started, you CANNOT stop it, so make sure you have everything saved before calling them.

Link to comment
Share on other sites

  • 2 weeks later...

Hello Guys,

I've programmed and debugged DAQ multiple times, sometimes I found out that DAQ is not killed / closed correctly. The app is not shown on the taskbar of Windows, but anyhow it still there when i look on the task manager --> processes. Somebody experienced this also?

I used the quit() function and system.shellexecute("TaskKill","","/IM DAQFactory.exe",""), but unfortunately with the same results.

greetings Bart van Diepen

Pro Control B.V.

Link to comment
Share on other sites

Yes, this happens. DAQFactory gets pretty entwined with the OS to make it run at full optimization, but unfortunately it sometimes can't get un-entwined on shutdown. We don't worry about it much because most everyone runs 24x7, so its more important to us to ensure there are no memory leaks and other things that would cause the running of the application to falter.

Anyhow, if you are running into this problem, try adding the /F flag to the taskkill. This does forceful termination. Its not the best way to shut down, but probably won't cause any problems, and is how you'd shut DAQFactory down from task manager if it wasn't shutting down completely on its own anyway.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.