cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

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

Baixar tudo
0 Kudos
Mensagem 1 de 12
5.676Exibições

Here is an example that might work for you.

 

I have saved the sequencefile back to 2013 version.

 

regards

Ray

Baixar tudo
Mensagem 2 de 12
5.655Exibições

Hi,

 

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

 

Br,

Jick

0 Kudos
Mensagem 3 de 12
5.637Exibições

here you are

Mensagem 4 de 12
5.634Exibições

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
Mensagem 5 de 12
5.628Exibições

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

Mensagem 6 de 12
5.625Exibições

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

0 Kudos
Mensagem 7 de 12
5.613Exibições

you probably need to change to a New Execution rather than a thread

 

regards

 

0 Kudos
Mensagem 8 de 12
5.610Exibições
Mensagem 9 de 12
5.606Exibições

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?

0 Kudos
Mensagem 10 de 12
5.368Exibições