Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FB33 SEQ1 P01 SEQ1 Cam Disk Control

 

 

 

Netzwerk 1: Pre-Setting

"DI MAIN P01".M00.RdyToStart := "DI MAIN GLB".M00.HomPosSR AND "DI MAIN GLB".M00.AutoCmpltMa_run;

 

 

 

Netzwerk 2: Define last step

#SSM(LAST_STEP := 3);

 

 

 

Netzwerk 3: Step Switching Mechanism (SSM)

CASE #SSM.S.stepact OF

    0: // Waiting for SEQ1 to start

        #SSM.S.stepimp := "DI MAIN P01".M00.SEQ1_Busy := FALSE;

        IF #SSM.S.steps AND "DI MAIN P01".M00.RdyToStart THEN

            #SSM.S.stepd := TRUE;

            "DI OUT P01".CAM_DISC.CAM.Support.Write_Index := "DI OUT P01".CAM_DISC.CAM.Support.Read_Index := "DI OUT P01".CAM_DISC.CAM.Support.Output_Index := 0;

            "DI OUT P01".CAM_DISC.CAM.Support.Cam.Current_Position := #tmp_del_pos;

        END_IF;

       

    1: // V90M MC_PositioningAxis Master MoveJog WP

        IF #SSM.S.stepfc THEN

            "DI OUT P01".V90.DRV.Support.SetVelo :=

            "DI OUT P01".V90M.DRV.Support.SetVelo := "HMI KEY".Values.Work_Velocity; // mm/s

            #Part_Incomig_Detection := #Part_Outgoing_Detection :=

            "HMI KEY".Message.Parts_Production_Done := #SSM.S.stepllo := FALSE;

            "DI MAIN P01".M00.SEQ1_Busy := TRUE;

        ELSE

            "DI OUT P01".V90M.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90M.F12_Enable_WP AND #SSM.S.stepa;

            "DI OUT P01".V90.DRV.Support.Cmd_MoveJogHP := "HMI KEY".P01.V90.F11_Enable_HP AND "DI OUT P01".V90M.DRV.Support.Cmd_MoveJogWP;

            // Part incoming and outgoing detection

            IF "DI OUT P01".V90M.DRV.Support.LampON AND #Part_Incomig_Detection AND #Part_Outgoing_Detection AND NOT "E01 Part Available Outcome"THEN

                #SSM.S.stepd := TRUE;

                #Part_Incomig_Detection := #Part_Outgoing_Detection := FALSE;

            ELSIF NOT #Part_Incomig_Detection AND "E01 Part Available Income" THEN

                #Part_Incomig_Detection := TRUE;

            ELSIF #Part_Incomig_Detection AND NOT "E01 Part Available Income" AND "E01 Part Available Outcome" THEN

                #Part_Outgoing_Detection := TRUE;

            END_IF;

        END_IF;

       

    2: // V90 MC_SpeedAxis OutputCam MoveJog HP

        IF #SSM.S.stepfc AND NOT "DI MAIN P01".FLT."1_WARN_00_15".%X6 THEN

            "HMI KEY".Values.Work_Velocity :=

            "DI OUT P01".V90.DRV.Support.SetVelo :=

            "DI OUT P01".V90M.DRV.Support.SetVelo := "DI OUT P01".V90M.DRV.Support.SetVelo + 1.0; // mm/s

        ELSE

            "DI OUT P01".V90M.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90M.F12_Enable_WP AND #SSM.S.stepa;

            "DI OUT P01".V90.DRV.Support.Cmd_MoveJogHP := "HMI KEY".P01.V90.F11_Enable_HP AND "DI OUT P01".V90M.DRV.Support.Cmd_MoveJogWP;

            // Determine TotalParts to stop

            IF "HMI KEY".Execute.Parts_Production_Limit AND NOT #SSM.S.stepimp THEN

                "DI MAIN GLB".M00.ProductCounter.TotalParts := "DI MAIN GLB".M00.ProductCounter.GoodParts + "HMI KEY".Values.Parts_Production_Limit;

            END_IF;

            #SSM.S.stepimp := "HMI KEY".Execute.Parts_Production_Limit;

            // Query Parts_production_done

            IF NOT "DI OUT P01".V90.DRV.Support.LampON AND #SSM.S.stepeg THEN

               "DI MAIN GLB".M00.ProductCounter.GoodParts := "DI MAIN GLB".M00.ProductCounter.GoodParts + 1;

               "HMI KEY".Message.Parts_Production_Done := "DI MAIN GLB".M00.ProductCounter.GoodParts >= "DI MAIN GLB".M00.ProductCounter.TotalParts

                AND "HMI KEY".Execute.Parts_Production_Limit;

                #SSM.S.stepllo := TRUE;

            END_IF;

            #SSM.S.stepeg := "DI OUT P01".V90.DRV.Support.LampON AND "DI OUT P01".V90M.DRV.Support.LampON;

            IF "DI OUT P01".V90M.DRV.Support.LampON AND "DI OUT P01".V90.DRV.Support.LampOFF AND #SSM.S.stepllo THEN

                IF "HMI KEY".Message.Parts_Production_Done THEN

                    "DI MAIN P01".M00.SEQ1_Done := "DI OUT P01".CAM_DISC.CAM.Support.Output_Index = "DI OUT P01".CAM_DISC.CAM.Support.Write_Index;

                ELSE

                    #SSM.S.stepd := NOT "HMI KEY".Message.Parts_Production_Done;

                END_IF;

            END_IF;

        END_IF;

       

    3: // Query new part needed

        #RunTimeCounter := 0;

        #SSM.S.c1.start := TRUE;

        #SSM.S.c1.set := 25;

        #SSM.S.stepnew := 1;

        #SSM.S.stepd := #SSM.S.c1.done;

END_CASE;