10-26-2016 07:08 AM
Hi,
I have to make a sequence where I:
1) call a vi
2) wait until I get one boolean status True in vi (When Ready to Continue Seq is True)
3) left this vi running background and continue sequence
4) exit vi when the sequence wants (Send Stop Vi boolean = True to vi from sequence).
How to do that?
I have attached Example files to demonstrate the problem. Vi is ready but how to configure the sequence?
Thanks for any help!
Br,
Jick
10-26-2016 10:27 AM
Here is an example that might work for you.
I have saved the sequencefile back to 2013 version.
regards
Ray
10-27-2016 01:47 AM
Hi,
Could you also save vi back to 2013 version, thanks!
Br,
Jick
10-27-2016 01:54 AM
here you are
10-27-2016 02:15 AM
Thanks a lot!
One more thing, how can I send Stop request from sequence to vi? In your example I have to go to vi and press stop button.
Br,
Jick
10-27-2016 02:31 AM
Instead of the Wait step which waits for the user to press the Stop button on my example VI, you could use a Statement step with the expression:
FileGlobals.throbj.AsThread.Execution.Terminate()
or another way would be to read the state of a boolean in the Timeout Event such as FileGlobals.Stop and set this True in you Sequence when you want to close the VI.
Hope this helps
Ray
10-27-2016 08:07 AM
Thanks again!
By the way, why green resume arrow is disabled if I set breakpoint after do-while loop and the vi stays running on background? I need to be able to continue stepping even the vi is running.
Br,
Jick
10-27-2016 08:35 AM
you probably need to change to a New Execution rather than a thread
regards
10-27-2016 09:02 AM
I found a solution:
http://digital.ni.com/public.nsf/allkb/46D1E157756C37E686256CED0075E156
01-03-2017 06:25 AM
Hi,
I have now a problem with using this:
FileGlobals.throbj.AsThread.Execution.Terminate()
It works well BUT my UUT result status is always "Terminated" even the sequence passes/fails. How can I ignore this step status changing affect or is there any other solution?