|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FB MAIN GLB: Global operation mode programme |
|
|
|
Network 1: Impulse fault acknowledgement #P00.FLT_CmpltMaACK_Imp := NOT #P00.FLT_CmpltMaACK_REg AND "HMI KEY".SYS.GLB.F1_AckKey; #P00.FLT_CmpltMaACK_REg := "HMI KEY".SYS.GLB.F1_AckKey; |
|
|
|
Network 2: Call plant safety program #P00.GLB_Estop := "E00 Estp Fb"; |
|
|
|
Network 3: Call faults monitoring #FLT(FLT_MODULE := #P00.FLT_PlantIS); |
|
|
|
Network 4: Query failure complete machine #P00.FLT_CmpltMaIS := #P00.FLT_PlantIS OR "DI MAIN P01".M01.FLT_ModuleIS OR "DI MAIN P02".M02.FLT_ModuleIS OR "DI MAIN P03".M03.FLT_ModuleIS OR "DI MAIN P04".M04.FLT_ModuleIS; IF #P00.FLT_CmpltMaIS THEN #P00.FLT_CmpltMaSR := TRUE; END_IF; IF #P00.FLT_CmpltMaSR AND NOT #P00.FLT_CmpltMaACK THEN IF #P00.FLT_CmpltMaACK_Imp THEN #P00.FLT_CmpltMaACK := TRUE; END_IF; ELSIF NOT #P00.FLT_CmpltMaIS AND #P00.FLT_CmpltMaACK THEN #P00.FLT_CmpltMaSR := #P00.FLT_CmpltMaACK := FALSE; END_IF; |
|
|
|
Network 5: Assign signal light column (modular signal tower) complete machine #P00.SLC_Lamp_RD := #P00.FLT_CmpltMaIS AND NOT #P00.FLT_CmpltMaACK AND "M00 Clock_1Hz" OR #P00.FLT_CmpltMaSR AND #P00.FLT_CmpltMaACK; #P00.SLC_Lamp_YE := NOT (#P00.FLT_CmpltMaSR OR #P00.AutoCmpltMa_run) AND (#P00.ManuCmpltMa_run OR #P00.InchCmpltMa_run AND "M00 Clock_1Hz"); #P00.SLC_Lamp_GN := #P00.AutoCmpltMa_run; |
|
|
|
Network 6: Query plant at home position #P00.HomPosAll := "HMI KEY".Message.PT201_Pressure_Maintenance_reached AND "HMI KEY".Message.PT101_Pressure_Maintenance_reached; IF #P00.HomPosAll THEN #P00.HomPosSR := TRUE; END_IF; |
|
|
|
Network 7: Start operating mode AUTOMATIC IF "HMI KEY".SYS.GLB.F3_OM_AUTO_ON THEN #P00.OM_AUTO_ON := TRUE; #P00.OM_MANUAL_ON := #P00.OM_HOME_POS_ON := #P00.OM_INCHING_ON := #P00.ManuCmpltMa_run := #P00.InchCmpltMa_run := FALSE; END_IF; IF #P00.OM_AUTO_ON AND "HMI KEY".SYS.GLB.F5_Start AND ("HMI KEY".Execute.CIP_Selected OR "HMI KEY".Execute.Production_Selected OR "HMI KEY".Execute.Drainage_Selected) THEN #P00.AutoCmpltMa_run := TRUE; END_IF; |
|
|
|
Network 8: Start operating mode INCHING IF "HMI KEY".SYS.GLB.F15_OM_INCHING_ON AND #P00.HomPosSR THEN #P00.OM_INCHING_ON := TRUE; #P00.OM_MANUAL_ON := #P00.OM_HOME_POS_ON := #P00.OM_AUTO_ON := #P00.ManuCmpltMa_run := #P00.AutoCmpltMa_run := FALSE; END_IF; IF #P00.OM_INCHING_ON AND "HMI KEY".SYS.GLB.F5_Start THEN #P00.InchCmpltMa_run := TRUE; IF #P00.CmpltMaRun_Imp THEN "HMI SYS".TP1500Comfort.AreaPoint.ControlRequest.JobNumber := 51; "HMI SYS".TP1500Comfort.AreaPoint.ControlRequest.Parameter_10 := 201; END_IF; END_IF; |
|
|
|
Network 9: Start operating mode MANUAL IF "HMI KEY".SYS.GLB.F4_OM_MANU_ON THEN #P00.OM_MANUAL_ON := TRUE; #P00.OM_HOME_POS_ON := #P00.OM_AUTO_ON := #P00.OM_INCHING_ON := #P00.AutoCmpltMa_run := #P00.InchCmpltMa_run := FALSE; END_IF; IF #P00.OM_MANUAL_ON AND "HMI KEY".SYS.GLB.F5_Start THEN #P00.ManuCmpltMa_run := TRUE; END_IF; |
|
|
|
Network 10: STOP all operating mode #tmp_llo := (#P00.AutoCmpltMa_run OR #P00.ManuCmpltMa_run OR #P00.InchCmpltMa_run) AND "HMI KEY".SYS.GLB.F8_Stop;
IF #tmp_llo OR #P00.FLT_CmpltMaSR THEN #P00.AutoCmpltMa_run := #P00.InchCmpltMa_run := FALSE; END_IF; IF #tmp_llo THEN #P00.ManuCmpltMa_run := FALSE; END_IF; //Create pulse-off complete machine #tmp_llo := #P00.ManuCmpltMa_run OR #P00.AutoCmpltMa_run OR #SET.SSM.S.steps; #P00.CmpltMaOFF_Imp := NOT #tmp_llo AND #P00.CmpltMaOFF_FEg; #P00.CmpltMaOFF_FEg := #tmp_llo; #P00.TOF_CmpltMaOFF_Pulse(IN := #P00.CmpltMaOFF_Imp, PT := t#900ms); |
|
|
|
Network 11: Create Impulse running complete machine #tmp_llo := #P00.AutoCmpltMa_run OR #P00.ManuCmpltMa_run OR #SET.SSM.S.steps OR #P00.InchCmpltMa_run; #P00.CmpltMaRun_Imp := NOT #P00.CmpltMaRun_REg AND #tmp_llo; #P00.CmpltMaRun_REg := #tmp_llo; |
|
|
|
Network 12: Show key colour on HMI "HMI KEY".SYS.GLB.F11_Show_KeyColour_Start_Stop := #P00.AutoCmpltMa_run OR #P00.ManuCmpltMa_run OR #P00.InchCmpltMa_run OR #SET.SSM.S.steps; "HMI KEY".SYS.GLB.F14_Show_Key_Start_Stop := #P00.OM_AUTO_ON OR #P00.OM_MANUAL_ON OR #P00.OM_HOME_POS_ON OR #P00.OM_INCHING_ON; |
|
|
|
Network 13: Enable running each module #P00.Enabled := #P00.OM_HOME_POS_ON AND NOT #P00.FLT_CmpltMaSR; |
|
|
|
Network 14: SET home position complete machine IF "HMI KEY".SYS.GLB.F7_OM_HOM_POS_ON THEN #P00.OM_HOME_POS_ON := TRUE; #P00.OM_AUTO_ON := #P00.OM_MANUAL_ON := #P00.OM_INCHING_ON := #P00.AutoCmpltMa_run := #P00.ManuCmpltMa_run := #P00.InchCmpltMa_run := FALSE; END_IF; IF #P00.OM_HOME_POS_ON AND NOT #P00.FLT_CmpltMaSR AND "HMI KEY".SYS.GLB.F5_Start THEN #SET.SSM.S.steps := TRUE; #P00.HomPosSR := FALSE; END_IF; IF NOT #P00.OM_HOME_POS_ON OR "HMI KEY".SYS.GLB.F8_Stop THEN #SET.SSM.S.steps := FALSE; END_IF; #P00.Busy := #SET.SSM.S.steps;
#SEQ200(); |
|