LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subtle Event Problem

Solved!
Go to solution

I have a plot as shown below, I would like the user to be able to click the scale button and the x scale precision should increase and come back to zero.

 

For example:

 

when the user first click the scale button, the xy graph X values should show [1.2  2.5  3.2 4.6  5.1]

 

the next time the user clicks, the X scale should read [1.23 2.51  3.25  4.62  5.18]

 

the next time the user clicks, the X scale should read [1.234   2.514   3.254   4.628   5.184]

 

the next time the user clicks, the X scale should read [1    2    3   4  6   5]

 

hence, the number of precision should go round - increase and come back to zero.

 

 

 

 

 

subtle event.jpg

 

I tried to use a shift register with for loop, but I do not see a way around it.

 

The other problem is that the property node I used is not even updating the precision, even without event case.

 

Any help will be appreciated.

 

0 Kudos
Message 1 of 6
(3,291 Views)

I have no problems using a shift register, +1 increment, and a Quotient/Remainder to cycle a number from 0 through 3 and back to 0.

 

But where I do have a problem is when I wire that to the Xscale.precision property node, or even just a constant to that property node, it gives an error 1435 saying the property node must take a value between 0 and 8, even though that is exactly what I'm sending to it.  (Possible Bug???)

 

Here is a snippet of the code.

 

 

Message 2 of 6
(3,274 Views)
Solution
Accepted by topic author ade77

You have to specify the format as well as the precision.  The default format does not allow you to change the precision, I'll try to dig up an earlier post where I explained this.

 

XScaleExample.png

Message 3 of 6
(3,270 Views)

Good call Darin,

 

Now I wonder why the context help or detailed help for Xscale.Precision didn't say something to that effect.  All it says if that if you wire a 9 to the format property, it will return an error.

Message 4 of 6
(3,266 Views)

I got the same weird buggy error!

 

But the following code works:

BetterFormat.png

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 5 of 6
(3,254 Views)

Funny, using LV 7.1 I always get error 1077 (Invalid porperty value), except when I use exactly the value that the scale is set to.

 

Felix

0 Kudos
Message 6 of 6
(3,241 Views)