Sign in to follow this  
KenMandile

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.

Share this post


Link to post
Share on other sites

How do you know its not starting?  Its possible that you have script in their that is erroring out.  I'd have to see the .ctl doc to say for sure.

Share this post


Link to post
Share on other sites

That may be a timing issue which initialization. For example, the sequence references a channel, but that channel hasn't been read.  I'll look for your doc.

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Sorry for the slow response was called away on another project, you input helped to solve the problem, thank you very much.

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