LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop button on dynamic call

Solved!
Go to solution

I am using the packet sniffer example in my code with some modifications to calculate delay of my transmitted data.

I need to make a dynamic call to run this VI at some point of my main code and stop at some other point.

Just to test I put some delays between run, stop and get delay as below:

 

teste_dynamic.png

 

But in the VI that I am calling, the stop button is inside an Event structure... like here:

 

sniffer.png

So... even if I try to stop the VI in my dynamic call it seems that my VI will not read this change... only read if I manually stop in the VI.

so I try to stop in the first VI but doesn't stop.... what could be a solution for that??

 

thanks,

Thais

0 Kudos
Message 1 of 3
(2,175 Views)
Solution
Accepted by topic author tmarques

Solved problem. I just inserted the stop button in the same case where is Timeout, now I can guarantee that this value will be read.

0 Kudos
Message 2 of 3
(2,143 Views)

That's because using Ctrl Value.Set is programmatically setting the value of the control, it doesn't trigger a value change event.  If you were in the same VI, it is like using the Value property node when you would need to use Value(Signalling) in order to force the value change event to fire.

 

Another way to do this would be to register a user event and send it to the subVI, and generate a user event to fire an event case.  Then you wouldn't need to use the timeout case to effectively poll your stop button.

0 Kudos
Message 3 of 3
(2,133 Views)