LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Returning to a VI after a time critical interrupt

How does LabVIEW RT return to the non-time critical VI when the time critical VI is asleep? Does it restart where it left off before the it was interrupted?...or does it restart the non-critical VIs from the beginning?
0 Kudos
Message 1 of 2
(2,516 Views)
The short answer is the non-time-critical VI starts from where it left off. However, there are special cases called priority inversions where the non-time-critical VI was accessing a "shared resource" when the time-critical VI interrupted it. If the time-critical VI needs this shared resource too, the RTOS will recognize this resource contention and put the time-critical VI back to sleep. At this point, the RTOS elevates the priority of the non-time-critical VI to TIME-CRITICAL long enough to allow the non-time-critical VI to release the shared resource. Once the shared resource is relinquished, the time-critical VI can once again interrupt the non-time-critical VI, run, go back to sleep, and allow the the non-time-critical VI to continue running where it left
off.

The Knowledgebase has a few articles about shared resources and LabVIEW RT. Shared resources include the Memory Manager, semaphores, single-threaded DLLS (such as traditional NI-DAQ), non-reentrant subVIs called by two or more parent VIs, etc.
0 Kudos
Message 2 of 2
(2,516 Views)