Sign in to follow this  
jfiddler

Shutdown sequence?

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Great! Thanks for the help. I didn't see that, so I must have an old manual, and maybe old software.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this