LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating RPM setpoint

Hi,

 

I currently have a motor with its speed being controlled by the wiper position (0-255) of an 8 bit digital potentiometer (SPI Communication). Instead, I want to be able to create an input which is the desired/setpoint RPM in order to implement a PID controller. I know, for example, that wiper position 100 = 50 RPM, etc. I am using a myRIO.

Block with Dpot.PNG

Thanks in advance.

 

0 Kudos
Message 1 of 4
(1,910 Views)

Post your actual VI and subVI.

 

You are using a bunch of Express VI's which means the real code doing the work is hidden in the background.  And since you only posted a picture, there is nothing we can click on to see how those Express VI's are set up!

0 Kudos
Message 2 of 4
(1,881 Views)

Attached is the VI and SubVI I am using

 

Thanks for your help.

Download All
0 Kudos
Message 3 of 4
(1,875 Views)

Hi kevlenahan,

 

It sounds like you already have the values you need to create at least a rudimentary PID (or at least 'feedback') system.

Your measured value is the Rev/Min Gauge, and your control variable is the Wiper Position value.

 

Assuming that the wiper position controls the resistance in a monotonic fashion, you need to increase the value to increase/decrease the RPM, and then decrease to decrease/increase (depending on direction of wiper) the RPM.

 

You might (will?) run into problems when you set a value that doesn't correspond to a specific wiper position - in that case, you'll presumably oscillate between adjacent wiper positions.

You'll need to decide if you want to just stick with the closest, or if you can change the wiper fast enough to get a kind of adapted value. A capacitor over your output might help here... (no promises).

 

If instead you can provide an analog output voltage (and the current draw is not too large - may or may not be true depending on your system configuration) you might be able to do that with much greater than 8 bit resolution more easily (also allowing you to drop the SPI communication).


GCentral
0 Kudos
Message 4 of 4
(1,851 Views)