LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slider Disabled property not being read?

Good evening, this post is a bit old but see if anyone is still active. My version of LabVIEW is 2012 f3. In the examples of the forum is being used Horizontal Pointer Slide, but I need to use Vertical Pointer Slide. The question is this: In Slide-Properties-Colors, if I use the Slider-Modern I can hide if they get the Slide-Transparent, but if I use the Slider-Silver of me does not work, follow aparaciendo icon. In the examples on the forum that does not happen. How I can hide at runtime and display the Slider.
Thank you very much.
0 Kudos
Message 21 of 30
(801 Views)

Could you post a small example of what you are seeing on the forum? It is not completely clear to me what you are trying to do and what is not working.

Noah | Applications Engineer | National Instruments
0 Kudos
Message 22 of 30
(747 Views)

Thank you very much for the interest. Sorry, I am new to LabVIEW. I found the solution from typedef, had to go into: Tool Palette Set Color > Tab > Transparent. Thank you very much.

 

0 Kudos
Message 23 of 30
(737 Views)

Apologies for a long post; but I've just been having hours of "fun" with sliders as well, and then stumbled upon this thread.

 

So I have a syringe pump. I want a control that displays the current level, and has a pointer to let the user set a new desired level. To complicate matters, the new target shouldn't be sent to the syringe pump until the user lets go of the control as it may take a few seconds to move to its new target, and it doesn't like being interrupted once it's started.

 

Corollaries include disabling the control until the syringe reaches the target it was sent.

 

The first difficulty was displaying the current level but not letting the user modify it. This is accomplished by having an indicator in front of a control. The front one (the indicator) displays the level, and has a transparent needle. The needle was resized to be entirely above the level scale before making it transparent, so that the indicator's needle are doesn't mask events from the needle of the back one.

 

The second difficulty was figuring when to send a command to the syringe. "Value changed" is no good, as I don't want to keep sending commands every time the user moves a pixel. "Mouse up" works, sort of, unless the user moves away from the control (in which case the pane's "Mouse up" event can be used) or away from the window altogether (in which case I seem to be stuffed).

 

The third difficulty is letting the target be set elsewhere (by a script that may or may not be running). This isn't so hard; the script (emulated by the extra control and pushbutton) sets an LED, whose 'value changed' event is combined with the 'mouse up' on the control.

 

Some questions that I'm hoping somebody might be able to help with:

 

1. How to force the drag of the needle to end, and revert to its previous value, when the user navigates away from the control, like it would in other Windows apps. Is there a way to programmatically terminate a drag?

 

2. An alternative to the above would be to limit the mouse movement once a drag starts until the mouse is released. This seems wrong, however - having a control reset if the user changes their mind about moving it is a good thing.

 

3. How to recognise clicks on the indicator and let the control get them. I guess this can be fudged by reading the mouse click coordinates if the indicator is clicked, and generating another event to pass them to the control, which then has to work out where the pointer should be. This all sounds rather prone to going wrong if the control is ever resized, moved and so on.

 

4. How to fix the flickery update of the level?

 

I did wonder if Xcontrols can do anything for me, but it seems that I need the professional version to do that. I can't imagine persuading somebody to spend £3k to upgrade just to fix one slide control.

 

Any help very welcome!

thanks
John

 

0 Kudos
Message 24 of 30
(700 Views)

Oops. Didn't save before posting. Try again ...

0 Kudos
Message 25 of 30
(691 Views)

This all seems way too convoluted. As a first step I would get rid of most local variables and keep states in shift registers.

0 Kudos
Message 26 of 30
(683 Views)

Hm, you're right. Wood, trees etc. I've tidied it up a bit. But I still can't fix any of the original issues!

0 Kudos
Message 27 of 30
(669 Views)

Here is some attempt at a simplification. Modify as needed. For example you could make the slider tranparent while the slide is disabled.

 

 

0 Kudos
Message 28 of 30
(660 Views)

Thanks - that's very useful, as it gets rid of the flickering updates.

 

For what I'm trying to do, though, using the 'value change' event on the slider doesn't work, as I don't want to send a command (and lock the control slider) as soon as it's moved (the syringe can take a minute to travel its full length); only when the user lets go. So I used 'mouse up' to decide when to do the actual update, and kept the 'value change' to update the shift register.

 

Here's an amalgmation of thw two VIs that works, as far as it goes; but I'm still stuck with what to do if the user moves the mouse away from the control, and I never get a 'mouse up'?

 

thanks, john

0 Kudos
Message 29 of 30
(646 Views)

So I'm back to this "old chestnut" after some other things to attend to.

A curious bug has emerged: there's a certain area at the left of the 'target' pointer (but still on the pointer) that I can click on, and it actually starts a drag of the 'current' level instead. A couple of pixels to the right of the 'current' level slider.

Messing with the 'activeslider' property doesn't seem to help me.

 

I can't simply dump the 'mousedown?' event as reading 'activeslider' still says the pointer is active. By the time I get 'mousedown', 'activeslider' says the level is now active, but it's a bit late by then. I can't see any way to terminate a drag in progress programatically.

 

Any ideas?

thanks

John

 

0 Kudos
Message 30 of 30
(617 Views)