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.
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.
12-16-2015 05:14 PM
How do I prevent a knob ring cell from rolling over when using the incrimentors? In my picture I would like to be able to use the incriment button, but if I incriment from the top, or decrement from the bottom have nothing happen. To be clear I don't want to be able to loop directly from 100 ns to 10 ms on this setting. Also, is there a way to set a property to limit what value the knob can output? For instance flip a switch and have properties in a case structure that would say "This can only output 100 ns to 500 ns".
Thanks.
12-16-2015 05:55 PM
I don't see a setting for that. I like to use an event structure, and that way you could filter out the events that you don't want (i.e. increment back to beginning).
12-16-2015 06:36 PM
Plese attach an actual VI instead of a picture.
What is a "knob ring cell"?
You can define data entry limits for knobs and you can also prevent jumps.
12-16-2015 06:45 PM
I'm fairly certain that's an enum control. Might be a listbox.
If your version of LabVIEW is recent enough then there should be a property node called "DisabledItems[]" that you can pass an array of indexes to. Whichever indexes you pass to it won't be selectable from the enum list any more on that particular control. You could use that to exclude selections not currently supported.
12-16-2015 06:51 PM
In the simple .VI below I would like to prevent jumping from 100 ns to 10 ms (going all the way around) when using the incriments on the digital display (what I called the ring cell before). In the case structure I would like to be able define a property such that the value could only be 0-2 (100 ns to 500 ns).
I didn't see any properties that would control this.
Thank you.
12-17-2015 05:42 AM
You could use In Range & Coerce to limit the range that you write to your indicator. For the control, just set the Max and Min properties.
12-17-2015 09:38 AM
@crossrulz wrote:
For the control, just set the Max and Min properties.
However, if you use the increment/decrement buttons, it will still wrap to the min once you try to go above the current max etc.
I would just hide the increment/decrement buttons and let the user chose exclusively by clicking on it.
12-17-2015 11:39 AM
I set the max and min properties I can about so that using the incrimentor doesn't allow for certain values. I don't see an option for disallowing jumps however. I would like to keep the increment buttons visible because they are quite useful, but if that is the only way to prevent jumping then so be it.
12-17-2015 01:19 PM
Perhaps you should hide the buttons and then create your own buttons that don't loop around at the end of the list. Maybe disable and grey out the button in question when it is at one extreme or the other.
12-18-2015 09:18 AM
In the Value change event for the control, check old and new value, if it goes from last to first or the other way around discard it/set it to end value.
/Y