LabVIEW

cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Knob

Hello,

    I have a knob that changes the voltage on a power supply over GPIB.  How do I make the program only change the voltage when the knob is moved, rather than continuously even if the knob doesn't change?

Thanks

0 Kudos
Message 1 of 4
(3,085 Views)
try event structure,use mouse up event 
é™ˆę ‘å­¦
QQ:276509891 .
EMAIL:CSXCS_366@126.COM
qq群:78561268 80754347 37591940
http://labview.weebly.com/
ę–°ä¹¦ć€ŠLabVIEWå®žē”Øå·„å…·čÆ¦č§£ć€‹å·²ē»å‘å”®ļ¼Œę•¬čÆ·å…³ę³Øć€‚
0 Kudos
Message 2 of 4
(3,064 Views)


@USChris wrote:
    I have a knob that changes the voltage on a power supply over GPIB.  How do I make the program only change the voltage when the knob is moved, rather than continuously even if the knob doesn't change?

Well, why would it change the voltage if the knob is not moved? wouldn't that result in the same, unchanged voltage. I;)  assume you only want to send a command if the value actually changes.

The exact implementation depends on the rest of your code. if the loop needs to spin because of other code, place the voltage update code inside a case structure. Using a shift register, compare the current with the previous value and execute the update case only if they are different.

If the loop can pause until something happens, you can use an event structure for "knob:value changed". IT will only execute whenever the knob changes.

0 Kudos
Message 3 of 4
(3,059 Views)
Thanks.  I don't have the event structures, since I only have the base package, and evidently this is not included.  I did however get it to work with the shift registers.  Thanks for the help.
0 Kudos
Message 4 of 4
(3,036 Views)