Bay Area LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Usage tip for LabVIEW Elapsed Time Express VI

Hello all,

I just finished using the Elapsed Time Express VI in a practice application, which proved to be a lot trickier than I expected.  I wanted to share what I learned in the hope that another user will find this useful.

A section of my program waits for a user response (from a front panel pushbutton) while in a timed While loop (see the attached image).  Either the loop would exit immediately if the pushbutton was pressed or loop exit would occur after the express VI's Time has Elapsed boolean became TRUE (timeout).  The problem that I ran into was that this While loop would work properly when executed the first time my application accessed it, but the express VI Time has Elapsed output would not reset as needed for my application when this While loop was accessed again.  I got a hint of what was going on when I read Gary Johnson's LabVIEW Graphical Programming book, in which he mentions that this express VI uses the First Call? primitive internally to control its reset behavior.

To fix this, I used a shift register in the While loop to pass a TRUE boolean to the elapsed time express VI's reset input only once, allowing it to time out appropriately.  No doubt a timed structure could be used for this application as well.

Best regards,

Oliver Barrett

www.linkedin.com/in/orbarrett

0 Kudos
Message 1 of 2
(6,400 Views)

Yuo need to set "AUTO reset" ture.

0 Kudos
Message 2 of 2
(3,316 Views)