Shutdown sequence?


jfiddler

Recommended Posts

Is it possible to create a sequence that will always run before daqfactory quits, or a page unloads? I'd like to be sure and always put some devices in a known state, even if the program is quit from the window's close box. I see that the device driver has such a function, called "unload", but I don't see how I have any access to that since it comes from labjack.

Link to comment
Share on other sites

Yes, the most recent versions of DAQFactory have an OnShutDown sequence. You can read about it under Sequences - System Events in the help/user manual. Basically you just create a sequence called "OnShutDown" and that sequence will be called when DAQFactory exits, or the document unloads (i.e. new doc, or load a different doc). There is no event for page change however. For this, you should simply create buttons to change your pages and in the button actions, put your code and then change the page in code (page.strCurrentPage = "Page_0" for example). You'll then need to run your app in runtime mode so you don't accidently change the page through the workspace.

Link to comment
Share on other sites

Archived

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