12-01-2013 03:37 PM
Can I normalize the chart x axis range from 0 to 100 regardless of the number of samples while the program is running ? I think it needs to be done dynamically each time a point of data after 100 is plotted. I don't want to reinitialize the chart each time it collects the 100th data point if that means the chart clears and starts from 0 again.
Is there a property node/s that I can use to dynamically change the chart / graph maximum y value?
Thx
Solved! Go to Solution.
12-02-2013
10:50 AM
- last edited on
05-05-2025
06:58 PM
by
Content Cleaner
There is a way to programatically change the number of points in the chart history without having to use property nodes:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YI6UCAW&l=en-US
If you want to use a property node you can set the x-axis min or max and a number of other properties dynamically. To create a property node simply right click the Waveform chart in the block diagram and click create > property node, then choose the approriate property. Here is a help file on property nodes in case you are not familiar with them: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/property-node.html
Attached is a screenshot of one I made on your vi, please let me know if this helps or if this is not what you're asking about. You may also try playing with the chart types to see if there is a simple way to do what you want: https://www.ni.com/docs/en-US/bundle/labview/page/types-of-graphs-and-charts.html
Hope this helps!
12-02-2013 09:05 PM
Rob,
The xscalemin and max do not work. It looks like it is trying to write all the points from 0 to 100 after it exceeds 100 back to the chart. This creates a two plots, the data that is being charted and the initial data between 0 and 100.
I believe I need to do something with an array or the Xscalemarkervalues{} property node. I think each point after 100 has to replace the point at 100. The rest of the data points would be shifted toward zero. Each time the previous 0th data point would be discarded. I don't know how to execute this but will work on it later when I get a chance.
My code has a DAQ assistant but you can replace it with the control to simulate 0-5vdc input .
Thx
12-03-2013
12:10 AM
- last edited on
05-05-2025
06:58 PM
by
Content Cleaner
I think this link describes how to do it but I am struggling with the implementation.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YI6UCAW&l=en-US
12-03-2013 02:49 PM - edited 12-03-2013 03:06 PM
I believe this does what you want, I simply selected the last 100 values from the data array and plotted those. Let me know if this helps.
12-03-2013 08:13 PM
Rob,
You nailed it !!! Thanks for your help !!!
I removed xmin / max and x / y autoscaling to polish chart behavior.
Thanks
12-03-2013 08:13 PM
Rob,
You nailed it !!! Thanks for your help !!!
I removed xmin / max and x / y autoscaling to polish chart behavior.
Thanks
12-28-2013 11:14 PM
A graph was used in the previous solution. My original question was how can I normalize the x axis range between 0 and 100.
Attached is my solution using a chart.