06-06-2014 09:55 AM
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?
06-06-2014 10:15 AM - edited 06-06-2014 10:15 AM
06-06-2014 10:43 AM
@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.
06-06-2014 10:47 AM
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.
06-06-2014 11:12 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord