Potentiometer code

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

Victors are connected to window motors.
And window motors controls the arm.

Angle(min) = 30 degrees.

Angle(max) = 120 degrees.

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.

Thank you really much Mark !!!

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

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

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

Pot_to_Angle.vi (6.33 KB)


Pot_to_Angle.vi (6.33 KB)