Jump to content

urgent need!


boss_aks

Recommended Posts

hello ppl,

i am completely new to this lab view .....the place where i work we often need labview to control our equipment......but we need a bit more than that,,,,we nw need a proper pid to ctrl our readings... being a novice i cant evn thnk of makng one by myself....we had plans of buying a pid module but my boss said that no money n make it urself.....so is der ne1 who cn help me in this...i did found a pid example on the forum posted by sum kind n genious person but i wasnt able to connect it to our existing Current Voltage module....

pls help

Link to comment

QUOTE (LV_FPGA_SE @ Dec 11 2008, 04:33 PM)

Doing a little research (i.e. Googling) you should be able to find enough info online to get a good idea of how to implement the PID algorithm. If you'd look on http://en.wikipedia.org/wiki/PID_algorithm' rel='nofollow' target="_blank">Wikipedia you'd find the following pseudocode. This is a pretty good summary of the basic PID algorithm. So try implementing this in LV. Kp, Ki, and Kd are the gains for each of the three components.

previous_error = 0
integral = 0 
start:
  error = setpoint - actual_position
  integral = integral + error*dt
  derivative = (error - previous_error)/dt
  output = Kp*error + Ki*integral + Kd*derivative
  previous_error = error
  wait(dt)
  goto start

Thank you so much for your response. I have one more doubt which again might be quite stupid comapred to the standards set by this forum. Where do I put this code?

Link to comment

You don't use the code directly.

You can either rewrite it so it can be used in a formula node (c like code) or implement the code using the standard LV numeric functions.

Shown in the attached picture is the algorithm implemented in standard LV numeric functions.

I have also added some windup (Integral) and output limits.

On a technical note; that there are several different PID algorithms that all behave differently, I.e. not all PID's are alike.

The one shown is just one (see http://en.wikipedia.org/wiki/PID_controlle...ndard_PID_form)

Also a big thanks to Ton, how cool is his code capture tool, well done mate.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.