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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying extra buttons to a Control?!?!

I want to change a simple numerical control that has the increment/decrement buttons so that it has two sets of the increment/decrement buttons on. I want to be able to use one set for jumps of say the standard 1 unit but then the second set for smaller, say 0.1.

Is this possible, I've looked through the control editor with no luck?

If anyone knows that would be great.

If this cannot be achieved is it possible to speed up the increments when you press continuously on it because at the moment they are painfully slow?

Cheers
0 Kudos
Message 1 of 7
(2,540 Views)
Salutations,

Yeah, I found a really cheap way of doing this.

Each one will incriment a different section. Now, shrink the one so you can barely see any of the numbers, if you've got to, hide it behind the other or something, who knows. Now you've got two buttons beside the one control. Use a property node to like the ones set of buttons to the other. So it writes to it...

Hence, you get something along the lines of.

()() 6.1 where ()() are the buttons

Pressing the innermost is a direct link and will do.... (however, it's property node linked to the slightly hidden control)
6.2
Pressing the outermost activates a property node linkage and increases the most visible control to...
7.2

Just make sure you link these back and forth (using property nodes), that way the new values will always be updated... You're sort of duplicating controls, but it'll work.

Are there better methods? Great question.

Sincerely,
ElSmitho
0 Kudos
Message 2 of 7
(2,523 Views)
Oih Nuts,

If you want to increase the rate, you can do that as well. Once again, i'd suggest property nodes and maybe a function block that keeps track of how long the button has been down. Maybe throw in some case structures, so speed varies with the amount of time it's been down, to prevent a constant kind of approach no matter what the time down has been.

Keeping track of time down, might be an event structure, so once the button's clicked... that kind of a thing. I'm not 100% sure, but that should be a possibility..

I suppose that's a starting place...

Sincerely,
ElSmitho
0 Kudos
Message 3 of 7
(2,520 Views)
The simplest way to increase the speed of increment/decrement when pressed continuously is to simply hold down the shift key at the same time. And, at this time it's not possible to create an actual control with two sets of increment/decrement buttons. As the other post mentioned, you need two separate controls on the front panel and make the increment/decrement of the second control modify the first control with property nodes.
0 Kudos
Message 4 of 7
(2,513 Views)
I can think of 2 additional suggestions -
First, you can create a control with two sets of buttons by customizing the classic slide, which has buttons and a digital display. You can "disappear" the slide itself and leave only the buttons and the digital display. I'm not sure how it would hold up to resizing and the two sets would have the same behaviour, but it's 2 sets.
Second, if you're already doing all this playing with property nodes, you could try creating fake buttons. You would have to use mouse down to detect where you're clicking on the control and determine the control's value this way. You can have a subVI to do that. Make sure you use LV images to get the resizing done correctly. Once again, not perfect, but at least it's one control.

___________________
Try to take over the world!
0 Kudos
Message 5 of 7
(2,503 Views)
Thanks, I'll give it ago, had already thought about the one on top of the other, just isn't that great!!

Mayby something for the next LabVIEW version to include!!

Dennis you mention that holding down the shift key increases the speed-cannot this not be set somewhere so that it can be done without using the shift key? Or are we getting into coding to change the value via property nodes as i think Elsmitho if getting at?

Cheers
0 Kudos
Message 6 of 7
(2,495 Views)
Here's what i've done so far, but using three controls, two for the buttons and then they add together to write into the third control. Anyone got any way of making it so the buttons directly change control 3, i.e how it is each set of buttons have got to be pressed to get to zero.

Thinking about it the increment/decrement buttons could be bouleans which just add a number each time to the property node of the third control.Bit messy though

Chris
0 Kudos
Message 7 of 7
(2,490 Views)