LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric property bug?

I have a numeric that I am using a property node to control the max and min inputs. What happens is that if I go back and forth between properties they dont seem to set correctly all the time. In this example you can see the problem. First run the VI and set property node 1. It should work correctly within Property 1 parameters. Then set Property 2 and it will work correctly within property 2 parameters. If you set Property 1 again and then try to change the value below 300 it will decrement. It should not as the min value is 300. Am I missing another property that I should be setting?
0 Kudos
Message 1 of 3
(2,846 Views)
Not quite a bug. It happens because numeric's value when you are trying to set the range. Therefore, it's important to properly change the properties (in the right order). Attention - properties are executed top->bottom.
For example, when switching from prop2 to prop1, the attempt of setting minimum to 300 is unsuccessful because numeric value is 0 and LV will keep minimum to 0. To solve the problem, firs set maximum, then value followed by minimum. Anyway, pay attention that you'll have problems when switching back. Thus, manage the change with 2 different property nodes.

Hope this helps
Message 2 of 3
(2,846 Views)
That works. I new that they executed from top to bottom too and still didn't think of that. Thanks for the help. On another note I dont get any kind of error for setting the property node to a value that is out of range.
0 Kudos
Message 3 of 3
(2,846 Views)