NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

A thread problem when calling a vi

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

Download All
0 Kudos
Message 1 of 12
(4,512 Views)

Here is an example that might work for you.

 

I have saved the sequencefile back to 2013 version.

 

regards

Ray

Download All
Message 2 of 12
(4,491 Views)

Hi,

 

Could you also save vi back to 2013 version, thanks!

 

Br,

Jick

0 Kudos
Message 3 of 12
(4,473 Views)

here you are

Message 4 of 12
(4,470 Views)

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

0 Kudos
Message 5 of 12
(4,464 Views)

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

Message 6 of 12
(4,461 Views)