LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

We are using PID control in labview but we are facing one problem.

Solved!
Go to solution
Highlighted

We are using PID control in labview, but we are facing one problem that errors are getting updated every 3 minutes but the output of PID equation is not getting updated and due to which PID is behaving like an ON and OFF control. Its not taking real time decision. Please give some suggestions.

0 Kudos
Message 1 of 4
(925 Views)
Solution
Accepted by topic author PRIYANKAdoe22
01-24-2017 01:09 AM

Can you attach your code? It will be easier to help if we can see exactly what you're doing. 

 

Did you tune the PID parameters?

0 Kudos
Message 2 of 4
(894 Views)

Thanks for replying Sir, please find the code below.

 

/*DECLARE VARIABLES */

 float32 delT; float32 e1prepre; float32 volPre;  float32 scurguess;

float32 Fsoriginal;

sset = sset + slope*tfed;

/*INITIALIZE PARAMETERS */

if (FB1start!=1) {     i=1;     Fs2 = 0; vol = batchVol;

 if (spre!=scur) { delT=t1-t;  t=t1;  } }

else                                                       /*START SUBSTRATE CONTROL */

{

if (spre!=scur)

    {e1cur = sset - scur;

     e1pre = sset - spre;

     e1prepre = sset - sprepre;

     delT=t1-t;

     vol = vol + Fs2*delT - 0.002;  /*2ml is flushed , this is previous Fs*/

     Fs2 = Fs1 + kc1*(e1cur-e1pre) + (kc1/Ti1)*e1cur*delT + (kc1/delT)*Td1*(e1cur+e1prepre-2*e1pre);

     Fs1=Fs2;

     Fsoriginal=Fs2;

     if (Fs2<0) Fs2=0;

        if (Fs2>0.3294) Fs2=0.329;

       t=t1;

       i=i+1;

      }

}

0 Kudos
Message 3 of 4
(828 Views)

You posted this in in a LabVIEW forum, and included "labview" in the message subject, but then you posted C code. Are you in fact using LabVIEW? If so, attach the LabVIEW code. If you're looking for help with C, you're posting in the wrong forum. Also, there is no way anyone could match up the C code that you posted with the problem you described.

0 Kudos
Message 4 of 4
(808 Views)