FB30 MAIN P01 : P01 CEA Hydraulic Press - main module program |
|
|
|
Netzwerk 1: P01 Initialisation
IF "M01 Init" OR NOT "M00 OB1 FirstCycle" THEN "M01 MW38" := #STEP_BITS := 0; IF "M01 Init" THEN "M01 MD30" := "M01 MD34" := 0; "M01 RunHomPos" := TRUE; "DatOfMod".P01.CrntModule := 101; END_IF; END_IF; |
|
|
|
Netzwerk 2: P01 SET execute home position
IF "M01 RunHomPos" AND #SET.SET.S.step0 THEN #SET.SET.S.steps := TRUE; END_IF;
IF NOT "M01 RunHomPos" OR "HMI KEY".SYS.GLB.F8_Stop OR "HMI KEY".P01.GLB.F8_Stop THEN #SET.SET.S.steps := "M01 RunHomPos" := FALSE; END_IF;
#SET.SET.S.steph := "M01 FLT ModuStp";
#SET(ACT_STEP => #SET.STEP_NO); |
|
|
|
Netzwerk 3: P01 SEQ1 start, stop, hold
#SEQ1.SSM1.S.steph := "M01 SEQ1 Start" AND NOT "M01 AutoCmpltMa run"; #SEQ1.SSM1.S.steps := NOT "M01 RunHomPos" AND "M01 SEQ1 Start";
#SEQ1(ACT_STEP => #SEQ1.STEP_NO); |
|
|
|
Netzwerk 4: P01 FLT faults monitoring
#FLT(FLT_MODULE := "M01 FLT ModuStp"); |
|
|
|
Netzwerk 5: P01 STEP.SEQ1_Start
IF "M00 TrnsSysRun Imp" AND "M00 AutoCmpltMa run" THEN #STEP.SEQ1_Start := TRUE; RETURN; ELSIF #STEP.SEQ1_Start THEN IF NOT "M01 RunHomPos" AND NOT "M01 SEQ1 Active" THEN "M01 SEQ1 Start" := TRUE; ELSIF "M01 SEQ1 Active" THEN #STEP_BITS := 0; #STEP.SEQ1_Running := TRUE; #MaDa.RunTimeCntrl_seq1 := 0; "M01 SEQ1 DoWP1" := FALSE; END_IF; END_IF; |
|
|
|
Netzwerk 6: P01 STEP.SEQ1_Running
IF #STEP.SEQ1_Running THEN IF "M01 SEQ1 Done" THEN "M01 SEQ1 Active" := "M01 SEQ1 Start" := FALSE; #STEP_BITS := 0; #STEP.SEQ1_Done := TRUE; RETURN; END_IF; END_IF; |
|
|
|
Netzwerk 7: P01 STEP.Done
IF #STEP.SEQ1_Done THEN "M01 SEQ1 Done" := FALSE; #STEP_BITS := 0; #STEP.SEQ1_Write := TRUE; // Save actual data "DatOfMod".P01.STS.RunTimeCntr_seq1 := #MaDa.RunTimeCntr_seq1; "DatOfMod".P01.STS.WPC_ok := "M01 SEQ1 DoWP1" AND "M01 SEQ1 WP1 DnOK"; "DatOfMod".P01.STS.CrntWP_ok := "M01 SEQ1 WP1 DnOK" AND NOT "M01 SEQ1 WP1 DnNOK";
"DatOfMod".P01.TrgtModule := 102; "DatOfPLC".P01 := "DatOfMod".P01; END_IF; |
|
|
|
Netzwerk 8: P01 STEP.Write
IF #STEP.SEQ1_Write THEN "M01 TCP/IP Wrt start" := TRUE;
IF "M01 TCP/IP Wrt done" THEN #STEP.SEQ1_Write := "M01 TCP/IP Wrt start" := "M01 TCP/IP Wrt done" := FALSE; END_IF; END_IF; |
|
|
|
Netzwerk 9: P01 Run-Time
IF #STEP.SEQ1_Running THEN IF "M00 Imp 10Hz" AND "M01 Enabled" THEN #MaDa.RunTimeCntr_seq1 := #MaDa.RunTimeCntr_seq1 + 1; END_IF; ELSE IF NOT "M01 Active" AND ("M00 ManuCmpltMa run" AND "HMI KEY".P01.GLB.F19_GoToStep OR "M00 AutoCmpltMa run") THEN #STEP.SEQ1_Start := TRUE; END_IF; END_IF; |
|
|
|
Netzwerk 10: P01 SEQ1 active
"M01 Active" := #STEP.SEQ1_Start AND "M01 SEQ1 Active" OR #STEP.SEQ1_Running OR #STEP.SEQ1_Done OR #STEP.SEQ1_Write; |
|
|
|
Netzwerk 11: P01 Assign signal
IF "M01 FLT ModuStpIS" THEN "M01 FLT ModuStpSR" := true; END_IF;
IF "M01 FLT ModuStpSR" AND NOT "M01 FLT ModuStp ACK" THEN IF "M00 ACK Imp" THEN "M01 FLT ModuStp ACK" := TRUE; END_IF; ELSIF NOT "M01 FLT ModuStpIS" AND "M01 FLT ModuStp ACK" THEN "M01 FLT ModuStpSR" := "M01 FLT ModuStp ACK" := FALSE; END_IF;
|
|
FB31 SET P01: CEA Hydraulic Press - move ram to home position
|
|
|
|
Netzwerk 1: SET query home position
#tmp_logical_link_outcome := "DI OUT P01".Y09.LampWP AND "DI OUT P01".Y04.LampWP AND "DI OUT P01".Y08.LampWP AND "DI OUT P01".YF41E_PAW_VALU.Support.HMI_ShowValu = 0.0; // Query home position "M01 HomPos" := #tmp_logical_link_outcome AND "DI OUT P01".MaPa.Support.TDC_reached AND "DI OUT P01".C27.FB_HP; // SEQ1 ready to start "M01 RdyToStart" := #tmp_logical_link_outcome AND "DI OUT P01".C27.FB_WP; // Pre-Setting "M01 MW38" := 0; |
|
|
|
Netzwerk 2: SET execute home position
#SET(MAX_STEP := 3); #ACT_STEP := #SET.S.stepact; #SET.S.DlyStart.PT := t#600ms; |
|
|
|
Netzwerk 3: Step jump distributor
CASE #SET.S.stepact OF 0: // Waiting for enable #SET.S.stepd := #SET.S.steps AND "DI OUT P01".M03.DRV.LampWP AND "DI OUT P01".M01.DRV.LampWP AND NOT "M00 Ram OTC";
1: // Query ram position IF "DI OUT P01".MaPa.Support.TDC_reached AND "DI OUT P01".C27.FB_HP THEN "DI OUT P01".YF41E_PAW_VALU.Support.CmdExe_WP := TRUE; "DI OUT P01".YF41E_PAW_RAMP.Support.Steep := 1.0; "DI OUT P01".YF41E_PAW_RAMP.Support.Target := 0.0; IF "DI OUT P01".YF41E_PAW_VALU.Support.HMI_ShowValu = 0.0 THEN #SET.S.stepd := TRUE; #SET.S.stepnew := 3; RETURN; END_IF; ELSE // Unlocking ram stow pin "DI OUT P01".C27.VLV.CmdExe_HP := FALSE; "DI OUT P01".C27.VLV.CmdExe_WP := "HMI KEY".P01.C27.F12_Enable_WP; #SET.S.stepd := "DI OUT P01".C27.FB_WP; END_IF;
2: // Move ram to TDC (up) IF #SET.S.stepfc THEN "DI OUT P01".YF41E_PAW_VALU.Support.CmdExe_WP := TRUE; "DI OUT P01".YF41E_PAW_RAMP.Support.Steep := 1.0; "DI OUT P01".YF41E_PAW_RAMP.Support.Target := "DI OUT P01".MaPa.Set_VolFlow_Up_2Hd; "DI OUT P01".YP42_PAW_RAMP.Support.Target := "DI OUT P01".MaPa.Set_Pressure_bar; "DI OUT P01".YP43E_PAW_RAMP.Support.Target := 0.0; #SET.S.c1.set := 10; END_IF; // C13 HP, Y09 WP, Y04 WP, Y05 HP, Y08 WP, Y03 HP "DI OUT P01".C13.CmdExe_WP := FALSE; "DI OUT P01".C13.CmdExe_HP := "HMI KEY".P01.C13.F11_Enable_HP AND NOT "DI OUT P01".MaPa.Support.TDC_reached; "DI OUT P01".Y09.CmdExe_WP := "HMI KEY".P01.Y09.F12_Enable_WP; "DI OUT P01".Y04.CmdExe_WP := "HMI KEY".P01.Y04.F12_Enable_WP; "DI OUT P01".Y08.CmdExe_WP := "HMI KEY".P01.Y08.F12_Enable_WP; "DI OUT P01".Y05.CmdExe_WP := "DI OUT P01".Y03.CmdExe_HP := FALSE; // Query end position #SET.S.c1.start := NOT "DI OUT P01".C13.LampHP AND "DIF_Main_Safety_RTG1".FB_SAFE_P01.A01_C13_HP.FEEDBACK AND "DI OUT P01".Y09.LampWP AND "DI OUT P01".Y04.LampWP AND "DI OUT P01".Y08.LampWP; // YF41E Closing volume flow IF #SET.S.c1.done THEN #SET.S.stepd := TRUE; "DI OUT P01".YF41E_PAW_VALU.Support.CmdExe_WP := FALSE; "DI OUT P01".YF41E_PAW_RAMP.Support.Target := 0.0; END_IF;
3: // C27 Ram stow pin HP "DI OUT P01".C27.VLV.CmdExe_WP := FALSE; "DI OUT P01".C27.VLV.CmdExe_HP := "HMI KEY".P01.C27.F11_Enable_HP; #SET.S.c1.start := "M01 HomPos"; #SET.S.c1.set := 10; IF #SET.S.c1.done THEN "DI OUT P01".YF41E_PAW_VALU.Support.CmdExe_WP := "DI OUT P01".YP43E_PAW_VALU.Support.CmdExe_WP := "DI OUT P01".Y01.CmdExe_HP := "DI OUT P01".Y02.CmdExe_HP := "DI OUT P01".Y03.CmdExe_HP := "DI OUT P01".C13.CmdExe_HP := "DI OUT P01".Y04.CmdExe_WP := "DI OUT P01".Y05.CmdExe_WP := FALSE; "M01 RunHomPos" := FALSE; END_IF; END_CASE; |
|