From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure with separate buttons to trigger individual cases?

Solved!
Go to solution

Yes, since the case should only execute once and then wait again, an event structure is more appropriate here.

 

A few comments.

  • You don't need the wait because the loop does not spin unless needed.
  • You also need to add an event for the stop button.
  • You could combine all buttons into one event case to simplify the code.
  • How often do the address, resource, and output of the prologix subVI change? If they are static during the subVI execution, they belong before the loop. 
0 Kudos
Message 11 of 13
(1,308 Views)
Solution
Accepted by topic author martinv

Here's one possible solution to keep it all in one event case for simplified editing. (I made some other assumptions, so modify as needed).

0 Kudos
Message 12 of 13
(1,299 Views)

Thanks for additional comments and the vi.  It was very helpful.

0 Kudos
Message 13 of 13
(1,272 Views)