LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure - timeout

I have an event structure in a While Loop with 3 events (timeout, event 1, event 2). Event 1 and event 2 are triggered with change of a boolean control. I want to make measurements before event 1 and event 2 are started, so I thought it would be a good idea to change the timeout default of -1 to 500 (0.5 seconds). This helped reading my measurement and displaying it  on the indicator on the block diagram but now that I start an event, the system times out and kicks me out of that event before finishing up a sequence. Any suggestions?

0 Kudos
Message 1 of 5
(4,339 Views)

doh!

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 5
(4,331 Views)

@jcarmody wrote:

doh!


Ditto.

 

Let me guess, You didn't start from a  Finite Measurement sample project did you?  Don't stand on the shoulders of giants! dig right in and start hacking away at re-inventing the wheel!

 

Event timeout cases can be useful but, this is not a good example of when to use it.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 5
(4,316 Views)

In general, your acquisition should be done in another loop.  I rarely use the timeout case of an event structure, pretty much only when my state machine requires it.

 

What all do you have happening inside of your event cases?  I'm having trouble understanding exactly what your problem is.


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 4 of 5
(4,310 Views)

Changing a timeout value from -1 to something based on a condition is something I have done.  It is better to use a seperate loop for aquisition but can be done in timeout.  Or better yet you can make a event on having N samples aquired by registering for the event, then you have your Event 1, Event 2, and N samples aquired.  You'll need to post some code for us to better help you.

0 Kudos
Message 5 of 5
(4,292 Views)