LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

knob final value

Hello All,

 

I am using knob control with its digital display to allow the user to set the parameter value. So the user can set the value either by knob control or its digital display control. I am using event structure to capture the value change. I donot have any problem when the user uses digital display control to set the value. But when the user uses knob control to set the value, I am getting multiple values at the output. But I need to have only final value to be outputted. (I donot want to seperate the events as mouse up and value change)

 

Please provide your suggestions

 

Thanks in advance

0 Kudos
Message 1 of 18
(6,025 Views)

can you post your code for us to look at?

Tim
GHSP
0 Kudos
Message 2 of 18
(6,013 Views)

Hi Kumar NI,

 


@Kumar NI wrote:

Hello All,

... But when the user uses knob control to set the value, I am getting multiple values at the output. ...


you mean you get more events in a shorter time? What do you realize with this Knob? Do you directly trigger some hardware?

In this case you can use the mouse leave event to get the lase value, or you measure the time how long the value wasn't changed, or you use an additional button.

 

Hope it helps.

Mike

 

0 Kudos
Message 3 of 18
(6,007 Views)

How about something like this?

 

Instead of using the digital display of the knob, put a numeric indicator and the knob in a classic cluster (classic so you can hide the border/background and make it look like it's not in a cluster).

 

Put the events Knob: Mouse Up and Digital Display: Value Change in the same event case. Use the ctrl reference to find the value of the object that triggered the event, use that value to update the indicator as well as update the control.

 

This way you still only use one event case.

 

23802i0324AAB2917076E7

 

The Refnum Cluster 2 is supposed to be a reference to 'Cluster'... not sure why the snippit changed it.

 

Front panel:

23804i9232536C5D78EC25

0 Kudos
Message 4 of 18
(6,000 Views)

Hm, when reading the behavior, i would say: works as intended.

A knob of a boxed instrument does not work in another way. It also does "encounter" all the steps in between until the user stops turning the knob. So i would say: you have chosen the wrong control if you do not want to have those "interim-values".

 

Mike posted a workaround you can go with, nevertheless.....it is a workaround, not a solution.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 18
(5,995 Views)

The easiest solution for a knob is to compare the NewVal terminal to the control's terminal. If they're equal, it's the last event. If not, you can do nothing. This works because the control's terminal always holds the current value.


___________________
Try to take over the world!
0 Kudos
Message 6 of 18
(5,986 Views)

Hello All,

Thanks for your suggestions. Here attached the sample code to understand my problem clearly.

In the VI, I want to display the final value in the string output when the user changes the knob value.

0 Kudos
Message 7 of 18
(5,973 Views)

Hello Experts,

 

Do we have any solution to the above problem. Please provide your suggestions.

 

Hello Tim, I posted the sample code for your referrence.

 

Thanks

0 Kudos
Message 8 of 18
(5,932 Views)

Hi Kumar NI,

can you please explain what do you think is the "problem". I see only expected behavior.

Which result do you need if the knob is used?

 

Mike

0 Kudos
Message 9 of 18
(5,925 Views)

Hi Kumar,

 

  Take a look at this...

 

Smiley Wink

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 18
(5,919 Views)