12-29-2014 04:56 PM
I want to update at waveform chart from inside a subvi
I found this post
http://forums.ni.com/t5/LabVIEW/Update-waveform-outside-Sub-VI/m-p/2330960/highlight/true#M730536
which seems to be the solution to my problem.
It seems simple but I'm new.
Could somebody please finish the subvi attached ?
Solved! Go to Solution.
12-29-2014 05:10 PM
If it seems simple, you should take time to understand it. Nobody is here to do your homework for you.
We are more than willing to offer advice and help. But, you shouldn't ask people to write your code for you.
12-29-2014 05:17 PM
You are actually sort of close. You need to use a front panel reference control on the subVI instead of the chart control. Then you can wire the reference from your main VI to it. In the subVI you can wire the random dice to a value property node from the reference.
12-30-2014 05:16 AM
Natasftw what about the advice you are so willing to give ??
OIigarlicky thank you for your kind answer which help me a lot![]()
Forgive for being stupid – I was born that way, but could I have bit more help.
In the subVi I did like this:
But I get an error running this vi: “Object reference is invalid”
What have I done wrong?
12-30-2014 05:19 AM
forgot the attachment
12-30-2014 06:29 AM
You need to make the reference on the top level VI and pass that into a control reference on the front panel of the subVI.
12-30-2014 07:22 AM
Great !
It worked!
Thank you to OIigarlicky and Crossrulz for they help
12-30-2014 07:56 AM
The same example with cluster as input does not seem to work.
Why is that?
How can you make it work using clusters?
12-30-2014 08:08 AM
Because a chart does not accept a cluster of scalers. If you are trying to write to a cluster on the front panel, then your reference type needs to be of a cluster of the type you want to write. I highly recommend making a type def control if you really want to do this.
Though, I'm sitting here wondering what exactly you are trying to do. In my experience, passing around references to front panel controls to subVIs just to update the value is not a good idea. The property nodes are SLOW and you are generally making race conditions and making debug a major pain in the %$$@#%.
12-30-2014 08:54 AM
I have at subvi controlling mass flow controllers and reading pressure transducers
I want to see what's happening inside the subvi.
Therefore I want plot of flow and output from pressure transducers.