LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping parallel loops on serial error

Hi, I was wondering how to stop a parallel while loop when a serial error has occurred. In my picture below I would like the lower loops to stop when an error occurs in the serial vis in the upper loop. As you can see I tried using a local variable, but it doesnt work. Thanks.

 

test.jpg

0 Kudos
Message 1 of 8
(3,170 Views)

Hi nicrip,,

 

are you sure you're writing a TRUE to "connection 2"? Why not wire a TRUE constant? Or use some other scheme like notifier or queue?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,166 Views)
Hi GerdW, I also did try writing a true to connection 2, and it didnt work either. How would I go about using a notifier or queue?
0 Kudos
Message 3 of 8
(3,163 Views)

Hi nicrip,

 

What do you mean by "didn't work"?

 

When writing a TRUE to connection2 the lower loop doesn't stop??? Or did the loop stop earlier (because of missing/wrong initialization)? Did you test with a probe or breakpoint? What are the results?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,157 Views)
Hi GerdW, it seems that the lower loops stop, but the entire VI doesnt stop. What I really would like is for the entire VI to terminate (abort execution).
0 Kudos
Message 5 of 8
(3,154 Views)
Wait, it appears to be due to the wait on occurence in the bottom left loop. If I remove this, the entire VI stops properly. How do I make it so that I can keep it, but stop waiting on the occurence? Thanks.
0 Kudos
Message 6 of 8
(3,151 Views)

Hi nicrip,

 

well, using the timeout-input of the WaitOnOccurance? (And check afterwards if timed out?)

Or destroy the occurance, so the WaitOnOccurance will also stop waiting. (That's the quick&dirty way...)

Message Edited by GerdW on 10-18-2009 03:14 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 8
(3,127 Views)
Hey GerdW, thanks for the help, I managed to get it working well enough now by placing the WaitOnOccurance in a case structure, and using booleans in my loops. May not be the best, but its working. Thanks again!
0 Kudos
Message 8 of 8
(3,124 Views)