|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Potentiometer use in Labview
I have a simple example of the basic code side on this page about a quarter of the way down, labeled Analog Input example.
But what you're looking for is probably the PID Example close to the bottom. That demonstrates the use of a steering potentiometer to position a motor based on the position of a joystick. For your fixed position arm you'd replace the whole joystick input with just a constant = the exact voltage you'd want the arm potentiometer to read when the arm is where in a fixed position. You'd have to add a case statement to chose the different values you want the pot to have. Last edited by Mark McLeod : 21-01-2011 at 16:34. |
|
#2
|
||||
|
||||
|
Re: Potentiometer use in Labview
Its pretty easy once you get started, the starting from the example Mark posted, the Analog get returns the value of the potentiometer as a voltage, you can start making this.
You should change the .5 to whatever value you want the motor to run at, and the 2.4 and 2.5 to where you want the motor to stop at which value on the potentiometer, you should also change the way this is done once you get used to PID controls, as this is a really mediocre way to code this, but it works as a proof of concept. |
|
#3
|
|||
|
|||
|
Re: Potentiometer use in Labview
Thank you all very much, u helped me a lot
![]() Last edited by Arthur But' : 21-01-2011 at 18:02. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|