LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NewRange

I'm looking for some input on whether this is an error or if I'm missing something with the information I've got.

I have a set of waveform charts where I set the X offset to a timestamp converted to a DBL (current time) and then add a point to the charts each second or however long of an interval.  The background behind this is I want to have one scrollbar and update all of them to have the same view (but that's not necessary to see the discrepancy/error)

So create a waveform chart, then set the X offset to the current date/time by converting a timestamp to a DBL, and then put some data on the chart until the horizontal scrollbar enables and allows the user to scroll.

I then have an event case for Scale Range Change.  It fires as soon as you move the horizontal scrollbar.  In that event case there is a property on the left wall designated NewRange.  There is also a property designated ScaleRef.  If ScaleRef is wired to a property node and the Range value is compared to the NewRange property, shouldn't they be the same? 

Trying to set the Range of my secondary plots to the NewRange of the primary plot results in all kinds of crashing/hanging/auto-shutdown behavior (memory cannot be accessed, blah blah blah).  So I finally realized that NewRange has a min and max on the order of 10 to 100 (for example) while the Range property has min/max values on the order of 3.21e9 (converted timestamp dbl).

So then what is the NewRange property and why doesn't it match the scale range?
0 Kudos
Message 1 of 7
(3,442 Views)
I tried to reproduce your problem, without any success. Here is the vi I commited...
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 7
(3,418 Views)
I left off that the X-axis is absolute date/time... sorry.  Thanks for drumming up a sample VI that was easy to mod.

It looks like the X-offset is not added into the min/max/start properties when it is returned by the NewRange cluster.
0 Kudos
Message 3 of 7
(3,394 Views)
The NewRange values are the pre-scaled X-axis properties displayed on the graph.  The Scale.Range values are post scaling.  The XScale.Offset only effects the min, max, and start values. 
Micaela N
National Instruments
0 Kudos
Message 4 of 7
(3,371 Views)
So you're saying what... that's a good thing?--or that's just the way it is?

It seems like an inconsistency to me, if nothing else then at least in terminology.  When would one actually use an unscaled Range property?  And is it even available if you're not using the NewRange property in the event handler?  It seems like if there was an "UnscaledRange" property available then NewRange should correspond with NewUnscaledRange since the "Range" property is normally scaled.

I recall reading something about coming up with great idioms and using them consistently--this is a candidate for that in my book.
0 Kudos
Message 5 of 7
(3,361 Views)
The Scale Range Change event and its properties are not supported by National Instruments.  But, I imagine one might use the unscaled range property if they were using multiple scales. 
 
Good luck with the rest of your application!
Micaela N
National Instruments
0 Kudos
Message 6 of 7
(3,352 Views)
> The Scale Range Change event and its properties are not supported by National Instruments.

I forgot about that Smiley Surprised 

Thanks Micaela.
0 Kudos
Message 7 of 7
(3,344 Views)