Passing a variable to a sequence with beginseq()


Kaly
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share