LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Loop Asynchronous Wakeup

Is there a way to command an "Asynchronous Wakeup" in a timed loop?  The only way I can find to communicate asynchronously with a timed loop is to use the "Stop Timed Structure" vi, which also kills my loop.  I would like to be able to trigger the timed loop to execute an extra cycle asynchronously without losing my regular timing synchronization, and it would be nice to know that it is not a normal cycle using the "Wakeup Reason" node.

 

 

Thanks,

David R. Asher

Certified LabVIEW Architect since 2007
0 Kudos
Message 1 of 2
(2,803 Views)

Hi David,

 

One way to approach this would be to extend the capabilities of the "Stop Timed Structure" feature by reading a queue in the "Aborted" case of your timed loop. Based on the content of the queue, you can determine what to do (i.e. abort or do something else).

 

Off hand I don't know a way to get the timed loop to execute again from within the structure so you might have to duplicate the code in the "Normal" case in your "Aborted" case. That's a bit ugly, but maybe there is a way to avoid this, I'm not sure. If your code in the "Normal" case is all placed in a subvi, then it wouldn't be too bad to include this in the "Aborted" case when you have determined from the queue that you want to run the normal code.

 

The only downside would be that you have to make sure the queue is set to the operation you want at all times. Perhaps a single element queue would be a good option.

 

steve 

Message Edited by stevem181 on 11-04-2009 01:30 PM
Message Edited by stevem181 on 11-04-2009 01:34 PM
----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 2
(2,792 Views)