Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Programmatically Change Default Values of Global Variables

Primary Software: LabWindows/CVI Development Systems>>Base Package
Primary Software Version: 2.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems>>LabVIEW Full Development System

Problem:
How can I save the default value of a global variable?

Solution:
There is no direct way to do this because a global variable is like a VI, and it saves the values internally. So the VI must be stopped in order to be able to modify it.

A work around is to add an additional delay in the main VI to wait until all of the values are closed, then save the default values using a second VI.


Below is an example of how this is done. Just open the toplevel.vi then the reader.vi to see that the global variables are communicating

Related Links:

Attachments:


Save_Global_Default.zip - Save_Global_Default.zipflow chart.bmp - flow chart.bmp



Report Date: 01/10/2007
Last Updated: 08/17/2007
Document ID: 459HUS7N

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit