Bay Area LabVIEW User Group

Highlighted

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
(4,178 Views)
1 REPLY 1

Re: Usage tip for LabVIEW Elapsed Time Express VI

Yuo need to set "AUTO reset" ture.

0 Kudos
Message 2 of 2
(1,094 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.