LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Properties

Hi,

I am building an application that contains a sub-VI with a Waveform Graph control in it. I wonder if it is possible to change the properties of that Waveform Graph outside this sub-VI, so before the sub-VI will be called. How to do this?

Greetings

Davy
0 Kudos
Message 1 of 4
(2,917 Views)
You will first need to open a reference to the subVI from your main VI using the 'Open VI Reference' function from the Application Control palette. The create a Property Node from the refnum created by the 'Open VI Reference' and select 'Front Panel' as the property. From the panel refnum that is created, create another property node with 'Controls[]' selected as the property. This will give you an array of refnums to all the controls and indicators for your subVI. You'll then need to read the 'Label' property of each refnum to find the graph so you'll have the correct refnum to operate on.

The attached image shows how this may be done. Don't forget to close all those references.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 2 of 4
(2,917 Views)
Thanks Ed, that's clear to me.

Davy
0 Kudos
Message 3 of 4
(2,917 Views)
If your sub-VI will be called every time you want to display a graph (and then exited before the next graph is displayed) you can take a simpler approach than using references. Use controls on the sub-VI front panel and connector to accept property values from the calling VI. The sub-VI will then use Property nodes to modify the graph.
See the attached LabView 6.1 examples.
If your sub-VI will remain open and you want to modify it on the fly, control references (as EODICKENS suggests) are probably the best way to go.
0 Kudos
Message 4 of 4
(2,917 Views)