6/13/2012 2:06 PM | |
Joined: 1/28/2009 Last visit: 9/10/2024 Posts: 6849 Rating: (1365)
|
Hello , Based on the data provided, it is not really difficult to store "Recipes" in structures in DBs and make them effective in case of you want to use.For actuators, I suggest using a set value make it ON(Open) and another to OFF(Close) and small band of hysteresis if required.Test this function as it re-usable,Customize it for your requirements: FC1: [code] L #set_high L #hys +R L #process TAK >=R S #v_on R #h_on L #set_low L #hys -R L #process TAK <=R R #v_on S #h_on[/code] OB1: [code] CALL FC 1 set_high:=1.000000e+002 set_low :=2.000000e+001 hys :=1.000000e+000 process :=MD100 h_on :=Q0.0 v_on :=Q0.1[/code] Hope this helps Best regards, Hamid Hosseini |
6/13/2012 2:22 PM | |
Joined: 11/9/2008 Last visit: 8/23/2024 Posts: 410 Rating: (6) |
Hi hdhosseini, Thanks for your quick reply but their is no relation between temperature setpoint and Heater & Drain on/off. It is totaly independent operation. Operator will select on/off condition for Heater and drain valve by using drop down menu. If he want to on the heater for tank-1 in receipe-1 then he will select on condition for perticular tank. If any doubt please ask me. Waiting for your reply, Yogendra G.
|
6/13/2012 2:36 PM | |
Joined: 1/28/2009 Last visit: 9/10/2024 Posts: 6849 Rating: (1365)
|
Hello again, Let's clear some points: 1-Just one actuator activated when we reach the limit.OK! 2-There is only one set value in your each tank.I think there should be 2! Make it a bit more clear ,please! Best regards, Hamid Hosseini |
6/13/2012 3:00 PM | |
Joined: 11/9/2008 Last visit: 8/23/2024 Posts: 410 Rating: (6) |
Hello I have 5 no.of recipe. In that there is 3 paramaeter 1. Temeperature Setpoint 2. Heater on/off 3. Drain valve on/off. I am using Temp. Setpoint for different operation. It is not releated to heater & drain valave operation. Before starting process operator will set following parameter. for e.g for recipe-1 Tank-1 1) Temp. SP is 20 2) Heater is on 3) Drain Valve off for e.g for recipe-2 Tank-1 1) Temp. SP is 40 2) Heater is on 3) Drain Valve on for e.g for recipe-3 Tank-1 1) Temp. SP is 60 2) Heater is off 3) Drain Valve on for e.g for recipe-4 Tank-1 1) Temp. SP is 40 2) Heater is off 3) Drain Valve off for e.g for recipe-5 Tank-1 1) Temp. SP is 23 2) Heater is on 3) Drain Valve on Note:- Operator will select Heater and Drain Valve on/off manully as per process requirment.Their is no releation between Temp. setpoint and Heater, drain valve on/off process. If any doubt please ask me. Waiting for your reply, Yogendra G. |
6/13/2012 3:43 PM | |
Joined: 1/28/2009 Last visit: 9/10/2024 Posts: 6849 Rating: (1365)
|
Hello again, For storing all data in a systematic and classified way in DB, I suggest using UDTs as shown in attachment.They can accessed via their absolute address in your entire project.If you assign symbol to your created "DB", you will option to access all elements just by typing their name.Check the example here: [code] L "test".tank1.SET_VALUE L "test".tank2.SET_VALUE[/code] You can check all procedure illustrated in numered Snapshots. Hope this helps Best regards, Hamid Hosseini AttachmentUDT_2.zip (142 Downloads) |
6/13/2012 5:34 PM | |
Joined: 1/3/2006 Last visit: 2/19/2024 Posts: 726 Rating: (71) |
Hi |
Last edited by: manmeet at: 6/13/2012 5:35 PM |
|
6/14/2012 8:05 AM | |
Posts: 2348 Rating: (264)
|
Hello, YogendraG. I dont understood your task - you say operator enters parameters manually every time he wants to perform operation. Why you need recipes then? Recipe is used when you have variables with different values sets. Ex. In your case recipe can be called Temp_SP+Heater_condition+Valve_condition. And you have 5 recipes as (10.0/0/0; 20.5/1/1;30.0/1/1; 40.0/1/1; 55.5/1/1). Operator in this case in NOT allowed to define anything except this list - he can't set 35.0/1/0 because there is no such recipe. Can you try to explain your task once again with relation to terms above? |
This contribution was helpful to1 thankful Users |
6/14/2012 11:30 AM | |
Joined: 11/9/2008 Last visit: 8/23/2024 Posts: 410 Rating: (6) |
Hi Aret, I have 11 no. of process tanks. Before starting process operator will select required recipe. if operator select recipe-1 then following parameter will pass to PLC. e.g Recipe-1 Tank-1 Temp_SP(20)+Heater_condition(off)+Valve_condition(on) Tank-2 Temp_SP(30)+Heater_condition(off)+Valve_condition(on) Tank-3 Temp_SP(40)+Heater_condition(on)+Valve_condition(on) Tank-5Temp_SP(50)+Heater_condition(off)+Valve_condition(off). .... Up to Tank-11 Recipe-2 Tank-1 Temp_SP(40)+Heater_condition(on)+Valve_condition(on) Tank-2 Temp_SP(60)+Heater_condition(on)+Valve_condition(on) Tank-3 Temp_SP(80)+Heater_condition(off)+Valve_condition(off) Tank-5Temp_SP(90)+Heater_condition(off)+Valve_condition(off). .... Up to Tank-11 Recipe-3 Tank-1 Temp_SP(40)+Heater_condition(off)+Valve_condition(off) Tank-2 Temp_SP(60)+Heater_condition(on)+Valve_condition(on) Tank-3 Temp_SP(80)+Heater_condition(on)+Valve_condition(on) Tank-5Temp_SP(90)+Heater_condition(off)+Valve_condition(off). .... Up to Tank-11 As per process requirment operator will change recipe.At a time only one recipe will run. Operator will put 0 and 1 for Heater & Valve off/oncondition. Note:- I am not using any standred function of Wincc. I want write logic in PLC. Regards, Yogendra G, |
6/14/2012 12:18 PM | |
Posts: 2348 Rating: (264)
|
Ok. Ten try following structure - UDT1 : STRUCT Temp_SP : REAL; Heat : BOOL; Valve: BOOL; res_bool_02: BOOL; res_bool_03: BOOL; res_bool_04: BOOL; res_bool_05: BOOL; res_bool_06: BOOL; res_bool_07: BOOL; res_byte : BOOL; END_STRUCT DB1 "Recipe_1" Tanks: ARRAY[1..11] OF ГВЕ1 END_DATA_BLOCK DB10 "Recipe_2" Tanks: ARRAY[1..11] OF ГВЕ1 END_DATA_BLOCK ....DB123 "Current_receipe" Then when operator choses receipe number 1 you just copy corresponding DB (DB1 for example) to DB123. Then operator can change something in current receipe DB and start machine. |
Follow us on