08-09-2013 10:39 AM
I am trying to generate an event at a fixed interval. This code works but it seems to heavy for what I am trying to do. Any suggestions?
08-09-2013 01:20 PM
@LabVIEW1234 wrote:
I am trying to generate an event at a fixed interval. This code works but it seems to heavy for what I am trying to do. Any suggestions?
What makes you to think the code is heavy...??
Why dont you directly enqueue 'Acquire' in lower loop??
I'll suggest you, instead of Wait (ms) function, use Wait Until Next ms Multiple function.
08-11-2013 12:06 AM
What you should look at is the producer/consumer (with events) design pattern. It's a better place to start. Put your acquisition in the producer loop and use the event to pass the acquired data to the consumer loop.
Mike...
PS: You are using the correct wait function for most applications. Only use the "next multiple" one if you are trying to roughly synchronize two loops.