LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding A PID Control Function using plain LabVIEW or the Control Design Toolkit to work as an actual controller

Hi, I've currently got a setup where a feedback of actuator position is converted to digital for LabVIEW through a daq board, with the program then outputting a digital signal to control an actuator. Its got basic functions on it, eg gain and desired position.

I need to add a PID control to this current AD/DA VI file, or wouldn't mind doing using a different VI file.

I basically require the PID control to work in reality, with the ad/da signals.

I do have LabVIEW, and also the control design toolkit.

Can anyone please help me?

Much thanks for your time
0 Kudos
Message 1 of 13
(9,810 Views)

Hi viksen there are some examples in LabVIEW with this go to help>> Find Examples you can use for example the one PID Control Single Channel

Hope this helps

 

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 2 of 13
(9,801 Views)
Sorry, I forgot to add that I'm not using DAQmx, but doing it manually. I'm a beginner at this and am really stuck.

I've attached my basic file to the post so you can have a little look, and a screenshot as you may not be able to open some parts of the file due to my non-popular DAQ board. Please note that the DA value is not required, as I'm using the control ouput instead of this, and that the chart has now been modified to show error vs controlk output.

If I could get some help, I'd be extremely grateful.
Download All
0 Kudos
Message 3 of 13
(9,784 Views)

Hi Viksen,

Here's some information on PID control in LabVIEW. This tutorial explains a bit about PID Theory and how to implement PID control in LabVIEW:

http://zone.ni.com/devzone/cda/tut/p/id/3782

And here's a simple PID demo VI with a number of different examples included:

http://zone.ni.com/devzone/cda/epd/p/id/2382

Let me know how you get on with these.

Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 4 of 13
(9,754 Views)
Thank you very much for the response Sarah.

I'm aware of the basic theory of PID, and the links you posted are also helpful. I was just puzzled as to how I would incorporate the PID examples into my own VI file. I have an AD input (as a feedback), and a DA output ( control output). I'm puzzled as to how I would could use the example with this.

Looking forward to your reply.

0 Kudos
Message 5 of 13
(9,741 Views)
Hi Viksen,
 
If you understand PID control then it should be quite easy to implement the example I sent you into your code. All you have is one input, just use your A/D value as the the input in the Simple PID Demo VI.
 
If you want to implement more complex PID control then I recommend the PID toolkit:
 
Kind regards,
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 6 of 13
(9,720 Views)

I tried to load the Simple PID demo but received an error that the program is too old to update in LabView 2010.   

 

Is there a update version or even a program screenshot on the basic approach for implementing a PID controller without the toolkit?

 

 

0 Kudos
Message 7 of 13
(7,877 Views)

Josh,

 

Give this a shot. I use it for a pressure controller. No Add-on's req'd.

 

-Ian

 

 

0 Kudos
Message 8 of 13
(7,872 Views)

Sorry,

I am totally new and need to control a motor which is attached to a spring using PID or LQR. The motor attachment to a spring allows us to vary the stiffness of the spring thus making it an absorber. By placing the absorber configuration on a three story building we hope to reduce the vibration of the floors of the building. I already attached a sensor to the third floor of the building and another one to the mass of the absorber. By varying this two (adding or subtracting it) I hope to get a single output which the PID or LQR will work on to send a signal to a d.c motor and sequentially turned it clockwise or anticlockwise.

Please I dont mind be taught to go about this step by step. Kindly assist if you can. Thanks.

0 Kudos
Message 9 of 13
(7,695 Views)

Hi Osmosis,

 

Thanks for using the NI Forums! As you can see, this forum is relatively old. I would suggest posting a new question on the LabVIEW forums with your query and any code you have created so far. If you would like to learn further about training please contact your local NI branch and they will be able to assist.

 

Kind regards,

Ashish Naik
Automotive Business Development Manager
National Instruments UK
0 Kudos
Message 10 of 13
(7,673 Views)