From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set number of major ticks to a predefined value in a WaveForm Graph

Solved!
Go to solution

Hi!

Is there any way to set the number of major ticks in a waveform graph to a fixed value (i.e. 10  major thicks : 0, 10, 20, 30,...., 100) ?

waveform.png

Any idea?

Thanks in advance

0 Kudos
Message 1 of 7
(2,182 Views)
Solution
Accepted by topic author mforbiz

First, you'll need to make sure the graph is big enough to be able to handle that many ticks.

 

Then you can programmatically set the increment between ticks.  But you aren't going to be able to add more than will fit.

(This looks at all range values, but you could set the property node to just XScale.Increment if you wanted to.)

0 Kudos
Message 2 of 7
(2,154 Views)

Hi!

Thanks for your reply.ùMay you share this VI?

Thanks in advance

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

It's a snippet.  Save the PNG file to your desktop, drag file into a block diagram  (assuming you have LV 2019).

 

It is easy to create.  The Xscale property is way down on the list when you go to select the property in the property node.

0 Kudos
Message 4 of 7
(2,117 Views)

Hi!

Thanks for your reply.

It works but I don't understand how it works.

I'm a teacher.

I must know how a program works to teach it to my students.

For example I don't understand why Xscale.Range there is two time or what is "increment" and so on...

May you help me?

Thanks in advance.

P.S. Thanks for snippet are very useful.

0 Kudos
Message 5 of 7
(2,110 Views)
Solution
Accepted by topic author mforbiz

You can open up context help and hover over that property node and look up the items. You may need to drill down into detailed help.

 

What do you mean by "I don't understand why Xscale.Range there is two time"?

 

Do you man that there is two different properties with the word "increment" in them?  Increment is the interval between the numbers and the bolder grid lines.  Minor increment is the interval between the fainter grid lines.

 

0 Kudos
Message 6 of 7
(2,105 Views)

Ok. Now I've understand all.

Your solution works fine !

Thanks

0 Kudos
Message 7 of 7
(2,058 Views)