7/2/2013 11:52 AM | ||
Joined: 1/28/2009 Last visit: 1/19/2025 Posts: 6858 Rating: (1366) |
Hello loxly, as it is big thread, it is not possible to answer in one thread as it needs some checks: 1-case related to accessing parameters of PID controllers for each loop, it is saved in the instant DB associated to that.You can write to input parameters such as setpoint and also static data such as controllers' parameters like gain and integration time and ... .You can access them in program or via "watch table" with using a name of DB plus point and name of parameter e.g"loop".Setpoint". Contrary to STEP 7,TIA guide to to the variable you want just by copying the first name of variable.You can manipulate controllers' parameters from watch table just by entering the symbolic name of absolute address but the first is preferred. 2-For deadband in S7 1200 check THIS and "sPid_Cmpt.r_Lmn_Hlm",sPid_Cmpt.r_Lmn_Llm are parameters for output limiter. Also read the online manual that is avaliable by selecting the block and pressing "f1".
Best regards Hamid Hosseini |
|
Last edited by: hdhosseini at: 7/2/2013 12:01 PM |
||
This contribution was helpful to1 thankful Users |
7/2/2013 12:57 PM | |
Joined: 1/28/2009 Last visit: 1/19/2025 Posts: 6858 Rating: (1366) |
Hello, About the pending question, please wait until I find a time to brain storm and type.Wait it is campaign time. There is a problem with the PID parameters that can not be changed in normarl operation of controller(controller should be in inactive mode).Read more here: PID - changing Gain parameterI have not try that, normally i try to change controllers' parameters when it is in manual as I am afraid of bad reaction especially for gain change. about the slew rate, you mean rate limiting function? Best regards Hamid Hosseini |
7/2/2013 1:19 PM | |
Joined: 1/28/2009 Last visit: 1/19/2025 Posts: 6858 Rating: (1366) |
Hello again, That is possible with a function in SCL.This function change all steps to ramp.You can select the limiting range in BUMPLESS PID[code]FUNCTION_BLOCK FB67TITLE ='rate limiter' AUTHOR : hdhosseini VERSION : '1.0' // Block Parameters VAR_INPUT // Input Parameters input:REAL; rst:BOOL:=false; step:REAL:=0.1; //100ms call factor:REAL:=1.0; high:REAL:=100; low:REAL:=0; END_VAR VAR_IN_OUT // I/O Parameters first:BOOL:=true; END_VAR VAR_OUTPUT // Output Parameters out:REAL; END_VAR VAR_TEMP // Temporary Variables END_VAR VAR // Static Variables buffer:REAL:=0; in:REAL; END_VAR // Statement Section IF rst=true THEN buffer:=0; //first:=true; out:=0; in:=0; ; ELSE IF first= true THEN buffer:=in; first:=false; END_IF; IF input >= high THEN in:=high; END_IF; IF input <= low THEN in:=low; END_IF; IF (input > low) AND (input<high) THEN in:=input; END_IF; IF in > (buffer+step) THEN buffer:= (buffer+(step* factor)); END_IF; IF in < (buffer-step) THEN buffer:= (buffer-(step*factor)); END_IF; IF in = buffer THEN buffer:=in; END_IF; ; out:= buffer; END_IF; ; END_FUNCTION_BLOCK[/code] This is the basic version, but I remeber to change it once.I should search to find it in the forum.Read the thread you can find the description of the function.Convert it to SCL for TIA.The version was prepared for STEP 7. Best regards Hamid Hosseini |
7/2/2013 3:16 PM | |
Posts: 24 Rating: (0) |
This is my solution for deadband, what do you think? IF ABS(setpoint-PV)<=deadband PV:=setpoint END_IF where setpoint, PV and deadband are real (0.0-100.0) |
7/2/2013 10:28 PM | |
Joined: 1/28/2009 Last visit: 1/19/2025 Posts: 6858 Rating: (1366) |
Hello, OUTV = INV + DEADB_W - DEADB_O when INV < DEADB_O - DEADB_W OUTV = 0.0 when DEADB_O - DEADB_W ≤ INV and INV ≤ DEADB_O + DEADB_W OUTV = INV <= DEADB_W - DEADB_O when INV > DEADB_O + DEADB_W See the attachment Best regards Hamid Hosseini AttachmentD_BAND.pdf (2542 Downloads) |
This contribution was helpful to1 thankful Users |
Follow us on