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
(2,991 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
(2,970 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
(2,965 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
(2,942 Views)