10-31-2013 03:28 AM
Hello,
I have a little problem with the automatic scaling of graphs.
First:
For the automatic scaling of axis LabVIEW uses the whole data which was sent to the graph. If I zoom inside, the automatic scaling still uses the whole data even if it is not visible at this moment. To solve this problem I read out the positons of the zoom-cursors and search the min/max values inside this area. This works.
Second:
Now I want to scale the axis using the indicated min/max values. The graphs of labview use a special scaling algorithm depending on the format of axis. I want to use this, so my idea was to sent the cut data and the format of axis to a subvi. Inside this subvi I use a waveformgraph to show the cut data and run a automatic scaling once. Now I read out the min/max values of the graph and set this values to the main graph, which I see in my program.
The result is, my main graph shows the area of the zoomed data in maximum size (scaled axis) and the hole data is still available, so I can still move the data in the graph or others.
Problem: The idea of the scaling with a grpah inside a subvi only works if the graph inside the subvi is visible. If its not, no scaling would be performed. My workaround is to open the subvi as a little window and close it automatically after scaling. That is not very nice.
Are there any other ideas how to use the automatic scaling without showing the frontpanel of the subvi?
Thanks a lot and best regards,
Michael
Solved! Go to Solution.
10-31-2013 05:31 AM
10-31-2013 05:49 AM
Thanks Gerd. I decided to show the window outside the visible area.
Best regards,
Michael