01-20-2017 05:20 AM
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.
Solved! Go to Solution.
01-20-2017 08:35 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?
01-24-2017 03:10 AM
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;
}
}
01-24-2017 02:34 PM
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.