LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fixed time interval event

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?deleteme.png

0 Kudos
Message 1 of 3
(2,442 Views)

@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?deleteme.png


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.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 3
(2,428 Views)

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.


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,400 Views)