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

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Using a Functional Global (LabVIEW 2-Style Global) to Increase Determinism.

8 ratings | 3.38 out of 5
Print

Downloads

Filename: functional_globals.zip
Requirements: View

This example demonstrates how you can use a functional global variable, instead of a standard global variable, to increase the determinism of your time-critical code. This example includes the following three VIs:
1. Time Critical Priority Loop VI - This VI, set to time-critical priority, reads from the Global VI every second. If the Global VI is busy, the Time Critical Priority Loop VI skips it. Right-click on the Global VI placed inside of the Time Critical Priority Loop VI to see that the option "Skip Subroutine Call if Busy" has been selected.
2. Normal Priority Loop VI - This VI, set to normal priority, reads from the Global VI as quickly as it can. The Normal Priority Loop VI does not skip the Global VI if the Global VI is busy.
3. Global VI - This VI acts as a Functional Global, which is also called a LabVIEW 2-Style Global. The Global VI is set to subroutine priority which allows other VIs to skip the Global VI if the Global VI is busy. When the other VIs skip the Global VI, the Global VI returns the front panel indicator default values. The default for the "Skipped?" output of the Boolean front panel indicator is True.
Run the Time Critical Priority Loop VI and the Normal Priority Loop VI at the same time.

Requirements


Filename: functional_globals.zip

Software Requirements


Application Software: LabVIEW Full Development System 5.0
Language(s): LabVIEW

 
8 ratings | 3.38 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).