OB1 Main Main Program Sweep

 

 

 

Netzwerk 1: Start measuring runtime (Start Cycle)

    "HMI SYS".Support.LastCycle := RUNTIME("HMI SYS".Support.LastCycle_inout);

 

 

 

Netzwerk 2: Pulse generator

    "HMI SYS".Support.Sav_Clock_Byte := "HMI SYS".Support.Sav_Clock_Byte XOR "M01 Clock_Byte";

    "M00 PLC Impulse" := "HMI SYS".Support.Sav_Clock_Byte AND "Clock_Byte";

    "HMI SYS".Support.Sav_Clock_Byte := "M01 Clock_Byte";

 

 

 

Netzwerk 3: CALL distributor

"DI MAIN GLB"();

-> "DI MAIN P01"(); // Process01, main module function block

-> "DI MAIN P02"(); // Process02, main module function block

-> "DI MAIN P03"(); // Process03, main module function block

 

-> "DI OUT P01"()// Process01, execute output stage

-> "DI OUT P02"()// Process02, execute output stage

-> "DI OUT P03"()// Process03, execute output stage

 

 

 

Netzwerk 4: First cycle evaluation

"HMI SYS".Support.FirstCycle_TON(IN := TRUE,PT := t#2s);

"M00 OB1 FirstCycle" := "HMI SYS".Support.FirstCycle_TON.Q;

 

 

 

Netzwerk 5: Flag logic =0

    "M00 log 0" := FALSE;

    "M00 log 1" := TRUE;

 

 

 

Netzwerk 6: End measuring runtime (End Cycle)

"HMI SYS".Support.LastCycle_real := LREAL_TO_REAL(IN := RUNTIME("HMI SYS".Support.LastCycle_inout) * 1000.0);

 

 

 

FB20 MAIN GLB GLB main call program

 

 

 

Netzwerk 1: Fault acknowledgement

"M00 FLT CmpltMaACK Imp" := NOT "M00 FLT CmpltMaACK REg" AND "HMI KEY".SYS.GLB.F1_AckKey;

"M00 FLT CmpltMaACK REg" := "HMI KEY".SYS.GLB.F1_AckKey;

 

 

 

Netzwerk 2: Call plant safety program

    "M00 GLB Estop" := "E01 S04 ESTP ok" AND "E02 S05 ESTP ok" AND "E03 S06 ESTP ok";

 

 

 

Netzwerk 3: GLB FLT faults monitoring

    #FLT(FLT_MODULE := "M00 FLT PlantIS");

 

 

 

Netzwerk 4: Query failure complete machine

"M00 FLT CmpltMaIS" := "M00 FLT PlantIS" OR "M01 FLT ModuleIS" OR "M02 FLT ModuleIS" OR "M03 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;

 

 

 

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

"A00 H03 RD" := "M00 FLT CmpltMaSR" AND NOT "M00 FLT CmpltMaACK" AND "M00 Clock_1Hz" OR "M00 FLT CmpltMaSR" AND "M00 FLT CmpltMaACK";

"A00 H01 GN" := NOT ("M00 FLT CmpltMaSR" OR "M00 ManuCmpltMa run") AND ("M00 AutoCmpltMa run" OR "M00 InchCmpltMa run" AND "M00 Clock_1Hz");

"A00 H02 YE" := "M00 ManuCmpltMa run"; //AND "M00 Clock_1Hz" OR NOT "M00 AutoCmpltMa run" AND NOT "M00 ManuCmpltMa run";

 

 

 

Netzwerk 6: Query assembly module at home position

"M00 HomPosIS" := "M01 HomPosIS" AND "M02 HomPosIS" AND "M03 HomPosIS";

IF "M00 HomPosIS" THEN

    "M00 HomPosSR" := TRUE;

END_IF;

 

 

 

Netzwerk 7: Start operating mode AUTOMATIC

IF "HMI KEY".SYS.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;

END_IF;

IF "M00 OM AUTO ON" AND "HMI KEY".SYS.GLB.F5_Start THEN

    "M00 AutoCmpltMa run" := TRUE;

END_IF;

 

 

 

Netzwerk 8: Start operating mode INCHING

IF "HMI KEY".SYS.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;

END_IF;

IF "M00 OM INCHING ON" AND "HMI KEY".SYS.GLB.F5_Start THEN

    "M00 InchCmpltMa run" := TRUE;

END_IF;

 

 

 

Netzwerk 9: Start operating mode MANUAL

IF "HMI KEY".SYS.GLB.F4_OM_MANU_ON 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;

END_IF;

IF "M00 OM MANUAL ON" AND "HMI KEY".SYS.GLB.F5_Start THEN

    "M00 ManuCmpltMa run" := TRUE;

END_IF;

 

 

 

Netzwerk 10: STOP all operating mode

#tmp_llo := ("M00 AutoCmpltMa run" OR "M00 ManuCmpltMa run" OR "M00 InchCmpltMa run") AND "HMI KEY".SYS.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 complet machine

#tmp_llo := "M00 ManuCmpltMa run" OR "M00 AutoCmpltMa run" OR "M00 InchCmpltMa run";

"M00 CmpltMaOFF Imp" := NOT #tmp_llo AND "M00 CmpltMaOFF FEg";

"M00 CmpltMaOFF FEg" := #tmp_llo;

#TOF_CmpltMaOFF_Pulse(IN := "M00 CmpltMaOFF Imp",

                   PT := t#900ms);

 

 

 

Netzwerk 11: Creat Impuls running complete machine

#tmp_llo := "M00 AutoCmpltMa run" OR "M00 ManuCmpltMa run" OR #SET.S.steps OR "M00 InchCmpltMa run";

"M00 CmpltMaRun Imp" := NOT "M00 CmpltMaRun REg" AND #tmp_llo;

"M00 CmpltMaRun REg" := #tmp_llo;

 

 

 

Netzwerk 12: Show key colour on HMI

"HMI KEY".SYS.GLB.F11_Show_KeyColour_Start_Stop := "M00 AutoCmpltMa run" OR "M00 ManuCmpltMa run" OR "M00 InchCmpltMa run" OR #SET.S.steps;

"HMI KEY".SYS.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";

 

 

 

Netzwerk 13: Enable running each module

"M00 Enabled" := "M00 OM HOME POS ON" AND NOT "M00 FLT CmpltMaSR";

 

 

 

Netzwerk 14: SET home position complete machine

IF "HMI KEY".SYS.GLB.F7_OM_HOM_POS_ON AND NOT "M00 HomPosIS" 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;

END_IF;

IF "M00 OM HOME POS ON" AND NOT "M00 FLT CmpltMaSR" AND "HMI KEY".SYS.GLB.F5_Start THEN

    #SET.S.steps := "M00 Enabled";

    "M00 HomPosSR" := FALSE;

END_IF;

IF NOT "M00 OM HOME POS ON" OR "HMI KEY".SYS.GLB.F8_Stop THEN

    #SET.S.steps := FALSE;

END_IF;

"M00 Active" := #SET.S.steps;

#SET.S.steph := "M00 FLT CmpltMaSR";

 

#SET();

 

 

 

Netzwerk 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;

#TON_Login(IN := "M00 LogInID_CEA",

           PT := #TON_LoginID_OK);

IF #TON_Login.Q THEN

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

END_IF;

 

 

Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To go to next HMI image use the touch buttons; some of them are interactive.