Sign in to follow this  
Kaly

Passing a variable to a sequence with beginseq()

Recommended Posts

Is it possible to pass a variable to a sequence in Daqfactory when using the beginseq() command? I know it can be done by declaring the sequence as a function and then calling the function but then the function will run in the thread of the calling sequence. I want to pass a variable to a sequence by using beginseq(). Alternately, is there any way to run a function in it's own thread?

Thanks

Share this post


Link to post
Share on other sites

Not directly.  But you'd simply have to create a global variable, set that variable, start the sequence, then use the variable inside the sequence.  I suggest naming your globals something with the sequence name, for example: mySequence_variableName.  

There are ways to run functions in their own thread, though this is usually best done inside an object to avoid losing track of the thread.

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