01-05-2015 03:46 AM
Dear all,
I have a small question: I would like to create a special GUI similar to the user interface of an oscilloscope. So I have an 1D array with a lot of points and I would like to be able to for example zoom through the data. Sounds quite easy, but see the attached VI which illustrates my problem:
I am using the graph properties to programmatically configure the x axes. Everything is fine if you move the "Horizontal Scale / DIV" control to "10". The min and max values of the x-scale are calculated to be 0 and 100, the major ticks appear at the correct position and also the minor ticks look good (5 minor ticks per major tick). The problem already starts if you change the control to "9". Min and Max are still ok, but the gap between the major ticks should be 9 and not 5 (from where does he get the 5?).
Also if you enter an horizontal offset like "5" and put the "Horizontal Scale / DIV" at "10", LabVIEW draws a major tick every 5 and not every 10, like it should be.
Does anyone know, if there is an option activated here which somehow overwrites my settings?
Thanks for the Help.
Greetings Dennis
Solved! Go to Solution.
01-05-2015 06:33 AM
Probably you can get help faster if you post your VI in an earlier version, not in LV2014. (I have right now access to a LV2012 PC only)
Hm, I wonder why you want to do things programmatically? Do the built-in zoom functions not satisfy your needs (visible items --> graph palette)? You can use the zoom tool, or just change the X or Y max/min values by typing new values so you see the desired interval (if you refresh your graph frequently, turn off autoscale with via right click menu).
01-06-2015 08:40 AM
To the LV version: Maybe thats right. I have attached a LV2012 version of my test VI. The behavior is the same.
Like you wrote, I could also use the built-in functions if this is not working at all. But actually this way is not so complicated, I just have to calculate some axis properties and without this bug (?!) I would be already finished. To modify my main application to use the built-in stuff would be, I guess, more work now.
Greetings Dennis
01-06-2015 10:37 AM
I experience the same problem: somehow setting a value (like 9 or 7, etc.) to the XScale.Increment does not work as it should. I do not know what is the reason, hopefully some pro will come and explain this behaviour.
Regards,
01-06-2015 11:48 AM
Try setting XScale.Increment after setting the XScale.Maximum and XScale.Minimum.
01-06-2015 11:56 AM
Yep, this does the trick, the order matters when using property nodes...
01-07-2015 01:36 AM
Thx for the tip,
Up to now I did not know that the order matters...
Greetings Dennis