Execute an Event Case Immediately When Starting an Application

Updated May 3, 2018

Reported In

Software

  • LabVIEW Full
  • LabVIEW NXG

Issue Details

I want my LabVIEW application to immediately execute a particular case in my event structure and then wait for normal events to occur.

Solution

You can add a shift register on the while loop to control the timeout condition that gets initialized to 0 (no delay) and then overwritten with -1 (infinite wait) after the first iteration.


The timeout case will contain your initialization code, within which you can also include additional event conditions. See the VI snippet below.



When you run the attached VI, it executes the [0] case immediately and then waits infinitely for value changes on either of the two addends. After the first iteration of the while loop, it behaves exactly like a typical event structure.

WAS THIS ARTICLE HELPFUL?

Not Helpful