Auto-Start Not Working


Recommended Posts

I have a program that has been working fine for a few weeks, but now, when I restart it, the auto-start sequence does not start when I open the file.  I can manually start the sequence and it runs find, but it will not start on its own.  As a test, I turn on auto-start in another sequence.  That one also would not auto-start.

Link to comment
Share on other sites

I have somewhat of a similiar situation I have put together a program and everything appears to work fine. I added a online/off line descriptive text component, the objective of the online/offline component was to have the application initialize in the offline state, once the component is selected the program items would then begin to display information from the alalog channel. I have attached a copy of my ctl file, any help with the would be great. I am new to the DAQ Factory environment but thus far it seems like powerful and user friendly I am sure with a little time thiings will flow nicely for me.Demo.ctl

Link to comment
Share on other sites

IntelSen, I don't think you have the same situation.  Ken is saying the Auto Start sequence isn't auto-starting.  Your auto-start sequence I'm guessing is running, it is very short.  What you want is to be able start the application without taking data and then switch it on.  There are several ways to do it.  Personally I prefer to have the system always collecting data, then control the display of that data.  I'd do that by creating a second set of channels and copying the data over, but only if some flag was set.  That, however, can get a bit out of control if you have lots of channels.

 

Alternatively, you can simply change the timing of the channels to 0 to stop acquisition, and set them to the desired value to get things started again, or simply use readGroup.  Let's demonstrate this last option.  Assuming you have a bunch of input channels that you want to read at the same interval:

 

1) put all your input channels in their own group.  Make sure no output channels are in this group.  For this demostration, call it "inputs".  Also, set the timing of the channels to 0.

2) create a sequence:

 

private nexttime = floor(systime())+1

while(1)

   waituntil(nexttime)

   channel.readGroup("inputs")

   nexttime += 1

endwhile

 

If you don't make the sequence Auto-Start, the system will start up "offline" as you say.  You can then create a button to start your sequence.  Once the sequence starts, it will take data once a second (determined by the += 1 in the second to last line).  To make it go offline again, just stop the sequence.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

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