LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the Sub VI properties

Hi,
I wonder if anyone could help. I'm constructing a simulator which
communicates with a chip via the serial port. The simulator has an options
VI which gives the user a list of selections. When a selection is made the
appropriate subVI executes. Within some of these subVIs I am using a
subVI to communicate with the serial port. What I want to do is be able
to let the user change the port settings for this subVI from the options VI,
does anyone know of an easy way of doing this so that when the user changes
the settings these are used when the serial VI is used discretely within one
of the other options. I use this serial VI often throughout the program and
would therefore like a way to alter its settings at a
top level which are
then passed though to whenever it is used again. Ideally I would like to
open up a VI from the menu which enables the serial port settings to be
altered, close this VI, saving the settings, so that when other VIs are
executed from the options screen, the use of the serial VI within them uses
the last saved settings. My options VI operates on a basis that only one
option can be carried out at a time, once each option finishes its execution
the VI is shut down returning to the options screen VI again. Any help
would be greatly appreciated.

Regards,
Martin.
0 Kudos
Message 1 of 2
(2,528 Views)
Is there a reason that you can't simply stick a Serial Port Init VI into your
options VI diagram and be done with it? Once you alter the settings for a
particular port using that VI, they should remain that way for all serial I/O on
that port until you call Serial Port Init again or else change the port settings
from some other program.

The other thing that comes to mind is a global. If you really do have a large
number of VIs that need to refer to a group of settings that can conceivably be
changed from various sources, a global variable is one way to go.

--John Lum

Martin Stanley wrote:

> VI which gives the user a list of selections. When a selection is made the
> appropriate subVI executes. Within some of these subVIs I am using a
> subVI to communicate wit
h the serial port. What I want to do is be able
> to let the user change the port settings for this subVI from the options VI,
0 Kudos
Message 2 of 2
(2,528 Views)