FB60 MAIN P04 : Lowering module |
|
|
|
Netzwerk 1: P04 Initialisation IF "M04 Init" OR NOT "M00 OB1 FirstCycle" THEN "M04 MW68" := #STEP_BITS := 0; IF "M04 Init" THEN "M04 MD60" := "M04 MD64" := 0; "M04 RunHomPos" := TRUE; "DatOfMod".P04.CrntModule := 104; END_IF; END_IF; |
|
|
|
Netzwerk 2: P04 SET execute home position IF "M04 RunHomPos" AND #SET.SET.S.S0 THEN #SET.SET.S.steps := TRUE; END_IF;
IF NOT "M04 RunHomPos" OR "HMI KEY".SYS.GLB.F8_Stop OR "HMI KEY".P04.GLB.F8_Stop THEN #SET.SET.S.steps := "M04 RunHomPos" := FALSE; END_IF;
#SET.SET.S.steph := "M04 FLT ModuStp"; // CALL SET #SET(ACT_STEP => #SET.STEP_NO); |
|
|
|
Netzwerk 3: P04 SEQ1 start, stop, hold #SEQ1.SEQ1.S.steph := NOT "M04 Enabled"; #SEQ1.SEQ1.S.steps := NOT "M04 RunHomPos" AND "M04 SEQ1 Start"; // CALL SEQ1 #SEQ1(ACT_STEP => #SEQ1.STEP_NO); |
|
|
|
Netzwerk 4: P04 Faults monitoring // CALL FLT #FLT(FLT_MODULE := "M04 FLT ModuStp"); |
|
|
|
Netzwerk 5: P04 Module RFID ID read head // not used |
|
|
|
Netzwerk 6: P04 SEQ1_Start IF "M00 TrnsSysRun Imp" AND "M00 AutoCmpltMa run" THEN #STEP.SEQ1_Start := TRUE; RETURN; ELSIF #STEP.SEQ1_Start THEN IF NOT "M04 RunHomPos" AND NOT "M04 SEQ1 Active" THEN "M04 SEQ1 Start" := TRUE; ELSIF "M04 SEQ1 Active" THEN #STEP_BITS := 0; #STEP.SEQ1_Running := TRUE; END_IF; END_IF; |
|
|
|
Netzwerk 7: P04 SEQ1_Running IF #STEP.SEQ1_Running THEN IF "M04 SEQ1 Done" THEN "M04 SEQ1 Start" := FALSE; #STEP_BITS := 0; #STEP.SEQ1_Done := TRUE; RETURN; END_IF; END_IF; |
|
|
|
Netzwerk 8: P04 SEQ1_Done IF #STEP.SEQ1_Done THEN "M04 SEQ1 Done" := FALSE; #STEP_BITS := 0; #STEP.SEQ1_Write := TRUE; // Save actual data "DatOfMod".P04.STS.RunTimeCntr_seq1 := #MaDa.RunTimeCntr_seq1; "DatOfMod".P04.STS.WPC_ok := "M04 SEQ1 DoWP1" AND "M04 SEQ1 WP1 DnOK"; "DatOfMod".P04.STS.CrntWP_ok := "M04 SEQ1 WP1 DnOK"; "DatOfMod".P04.TrgtModule := 101; // If necessary, changing drive direction to module 103 IF NOT "DatOfMod".P04.STS.CrntWP_ok THEN "DatOfMod".P04.TrgtModule := 103; END_IF; "DatOfPLC".P04 := "DatOfMod".P04; END_IF; |
|
|
|
Netzwerk 9: P04 SEQ1_Write IF #STEP.SEQ1_Write THEN "M04 SEQ1 WP1 DnOK" := "M04 SEQ1 DoWP1" := FALSE; "M04 TCP/IP Wrt start" := TRUE;
IF "M04 TCP/IP Wrt done" THEN "M04 TCP/IP Wrt start" := "M04 TCP/IP Wrt done" := FALSE; #STEP_BITS := 0; RETURN; END_IF; END_IF; |
|
|
|
Netzwerk 10: P07 Assembling Run-Time IF #STEP.SEQ1_Running THEN IF "M00 Imp 10Hz" AND "M04 Enabled" THEN #MaDa.RunTimeCntr_seq1 := #MaDa.RunTimeCntr_seq1 + 1; END_IF; ELSE #MaDa.RunTimeCntr_seq1 := 0; IF NOT "M04 Active" AND ("M00 ManuCmpltMa run" AND "HMI KEY".P04.GLB.F19_GoToStep OR "M00 AutoCmpltMa run") THEN #STEP.SEQ1_Start := TRUE; END_IF; END_IF; |
|
|
|
Netzwerk 11: P07 SEQ1 active "M04 Active" :=#STEP.SEQ1_Start AND "M04 SEQ1 Active" OR #STEP.SEQ1_Running OR #STEP.SEQ1_Done OR #STEP.SEQ1_Write; |
|
|
|
Netzwerk 12: P04 Assign tower light signal IF "M04 FLT ModuStp" THEN "M04 FLT ModuStp SR" := true; END_IF;
IF "M04 FLT ModuStp SR" AND NOT "M04 FLT ModuStp ACK" THEN IF "M04 FLT ModuStp SR" AND "M00 ACK Imp" THEN "M04 FLT ModuStp ACK" := true; END_IF; ELSIF NOT "M04 FLT ModuStp" AND "M04 FLT ModuStp ACK" THEN "M04 FLT ModuStp SR" := "M04 FLT ModuStp ACK" := FALSE; END_IF; // Faults lamp #tmp_RedSig_lamp := "M04 FLT ModuStp SR" AND NOT "M04 FLT ModuStp ACK" AND "Clock_1.0Hz" OR "M04 FLT ModuStp SR" AND "M04 FLT ModuStp ACK"; // Ready to start lamp #tmp_GrnSig_lamp := NOT "M04 FLT ModuStp SR" AND NOT "M00 AutoCmpltMa run" AND "M04 HomPos"; |
|
|
|
|