LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph

Hi,

About my previous question, I think that when I get a reference to the chart (placed in mySubVI_MOD.vi) and I add values to it (from myVI_MOD.vi) using the reference I got, the values automatically go to the chart's history, is it true?

Thanks,

ToNi.
0 Kudos
Message 11 of 12
(448 Views)
You're right. I overlooked this.
This has to do with how object oriented programming works. Properties are divided into classes - if you look at the properties list, you will see it is divided into several groups. Some of them will appear for everything (like Visible and Position) and some will only appear for certain things (like X-scale for graphs of Boolean Text for booleans).
Since we asked for an array of all the controls in the subVI, the property node doesn't know what kind of control we want, so it only gives us the general properties. We have to tell it what kind of control we want.
Generally, this would be done with To More Specific Class by telling to we have a chart, but if you look in the help for the History Data property, you will see that it is only available with strictly typed refnums. This means you have to wire a reference of an existing chart to get the property, so create a reference from the chart in the top VI and wire it into the Target Class input. Then wire the reference from the other VI into Reference and wire the reference coming out into the property node. Now you should have that property.

Wiring the values into the Value (signaling) property is just like wiring them into the terminal - they will go into the chart's history.

___________________
Try to take over the world!
0 Kudos
Message 12 of 12
(441 Views)