Log in

View Full Version : Potentiometer code


cilginbilgin
03-02-2011, 15:53
I was wondering if anyone can tell me if this code works.


http://img842.imageshack.us/img842/4080/potentiometer.png (http://img842.imageshack.us/i/potentiometer.png/)






vhttp://img842.imageshack.us/img842/4080/potentiometer.th.png (http://img842.imageshack.us/i/potentiometer.png/)

Uploaded with ImageShack.us (http://imageshack.us)

cilginbilgin
03-02-2011, 15:56
Victors are connected to window motors.
And window motors controls the arm.

Angle(min) = 30 degrees.

Angle(max) = 120 degrees.

Mark McLeod
03-02-2011, 18:09
It won't work, although your angles are calculated correctly.

The setpoint input (the desired position) must be is the same units as the process variable (the current position).

The potentiometer is in volts: 0-5v

You can either convert the pot voltage to match your angle range, or change your angles to be the pot voltage range.

The pot voltage min/max range will have to be measured by moving the arm to it's minimum/maximum position and reading the pot value through the LabVIEW front panel or a LV probe.

cilginbilgin
04-02-2011, 03:31
Thank you really much Mark !!!!

Alan Anderson
04-02-2011, 08:29
]The pot voltage min/max range will have to be measured by moving the arm to it's minimum/maximum position and reading the pot value through the LabVIEW front panel or a LV probe.

Or you could just measure it with a voltmeter. :P

Mark McLeod
04-02-2011, 10:05
Or you could just measure it with a voltmeter. :P

That's the answer in the Electrical sub-forum.
LabVIEW means we don't need multi-meters.:)

JamesBrown
04-02-2011, 10:42
I attached a VI I wrote to handle scaling of analog inputs, it assumes your Potentiometer has a linear taper (some have log tapers) Min and Max voltage are the voltages at the min and max angles, not necessarially 0v and 5v