Skip to content Skip to navigation

Connexions

You are here: Home » Content » Global Variables in LabVIEW

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Global Variables in LabVIEW

Module by: Felix Annan. E-mail the author

Summary: This module discusses the Global Variable component as an instrument for data transfer between virtual instruments within a LabVIEW application

Global Variables as their name suggests are variables that can be observed from any VI within the shared memory space of an application. All global variables can be grouped unto a single front panel which then serves as a global variable holder. By placing controls and indicators on it the programmer is basically placing variables in memory that can be referred to in each VI in the application in order to transfer data. Global variables, like all variables in LabVIEW must be set to either be read from or written to in order to be used. They are the closest in description to that found in most procedural/event programming models with forms and their variables

The Advantage:

  1. They are easy to set up

The Disadvantage:

  1. Since they store only one value at a time they are best used for non continuous data for which the loss of some values is not a threat to the successful run of the whole program.
  2. The user will have to set up loops that will keep checking the value of the global variable in order to determine if and when its value changes.

The global variables are best used for simple information that generally does not change too often.

Implementation:

The global variable component is available from the structures sub-section of the programming functions. Once placed on the block diagram, double clicking on the component allows one to access the global variable holder(front panel).

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks