Starting a Sequence with Python


Recommended Posts


I wanted to start a Sequence from my Python Script. For now I just can load a sequence, but I still have to click on the start button. Is there a way to automize it? And how can I close the DAQ Factory Express from my Python script after my Sequence has finished?

Hope for a quick response


Link to comment
Share on other sites

So you just want to start DAQFactory, start a sequence, then when the sequence is done, quit DAQFactory? I can't help you with how to start DAQFactory from python, though its probably some sort of shell command. However, to start DAQFactory and load a document, the command line would be:

daqfactoryexpress c:\mydocument.ctl

replacing mydocument with the name of your doc and adding whatever path info you need. Inside your document you should mark the desired sequence as AutoStart. Then it will run when the document loads. To then get DAQFactory to quit when the sequence is finished, just add this line to the end of the sequence:


You may want to add some error catching so that if an error occurs, DAQFactory still quits. It'd be something like this:

   ... all your script to do whatever it is you do

Any errors inside the try/catch block will be caught and system.quit() will run no matter what.

Link to comment
Share on other sites


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