LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph

Hi,

I want from one vi (myVI_MOD.vi) modify the value of a numeric indicator (voltage) placed in another vi (mySubVI_MOD.vi). I modify it using set control value [variant] with an invoke node in myVI_Mod.vi vi. Then I want update the graph in that vi (mySubVI_MOD.vi) when the value of the numeric indicator (voltage) changes its value but it doesn't work. Why?

I attach a little example done with LV 7 express.

Thanks,

ToNi
0 Kudos
Message 1 of 12
(3,172 Views)
Is it possible to wire date directly to chart with set control value [variant] with an invoke node? In my previous example I don't show the front and I don't run it because I want to do it transparent to the user (the user cannot see it, only when he opens it manually), so I also want the last update to chart was the current value (I want to make default value) so when the user opens it, he can see the last updates in the chart. Is it possible to make current values default in the chart? I use an invoke node linked to chart with method make current values default but when I open the vi (mySubVI_MOD.vi) the chart is clear, I cannot see the last updates in the chart. I don't understand why.

Thanks,

ToNi.
0 Kudos
Message 2 of 12
(3,149 Views)
I think your main problem here is that the value change is not fired when you change the value. If you want to fire it, you need to change its value using the Value (Signaling) property.
I'm not sure I understood your second post, but in general "make current values default" would not affect a chart, because a chart's value is only the last value fed to it. The other values are stored in the History property.
To better learn all these things, you may want to contact your local NI office and ask them about their courses. They do not necessarily deal with stuff like this, so you should ask them what each course includes.

___________________
Try to take over the world!
0 Kudos
Message 3 of 12
(3,141 Views)
ok, thanks very much tst but how can I change its value using the Value (Signling) property from a different vi? that is, I have a vi that changes the value of the numeric control placed in a different vi (another vi). From another vi... how can I refer to the Value (Signaling) property of this numeric control placed in that vi (different vi)?

I don't know the values of a chart were stored in the History property, thanks very much again, It is just what I need, to read all the values of the chart. Do you know aproximately how many values can be stored in the History? Can I configure how many values I want to store in the chart's history?

I'll think of doing a course of Labview, thanks tst for helping me 🙂

ToNi 😉
0 Kudos
Message 4 of 12
(3,124 Views)
ok, I already know how to configure the lenght of the chart's history. By default in my LV7 Express is 1024 values. To configure the length -> Right click mouse over the graph and select chart history lenght...

But.... when the lenght has arrived to the maximum and I want to add another value... what do LV 7? it clears the vector of values and begins to store again from index 0 of the vector or shift to left all values and put the last value that has just arrived at the end of the vector? what is its behavior?

Thanks,

ToNi.
0 Kudos
Message 5 of 12
(3,117 Views)
I have tested what happens when I want to add a value to the chart's history vector when it has arrived to its maximum length. If you configure the length to 62 and you add a value to the chart's history vector when it is full, LV 7 takes the last 62 values.

ToNi.
0 Kudos
Message 6 of 12
(3,112 Views)
To use value(signaling) and to get the history data, you should pass the reference of the control to the other VI (either by using a global variable or by opening a reference to the subVI and going through its Controls property. I think you can even copy the reference and paste it directly to the second VI, but I'm not sure). Then, wire this ref into a property node in the second VI and you can use both the value property and the history property. You don't need to use Set Control Value anymore.

___________________
Try to take over the world!
0 Kudos
Message 7 of 12
(3,110 Views)
Hi,

I get the references of the controls and indicators to the other VI. I open a VI reference, then I wire it to a Panel Property Node, and finally I wire it to a Controls[] property node so I can access to all indicators and controls of that VI but It returns to me an array of references and... how can I know the reference of the indicator I am interested in? Is there a method that returns me the reference of the indicator I am intersted in from the array of references (something like an array where you say the index of the item you want)?

Thanks,

ToNi.
0 Kudos
Message 8 of 12
(3,087 Views)
You can wire the [Controls] array into an auto-indexing loop and go over each label property until you find your control. This will be problematic if you have controls with different labels. Also, it isn't necessarily the easiest method, but it should work for this case. In general, deciding how to communicate between VIs depends on the specific program you're writing.

___________________
Try to take over the world!
0 Kudos
Message 9 of 12
(3,083 Views)
Hi again,

It works 😉 thanks tst. Here I attach my example if anyone want to modify, use or learn about how to do it.

One last question about it. How can I add values to the chart's history of my mySubVI_MOD.vi using a history property from my myVI_MOD.vi and using panel property, Controls[] property as I show you in my example? After I have the reference of the chart placed in mySubVI_MOD.vi how can I do to put an element in the chart's history with a history property? I see the value property but the history property you say I don't see, it doesn't appear in the property node to select.

Thanks,

ToNi.
0 Kudos
Message 10 of 12
(3,074 Views)