02-07-2013 01:53 PM
I have a main sequence file. In the main, I have a sequence call that intializes an oscilloscope and returns to main. Next main action, I have the user turn on a power supply and confirm with a message popup. My issue now is, I need to create a new thread before the 'turn on power supply' action so the oscilloscope catches all inrush and keeps recording. So if this is the case, what I am trying to do is:
Oscilloscope Initialize sequence call
Oscilloscope Fetch sequence call
Message Popup, turn on power supply, confirm with 'OK'
- Now, ever since the user turned on the power supply I need compare all data, even during the time user turns on power supply and clicks 'OK' and after.
So, I am needing an oscilloscope running in parallel and comparing data while the main sequence is running. Any help would be appreciated.
Solved! Go to Solution.
02-08-2013 06:10 AM
The sequence call step type has an option to call a sub sequence in a new thread.
Oscilloscope Initialize sequence call
Oscilloscope Fetch sequence call ( call in a new thread and it will be acquiring signals until it gets a stop signal from main seq.)
Message Popup, turn on power supply, confirm with 'OK'
Delay if required
Set the stop signal for the thread to close.
Hope this helps.
02-08-2013 09:44 AM
@SunRS wrote:
The sequence call step type has an option to call a sub sequence in a new thread.
Oscilloscope Initialize sequence call
Oscilloscope Fetch sequence call ( call in a new thread and it will be acquiring signals until it gets a stop signal from main seq.)
Message Popup, turn on power supply, confirm with 'OK'
Delay if required
Set the stop signal for the thread to close.
Hope this helps.
Thank you. Very much what I am looking for. I have a script set up but yet to test it. When I call the fetch sequence, I labeled it as a 'new thread' but how would I use a 'stop signal' in the main sequence to stop the fetch thread? So, once I call the fetch sequence and return to main, the fetch sequence will continue running and gathering data, or what I tell it to do, until I call it to stop in the main sequence, correct?
02-10-2013 01:08 PM
I am attaching a sample sequence.
You need a common variable between the main sequence and the thread to stop it.I used file globals.
02-11-2013 09:50 AM
Thank you Sun. After your original response I went back and made it very similar to what your example provided so seems I was on the right track.