Passing a variable to a sequence with beginseq()


Kaly

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

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

Link to comment
Share on other sites

Archived

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