View Single Post
  #2   Spotlight this post!  
Unread 19-01-2009, 13:35
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: Making global variables in LabVIEW.

What's the question?

If you right-click on the "cRIO" in your LabVIEW project window, you should be able to create a "global" that you can copy whatever controls and indicators you'd like into. The "global" actually looks and feels exactly like the front panel of a VI. It's just a container for arbitrary data.

You can drag any variable within the global into any VI within the project and share the data.

You can probably also modify the global that is in the default project by adding new variables.

Globals can be very useful for sharing data across VIs that are called from the same "main" VI. Just be careful with race conditions and multiple writes to the same variable at the "same" time (especially if you've got multiple programmers who want to write to a single global variable). In general, I like to limit "writes" to one VI and let every other VI "consume" the data.

Russ
Reply With Quote