FB MAIN GLB : Operating Mode Global Machine

[hit  <- on your browser to return]

 

 

 

Network 1: Operating Mode Global Machine

#M00.FLT_CmpltMaACK_Imp := NOT #M00.#FLT_CmpltMaACK_REg AND "HMI KEY".P00.GLB.F1_AckKey;

#M00.FLT_CmpltMaACK_REg := "HMI KEY".P00.GLB.F1_AckKey;

 

 

 

Network 2: Assign global emergency stop

#M00.GLB_Estop := "E00 Estop1 OK" AND "E00 Estop2 OK";

 

 

 

Network 3: Call faults monitoring

#FLT(FLT_MODULE := #M00.FLT_PlantIS);

 

 

 

Network 4: Evaluate failure complete machine

#M00.FLT_CmpltMaIS := #M00.FLT_PlantIS OR "DI MAIN P01".M00.FLT_ModuleIS OR "DI MAIN P02".M00.FLT_ModuleIS;

IF #M00.FLT_CmpltMaIS THEN

    #M00.FLT_CmpltMaSR := TRUE;

END_IF;

IF #M00.FLT_CmpltMaSR AND NOT #M00.FLT_CmpltMaACK THEN

    IF #M00.FLT_CmpltMaACK_Imp THEN

        #M00.FLT_CmpltMaACK := TRUE;

    END_IF;

ELSIF NOT #M00.FLT_CmpltMaIS AND #M00.FLT_CmpltMaACK THEN

    #M00.FLT_CmpltMaSR := #M00.FLT_CmpltMaACK := FALSE;

END_IF;

 

 

 

Network 5: Assign signal light column (modular signal tower) complete machine

#M00.SLC_Lamp_RD := #M00.FLT_CmpltMaSR AND NOT #M00.FLT_CmpltMaACK AND "M00_Clock_1Hz" OR #M00.FLT_CmpltMaSR AND #M00.FLT_CmpltMaACK;

#M00.SLC_Lamp_GN := NOT (#M00.FLT_CmpltMaSR OR #M00.ManuCmpltMa_run) AND (#M00.AutoCmpltMa_run OR #M00.InchCmpltMa_run AND "M00_Clock_1Hz");

#M00.SLC_Lamp_YE := #M00.ManuCmpltMa_run;

 

 

 

Network 6: Query plant at home position

#M00.HomPosAll := "DI MAIN P01".M00.HomPosIS AND "DI MAIN P02".M00.HomPosIS;

IF #M00.HomPosAll THEN

    #M00.HomPosSR := TRUE;

END_IF;

 

 

 

Network 7: Start operating mode AUTOMATIC

IF "HMI KEY".P00.GLB.F3_OM_AUTO_ON AND #M00.HomPosSR THEN

    #M00.OM_AUTO_ON := TRUE;

    #M00.OM_MANUAL_ON := #M00.OM_HOME_POS_ON := #M00.OM_INCHING_ON := #M00.ManuCmpltMa_run := #M00.InchCmpltMa_run := FALSE;

ELSIF #M00.OM_AUTO_ON AND "HMI KEY".P00.GLB.F5_Start THEN

    #M00.AutoCmpltMa_run := TRUE;

END_IF;

#SEQ01.SSM.S.steph := #SEQ02.SSM.S.steph := NOT #M00.AutoCmpltMa_run;

#SEQ01.SSM.S.steps := #SEQ02.SSM.S.steps := NOT (#SET.SSM.S.steps OR #M00.ManuCmpltMa_run);

#SEQ01(); // Metering Lubrication

#SEQ02(); // Supply Lubrication

 

 

 

Network 8: Start operating mode INCHING

IF "HMI KEY".P00.GLB.F15_OM_INCHING_ON AND #M00.HomPosSR THEN

    #M00.OM_INCHING_ON := TRUE;

    #M00.OM_MANUAL_ON := #M00.OM_HOME_POS_ON := #M00.OM_AUTO_ON := #M00.ManuCmpltMa_run := #M00.AutoCmpltMa_run := FALSE;

ELSIF #M00.OM_INCHING_ON AND "HMI KEY".P00.GLB.F5_Start THEN

    #M00.InchCmpltMa_run := TRUE;

    IF #M00.CmpltMaRun_Imp THEN

        "HMI SYS".TP1500Comfort.AreaPoint.ControlRequest.JobNumber := 51; // activate screen number (job number)

        "HMI SYS".TP1500Comfort.AreaPoint.ControlRequest.Parameter_10 := 201; // 201_AUTO_P01 screen number

    END_IF;

END_IF;

 

 

 

Network 9: Start operating mode MANUAL

IF "HMI KEY".P00.GLB.F4_OM_MANU_ON AND NOT #SET.SSM.S.steps THEN

    #M00.OM_MANUAL_ON := TRUE;

    #M00.OM_HOME_POS_ON := #M00.OM_AUTO_ON := #M00.OM_INCHING_ON := #M00.AutoCmpltMa_run := #M00.InchCmpltMa_run := FALSE;

ELSIF #M00.OM_MANUAL_ON AND "HMI KEY".P00.GLB.F5_Start THEN

    #M00.ManuCmpltMa_run := TRUE;

END_IF;

 

 

 

Network 10: STOP all operating mode

#tmp_llo := (#M00.AutoCmpltMa_run OR #M00.ManuCmpltMa_run OR #M00.InchCmpltMa_run) AND "HMI KEY".P00.GLB.F8_Stop;

 

IF #tmp_llo OR #M00.FLT_CmpltMaSR THEN

    #M00.AutoCmpltMa_run := #M00.InchCmpltMa_run := FALSE;

END_IF;

IF #tmp_llo THEN

    #M00.ManuCmpltMa_run := FALSE;

END_IF;

//Create pulse-OFF complete machine

#tmp_llo := #M00.ManuCmpltMa_run OR #M00.AutoCmpltMa_run OR #M00.InchCmpltMa_run OR #SET.SSM.S.steps; // mc31.05.22

#M00.CmpltMaOFF_Imp := NOT #tmp_llo AND #M00.CmpltMaOFF_FEg;

#M00.CmpltMaOFF_FEg := #tmp_llo;

#M00.TOF_CmpltMaOFF_Pulse(IN := #M00.CmpltMaOFF_Imp,

                          PT := t#500ms);

 

 

 

Network 11: Create Impulse running complete machine

#tmp_llo := #M00.AutoCmpltMa_run OR #M00.ManuCmpltMa_run OR #SET.SSM.S.steps OR #M00.InchCmpltMa_run;

#M00.CmpltMaRun_Imp := NOT #M00.CmpltMaRun_REg AND #tmp_llo;

#M00.CmpltMaRun_REg := #tmp_llo;

 

 

 

Network 12: Show key colour on HMI

"HMI KEY".P00.GLB.F11_Show_KeyColour_Start_Stop := #M00.AutoCmpltMa_run OR #M00.ManuCmpltMa_run OR #M00.InchCmpltMa_run OR #SET.SSM.S.steps;

"HMI KEY".P00.GLB.F14_Show_Key_Start_Stop := #M00.OM_AUTO_ON OR #M00.OM_MANUAL_ON OR #M00.OM_HOME_POS_ON OR #M00.OM_INCHING_ON;

 

 

 

Network 13: Enable running homing complete machine

#M00.Enabled := #M00.OM_HOME_POS_ON AND NOT #M00.FLT_CmpltMaSR;

 

 

 

Network 14: SET home position complete machine

IF "HMI KEY".P00.GLB.F7_OM_HOM_POS_ON THEN

    #M00.OM_HOME_POS_ON := TRUE;

    #M00.OM_AUTO_ON := #M00.OM_MANUAL_ON := #M00.OM_INCHING_ON := #M00.AutoCmpltMa_run := #M00.ManuCmpltMa_run := #M00.InchCmpltMa_run := FALSE;

ELSIF #M00.OM_HOME_POS_ON AND NOT #M00.FLT_CmpltMaSR AND "HMI KEY".P00.GLB.F5_Start THEN

    #SET.SSM.S.steps := TRUE;

    #M00.HomPosSR := FALSE;

END_IF;

IF NOT #M00.OM_HOME_POS_ON OR "HMI KEY".P00.GLB.F8_Stop THEN

    #SET.SSM.S.steps := FALSE;

END_IF;

#M00.Busy := #SET.SSM.S.steps;

#SET.SSM.S.steph := #M00.FLT_CmpltMaSR;

 

#SET();

 

 

 

Network 15: LogIn mc@cea2020

IF "HMI SYS".Login.Operator_0.ID = "HMI SYS".Login.Admin.ID THEN

    "HMI SYS".Login.Operator_0.Initials := "HMI SYS".Login.Admin.Initials;

    #M00.LogInID_CEA := #M00.LogInID_OK := TRUE;

ELSIF "HMI SYS".Login.Operator_0.ID = "HMI SYS".Login.Operator_1.ID THEN

    "HMI SYS".Login.Operator_0.Initials := "HMI SYS".Login.Operator_1.Initials;

    #M00.LogInID_OK := TRUE;

    #M00.LogInID_CEA := FALSE;

ELSIF "HMI SYS".Login.Operator_0.ID = "HMI SYS".Login.Operator_2.ID THEN

    "HMI SYS".Login.Operator_0.Initials := "HMI SYS".Login.Operator_2.Initials;

    #M00.LogInID_OK := TRUE;

    #M00.LogInID_CEA := FALSE;

ELSE

    #M00.LogInID_CEA := #M00.LogInID_OK := FALSE;

END_IF;

IF NOT #M00.LogInID_OK THEN

    "HMI SYS".Login.Operator_0.Initials := '';

END_IF;

#M00.TON_Login(IN := #M00.LogInID_CEA,

               PT := #M00.TON_Login.PT);

IF #M00.TON_Login.Q THEN

    "HMI SYS".Login.Operator_0.ID := '';

END_IF;

 

 

 

Network 16: Set/Reset Products counter value

#M00.ProductCounter.DlyOnReset(IN := #M00.ProductCounter.ResetGoodProducts,

                               PT := #M00.ProductCounter.DlyOnReset.PT);

IF #M00.ProductCounter.DlyOnReset.Q THEN

    "ModulDa".P00.STS.ProductCounter_GoodParts := "ModulDa".P00.STS.ProductCounter_SetGoodParts;

END_IF;