Running a sequence once in 8 days

Recommended Posts


I want one of my sequence to run once in 8 days such that the rebooting of the computer in between should also not hamper the regular sequence operation. For eg., if my first date and time of the sequence run are 04/01/2019 3:00 am, the next run time of the sequence should be 04/09/2019 3:00 am. The next run time should still be the same even if the computer or the DaqFactory was turned off sometime in the middle.

What would be the best way?

FYI, it might be an easy fix but I'm pretty new to the DaqFactory.


Share this post

Link to post
Share on other sites

I would probably create a Test channel with a History and Persist of 1 to store the next time the sequence should run, then have another sequence always running looking to see if that time has past.  So, the Test channel could be like "NextMySequenceTime", Device Type: "Test", D#: 0, I/O type D to A, Channel #0, Timing 0, History 1, Persist 1.

Then create a sequence marked auto-start, or that is started by your auto-start sequence:

if (isempty(nextMySequenceTime))
   nextMySequenceTime = systime()

   if (systime() < nextMySequenceTime)
      nextMySequenceTime = systime()


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