LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Behavior of EVENT_AXIS_VAL_CHANGE

I like the new interactive graph features in CVI 8.1, but it seems to me that the EVENT_AXIS_VAL_CHANGE event does not function very intuitively when the axis has a gain != 1.0.
 
I have a chart with an xaxis gain value != 1.  (plotting an FFT with the axis gain = bin size).  If the upper limit of the chart is 1000Hz and the user types in 1000Hz as the new upper limit, I would expect the chart to stay at 1000Hz.. but it doesn't.  The chart applies the new value to the axis as a PER gain value. 
 
A simple fix would be to apply the gain to value enter by the user BEFORE calling the control callback function.  Otherwise I always have to capture the callback event and even then it is very difficult (unless I'm missing something?) to figure out which value, the min or max, I have to adjust.
 
I can capture the change and apply gain myself but I still run into some very annoying things that I have to track.  For example, if the user changes the POST gain limit of Minimum axis value to something that is bigger than the pre-gain limit of the maximum value, then GetAxisScalingMode returns what the user typed as a the new min axis value.. as the max value (since the post gain number they typed was bigger than the current pre-gain max axis value).  Follow that? 
 
In some cases I can PlotXY so that I don't need axis gain, but in other cases, like intensity plots, that is impractical.
 
Regards,
Greg
 
 
 
0 Kudos
Message 1 of 2
(2,724 Views)
Hello Greg,

The behavior you're describing is unintentional, and would be considered a bug. I was able to reproduce this behavior for most combinations of previous max/min, and gain/offset, and as such this needs to be fixed in an upcoming maintenance release.

Sorry for the inconvenience, and I definitely appreciate you taking the time to report this.

Luis
0 Kudos
Message 2 of 2
(2,699 Views)