Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Creating Deterministic Applications Using the Timed Loop (ETS, VxWorks) (RT Module)

LabVIEW Real-Time Module 8.2 Help
August 2006

NI Part Number:
370622D-01

»View Product Info

Separate time-critical tasks from non-time-critical tasks and place them in a different Timed Loop in an RT target VI to ensure the time-critical tasks receive enough processor resources. A Timed Loop executes a subdiagram each iteration of the loop at the period and priority you specify. The higher the priority of a Timed Loop, the greater priority the structure has relative to other timed structures on the block diagram. Use deterministic communication methods to share data locally from the time-critical Timed Loop or to share data remotely across a network.

The following figure shows the block diagram of an RT target VI that contains two Timed Loops to control a data acquisition and logging application.

The time-critical loop set to the higher priority of 100 contains a subVI that performs a data acquisition task every iteration of the loop. The time-critical loop shares the acquired data with the non-time-critical loop using a shared variable, data. Shared variables can share data deterministically from a VI running on an RT target without affecting the determinism of the VI. The non-time-critical loop with a priority of 50 logs the acquired data that it reads from the shared variable data to disk on the RT target.

Cooperatively Yielding Timed Loop Execution

Because of the preemptive nature of Timed Loops, they can monopolize processor resources. A Timed Loop might use all of the processor resources, not allowing lower priority tasks on the block diagram to execute.

You must configure a time-critical Timed Loop with a period large enough to perform the time-critical task and still have extra idle time during the iteration to allow lower priority tasks to execute. By timing Timed Loops, you can yield the execution of time-critical tasks and cooperatively relinquish processor resources to other lower priority tasks on the block diagram.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit