取消
显示结果 
搜索替代 
您的意思是: 

knob loop

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.

0 项奖励
1 条消息(共 10 条)
5,596 次查看

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).

0 项奖励
2 条消息(共 10 条)
5,575 次查看

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.

0 项奖励
3 条消息(共 10 条)
5,558 次查看

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.

0 项奖励
4 条消息(共 10 条)
5,542 次查看

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.

0 项奖励
5 条消息(共 10 条)
5,537 次查看

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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 项奖励
6 条消息(共 10 条)
5,503 次查看

@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.

0 项奖励
7 条消息(共 10 条)
5,460 次查看

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.

0 项奖励
8 条消息(共 10 条)
5,438 次查看

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.

0 项奖励
9 条消息(共 10 条)
5,413 次查看

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 项奖励
10 条消息(共 10 条)
5,356 次查看