LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog window inside a For loop?

Hello all,

 

I am trying to manipulate an GPIB error handler to display my own messages. The error handler needs to check if both devices are connected during all iterations, if it is not display a personal error window.

 

Where would the One button dialog go?

 

If it's in the loop it outputs the dialog box with every iteration, which I think is because it checks every iteration, correct? But this is not completely what I am trying to do. When I turn off the device halfway nothing happens, all I get is dialog windows at the beginning for every iteration. If it's outside the loop it only checks once, so that's not it, right?

0 Kudos
Message 1 of 2
(2,428 Views)

Use a feedback node and only pop the error message if there is an error AND there was no error in the previous iteration. You can event stop the loop on error if that's reasonable.

 

(Seems all a bit inflexible. It would make more sense the design a state machine instead)

0 Kudos
Message 2 of 2
(2,403 Views)