Jump to content

Recommended Posts

Posted

Hi,
I need a help, 
I made PID temperature regulator in GX Works3 FBD/LD program.
I don't know  how to write my paramerers. Amount of  Proportional gain and Integral time are  P= 0.072 and  Ti=144.82s, dont use KD. ) In manual for Kp writes setting range is 1 to 32767 (%) and I dont' know how ti write my value. What meant this precentage. For Ti Setting range is 0 to 32767 (x100 ms), here I need writes my time in ms?

please help !!! 

Posted

Here's mayby something you can use.

 

Inside a FB

// Offset
OffsetTemp := Z0;
Z0 := Offset;

// PID parameters
D0Z0    := SamplingTime;
D2Z0    := InputFilterConstant;
D3Z0    := ProportionalGain;
D4Z0    := IntegralTime;
D5Z0    := DifferentialGain;
D6Z0    := DifferentialTime;
D22Z0    := UpperOutputLimit;
D23Z0    := LowerOutputLimit;
BSET( OperationDirection , 0 , D1Z0 );
BSET( OutputLimitingEna , 5 , D1Z0 );

// PID auto
PID( EnablePID AND NOT EnableMan , TargetValue , MeasuredValue , D0Z0 , PidOutputValue );

// Manual value
IF EnablePID AND EnableMan THEN
    OutputValue := ManValue;
    ELSE
    OutputValue := PidOutputValue;
END_IF;

MOV( NOT EnablePID , 0 , OutputValue);

// Restore Z0
Z0 := OffsetTemp;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...