From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

How to programmatically pause a VI?

@Brot_Sweet wrote:



Well, I am programming a QMH, which has many cases (start, load files, run files and so on), the trouble I'm trying to resolve is this:



No, that's not a "state machine" by any reasonable definition of the terms. It's a truncated picture of a diagram showing a jumbled pile of Rube Goldbeg code. Impossible to tell what's going on and what's outside the visible area or inside other cases.

Why are there So! Many! Local! Variables!? Why do you wire N when autoindexing on a FOR loop? Why is there so much duplicate code? (e.g. the code in the two sequence frames is identical except for the value of a color box! Why program it twice?)

0 Kudos
Message 11 of 12

Oh why not?  Either the code is running or it is not.  If, for any strange reason you want the code to "Break," stick Breakpoints in there!  you could even use the Breakpoint Manager to enable or disable each breakpoint.  Alternately (since you are so fond of unnecessary nested structures and good State management) just put your breakpoints in case structures that you can wire from boolean controls.


(I didn't say that was a good idea)

"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 12