05-31-2011 08:14 AM - edited 05-31-2011 08:15 AM
Here is a simplified diagram. You can also use jcarmody's timing method in place of this event structure. I hope this helps!
05-31-2011 08:33 AM
Ah.. someone one was here before me Well my example is another way to do it.. Not the best one in my opinion, but quite easy to put together.
05-31-2011 08:33 AM
Hi,
This will solve your problem I suppose. Have a look..
Regards,
Nitzz
(Give Kudos to good Answers, Mark as a solution if your problem is Solved)
05-31-2011 08:37 AM
Thank you all people for taking your time and helping me out
10-14-2014 05:38 PM
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
10-14-2014 05:52 PM
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.
10-14-2014 06:14 PM - edited 10-14-2014 06:14 PM
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.
10-14-2014 07:00 PM
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.
10-15-2014 12:14 AM
@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?
10-15-2014 12:26 AM
i created this vi using SM and openG periodic trigger. can some one provide an equivalent funtionality using event structures or something better.
Thanks