LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph ignores settings

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(3,225 Views)

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).

0 Kudos
Message 2 of 7
(3,201 Views)

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

0 Kudos
Message 3 of 7
(3,167 Views)

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,

0 Kudos
Message 4 of 7
(3,152 Views)
Solution
Accepted by Tyri

Try setting XScale.Increment after setting the XScale.Maximum and XScale.Minimum.

Message 5 of 7
(3,144 Views)

Yep, this does the trick, the order matters when using property nodes...

0 Kudos
Message 6 of 7
(3,133 Views)

Thx for the tip,

Up to now I did not know that the order matters...

 

Greetings Dennis

0 Kudos
Message 7 of 7
(3,107 Views)