02-05-2012 05:55 PM
LV 2010, Win Vista.
The HELP for AUTOSCALE RANGE CHANGE event says:
Generated when the minimum or maximum value of the scale of a graph or chart is changed through autoscaling. This event is useful if you want to register user changes and then adjust the functionality of the graph based on those changes. Details |
Clicking the DETAILS link leads to these alleged details:
Generated when the minimum or maximum value of the scale of a graph or chart is changed through autoscaling. This event is useful if you want to register user changes and then adjust the functionality of the graph based on those changes.
However, it doesn't seem to work.
Here's a JING: http://screencast.com/t/SyvViqMZc
The code uses a TIMEOUT event to generate data for the chart..
As the black scale changes due to autoscaling, I would expect the event to fire, and a log entry made.
It doesn't happen on LV2010.0
It doesn't happen on LV2010.1
It doesn't happen on LV2011.0
Am I missing something?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-05-2012 06:16 PM
More Info: using the SCALE RANGE CHANGE event (rather than the AUTOSCALE RANGE CHANGE event) gives me an event when I type in a new MIN or MAX for a scale.
This happens even if AUTOSCALING is on, so that if I change the MAX to 2.0, the event tells me that MAX is now 2.0, even though autoscaling just reduced it back to 1.2, but it doesn't tell me THAT. If that's useful, I don't see how.
The HELP for this event says:
Generated when the user changes the minimum or maximum value of the scale of a graph or chart. The minimum or maximum value changes when the user enters a new value in a scale marker, pans or zooms the graph or chart, or the graph or chart autoscales. This event is useful if you want to register user changes and then adjust the functionality of the graph. Details |
And, the alleged details are merely a copy of the original words.
Either I am missing something, or the AUTOSCALE operation doesn't send this event, as it should.
This behavior is the same in LV 2010.0 and LV 2011.0, I didn't try LV2010.1.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-05-2012 06:22 PM
I tried two SEPARATE loops, one to send data to the chart (causing autoscaling opportunities) and another to respond to the events.
I was thinking maybe that giving new data from the TIMEOUT event was masking the AUTOSCALE event.
No joy.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-06-2012 08:46 AM
Steve,
I wrote a quick test VI to check and it is working correctly in my test VI. Could you post your code (or a snippet of it) so we can find out what is wrong.
My test VI is in LabVIEW 2011 SP1.
02-06-2012 08:52 AM
Attached is a test program to generate data and log the events.
The log will show MANUAL changes (where you type in a new MIN or MAX), but no AUTOSCALE changes.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-06-2012 09:13 AM - edited 02-06-2012 09:16 AM
OK, I ran your code in LV2011.0 and it works.
I back converted it to 2010.0 and it works.
So what's the difference?
--- You have the data generated in a SEPARATE loop from the event structure. I tested that and found no joy, but my second loop ALSO had an event structure, though the only event was a timeout.
--- You have two plots on the chart, I had four.
--- You're simply counting the events, I'm trying to generate a LOG string.
--- You're using a GRAPH, not a chart.
On the surface, I don't see any reason for any of those to make a difference. I gotta figure it's the separate-loop idea somehow. Maybe feeding the data from an EVENT case masks the EVENT that the new data generates.
Or maybe the CHART version is broken.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-06-2012 09:53 AM
Well, I've confirmed again that generating the data and feeding the chart in a separate loop from the loop that's detecting events changes nothing.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-06-2012 04:50 PM
Hi Steve,
I've made some little modification to your VI, and while it is not the complete solution, I am confident that it will give you great idea on how to solve your issue. The modifications are in the value signaling in the timeout event. Something I've discovered is that the event you are trying to use only detects changes in the autoscale when these are generated by the user. For a complete solution, I would suggest that the operation I've added to the timeout event should be repeated for all of the signals.
I hope this helps!
Carlos O
Applications Engineer
National Instruments.
02-06-2012 05:07 PM
the event you are trying to use only detects changes in the autoscale when these are generated by the user.
That makes no sense to me.
That would mean:
1... The term AUTOscale range change doesn't mean what I think it means, or what it means everywhere else. AUTO doesn't mean "manually generated", in my book.
2... The help is completely wrong when it says: "Generated when the minimum or maximum value of the scale of a graph or chart is changed through autoscaling."
3... The CHART operates differently from the GRAPH in this respect. That seems unlikely.
Your code doesn't detect the difference between AUTOSCALING changes and MANUAL changes. I'm not 100% sure that's important in my case, but that's what I was going for - I need to remember what the USER sets, regardless of what the DATA says.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-07-2012 08:48 AM
Steve, the problem appears to be with the chart. It does not appear to be generating Autoscale events. I redid my VI (attached below) with a chart and it does not work. The graph works correctly. I have file CAR 336743 on the issue. My apologies for the inconvenience.
As a possible workaround, use a graph and buffer the data yourself. You may want to decimate for display if your data is likely to get large.