LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While loop, wait function and stop button!

Solved!
Go to solution
Solution
Accepted by topic author sifeet

Here is a simplified diagram.  You can also use jcarmody's timing method in place of this event structure.  I hope this helps!sample code.JPG

Message 11 of 24
(2,922 Views)

Ah.. someone one was here before meSmiley Happy Well my example is another way to do it.. Not the best one in my opinion, but quite easy to put together.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
Message 12 of 24
(2,909 Views)

Hi,

 

This will solve your problem I suppose. Have a look..

 

wait2.PNG

 

Regards,


Nitzz

(Give Kudos to good Answers, Mark as a solution if your problem is Solved:smileywink:

Message 13 of 24
(2,908 Views)

Thank you all people for taking your time and helping me out Smiley Very Happy

0 Kudos
Message 14 of 24
(2,902 Views)

hello,

I have a similar sequence structure except that the time input to waitms function alternates for 5 and 55 seconds. need to repeat this process until it is 5 minutes.

how best to implement with an event stucture? i also need the current time displayed continuosly for both 5 second timer and 55 second timer on the front panel

 

help

Thanks

0 Kudos
Message 15 of 24
(2,238 Views)

You will want a state machine.  That way you can go between your different states: idle (use an Event Structure to check for user inputs, allow for a timeout), check time (sees how long has passed), and then whatever other actions you need to do.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 24
(2,230 Views)

Why does everyone insist on posting screenshots for their SOLUTIONS?  How are you supposed to know what goes on on the other events or other cases?

 

NitzZ, what happens when the user adds another event to the event structure?  If that event fires, the timeout is reset.  Using a timeout for timing isn't recommended for that reason.  Unless, of course, you WANT it to get reset every time something happens.  You know, like resetting the time on a screensaveer every time you move the mouse.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 17 of 24
(2,222 Views)

The only reasonable reason that I have found to use time-out in an event structure for timing is to call a seperate timing function and check whats going on.

 

Just for future reference too, I use a couple of timing methods that go true when they detect that they have entered a new period of certain time for most of my code. These can then be used to trigger more specific programs within a case structure.

 

Download All
0 Kudos
Message 18 of 24
(2,205 Views)

@ogk.nz wrote:

The only reasonable reason that I have found to use time-out in an event structure for timing is to call a seperate timing function and check whats going on.


Your VI are owned by Timing.lvlib that you failed to attach.

The code also seems quite fragile and convoluted. Can you show us an actualy use scenario?

0 Kudos
Message 19 of 24
(2,179 Views)

i created this vi using SM and openG periodic trigger. can some one provide an equivalent funtionality using event structures or something better.

 

Thanks 

Download All
0 Kudos
Message 20 of 24
(2,175 Views)