LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update a chart each 80 ms

Hello!

We want to write our values to a chart each 80 ms but have not found how to do this. Is there any proerty one can change in the property node for the chart? Any other suggestions?

Another question, how can one change the "Chart History length" ? We want to be able to control this via a numeric control...

Thank you and best regards.
0 Kudos
Message 1 of 5
(2,507 Views)
To update the chart every 80 ms, just put a wait until next ms multiple in your loop and wire 80 into it. To tell the chart that the rate is 80 ms, wire 0.08 into X-Scale>>Offset & Multiplier>>Multiplier.
I don't of a way to control the history length programmatically. At most, you can wire an array of a certain size into the History property. Why do you want to change this? If you want the length of time displayed to change, I believe you will have to use an XY graph and simulate a FIFO using a shift register and an array.

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(2,498 Views)
As for writing to the chart every 80ms, there's no definite answer without seeing your code and how your application is setup. Basically you’ll need to setup a timer to trigger something every 80ms so you can write to the chart. Maybe putting the chart in the True case of a case structure, and every 80ms something triggers a True so the chart can be written to. If you have LabVIEW 7.0 or 7.1, there's an Express VI called Elapsed Time in the Time and Dialog palette that will do this. There is no property to do this automatically.

And more bad news, there is no property to change the history length.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 3 of 5
(2,495 Views)
Your question has been mostly answered, but let's quickly talk about changing the "Chart History length".

I don't see a good reason to change chart history at run time. Simply make it "long enough", then display only parts by modifying the axis scaling programmatically.
If you need full control over the chart history, you can use a waveform graph, create your own FIFO buffer of adjustable length, and manipulate all scaling programmatically. To the user, it will look exactly like a chart. 😉
(It's probably not worth ithe effort.)
0 Kudos
Message 4 of 5
(2,490 Views)
Hello!

Thank you for your answer! It helped a lot! About the chart history length... we do not want to change it during run-time, but one should be able to change this before one writes the values in the chart and control this by a numeric control... can this be done? We can not use a graph because of it´s feature, in our case...

Best regards and thank you all for your answers!
0 Kudos
Message 5 of 5
(2,476 Views)