10-14-2010 02:07 PM
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.
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.
Solved! Go to Solution.
10-14-2010 02:45 PM - edited 10-14-2010 02:47 PM
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.
10-14-2010 02:47 PM - edited 10-14-2010 02:48 PM
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.
10-14-2010 02:52 PM
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.
10-14-2010 02:56 PM
I got the same weird buggy error!
But the following code works:
Ton
10-14-2010 03:05 PM
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