4/21/2012 11:10 AM | |
Joined: 1/28/2009 Last visit: 9/7/2024 Posts: 6846 Rating: (1365)
|
Dear friends, I encountered posts in the Forum on PID controllers in which members could not identify the function blocks related to control algorithm and find them in program call structure. List of all SIMATIC software controllers both continuous and discrete: //PID Control FB41(CONT_C) FB42(CONT_S) FB43(PULSEGEN) //PID in CFC300 FB1(CONT_C) FB2(CONT_S) FB3(PULSEGEN) //PID Temperature Control FB58 (TCONT_CP) FB59 (TCONT_S) //Standard PID control FB1 (PID_CP) FB2 (PID_ES) //MODULAR PID control FB19 (PID) I believe it has some useful points for memebrs who want to see the variations.Again, it is an open discussion and you can propose your innovative ideas. 1-Ordinary call in OB3X 2-Using Multi-instance capabilities in FBs 3- Using Multi-instance capabilities in FBs for complex loop control (Override) 4-Usings FCs for PID controllers' applications Please, avoid posting while (updating) label exists on the title. Here, we are discussing FB41 in different scenarios.For more refernce ,you can check the attachment.Also following clustered posts: PID Control Package - FB41 Samples Best regards, Hamid Hosseini AttachmentFB41.pdf (3134 Downloads) |
Last edited by: hdhosseini at: 3/6/2013 12:15 PM// Add a New Option (4th) Last edited by: hdhosseini at: 9/9/2012 5:07 PM//Updating is removed from title |
|
This contribution was helpful to4 thankful Users |
4/21/2012 11:19 AM | |
Joined: 1/28/2009 Last visit: 9/7/2024 Posts: 6846 Rating: (1365)
|
1- Block Call in FB41 in OB3X (the simplest way) See the attachment for whole project's codes. //OB35 [code]// update cycle L #OB35_EXC_FREQ ITD T "REG1".CYCLE //Read scaled analog value fron FC105 L "ANA-EIN" T "REG1".PV_IN // PID control,control option accssible via VAT CALL "CONT_C" , "REG1" COM_RST := MAN_ON := PVPER_ON:= P_SEL := I_SEL := INT_HOLD:= I_ITL_ON:= D_SEL := CYCLE := SP_INT := PV_IN := PV_PER := MAN := GAIN := TI := TD := TM_LAG := DEADB_W := LMN_HLM := LMN_LLM := PV_FAC := PV_OFF := LMN_FAC := LMN_OFF := I_ITLVAL:= DISV := LMN := LMN_PER :=MW20 QLMN_HLM:= QLMN_LLM:= LMN_P := LMN_I := LMN_D := PV := ER := L MW 20 T "VALVE1"[/code] Best regards, Hamid Hosseini AttachmentFIRST.zip (929 Downloads) |
Last edited by: hdhosseini at: 3/5/2013 5:06 PM// REVISED Last edited by: hdhosseini at: 4/21/2012 1:58 PMLast edited by: hdhosseini at: 12/10/2018 8:59:50 PM |
|
4/21/2012 4:39 PM | |
Joined: 1/28/2009 Last visit: 9/7/2024 Posts: 6846 Rating: (1365)
|
2-Using Multiple-instance capabilities to make complex control structures reusable.In this sample, I only use it once but it can be changed further for complex tasks such as Override control (Sample#3). reference: How do you create and update multiple instances? Attachment2nd.zip (883 Downloads) |
Last edited by: hdhosseini at: 3/5/2013 5:18 PM//REVISED Last edited by: hdhosseini at: 4/21/2012 4:45 PMLast edited by: hdhosseini at: 12/10/2018 9:00:49 PM |
|
This contribution was helpful to1 thankful Users |
3/6/2013 12:26 PM | |
Joined: 1/28/2009 Last visit: 9/7/2024 Posts: 6846 Rating: (1365)
|
And the final way would be using functions.I came across the idea from HERE.The original user program was deleted due to "copy right" issues because it contains a function from "Standard PID Control Package".The important point would be how to interface the PID related data to global data.See the attachment for more information.It is worth mentioning when an FB presents in the "Blocks" folder in STEP7,You can create instance data block with same data structure. AttachmentFOURTH.zip (889 Downloads) |
Last edited by: hdhosseini at: 3/7/2013 10:29 PM// REVISED Last edited by: hdhosseini at: 3/6/2013 12:29 PM |
|
This contribution was helpful to1 thankful Users |
3/8/2013 11:20 AM | |
Joined: 10/10/2010 Last visit: 4/28/2024 Posts: 307 Rating: (15) |
thank you |
3/8/2013 12:38 PM | |
Joined: 7/3/2011 Last visit: 7/1/2024 Posts: 81 Rating: (0) |
Thank you |
5/9/2014 12:03 PM | |
Joined: 4/24/2009 Last visit: 8/20/2024 Posts: 2682 Rating: (135) |
New question was splitted to calling PID Best regards O_Moderator |
11/18/2015 8:55 AM | |
Joined: 9/3/2014 Last visit: 3/13/2019 Posts: 4767 Rating: (123) |
New question published by KUBAI is split to a separate thread with the subject Creating PID control in S7-200 for steam control. Best regards |
Follow us on