FUNCTION_BLOCK "FB_PreMain"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
   VAR_IN_OUT 
      stInOutControlUnitCabinetOF1 : "UDT_MainState";
      stInOutControlUnitCabinetOF2 : "UDT_MainState";
      stInOutControlUnitCabinetOF3 : "UDT_MainState";
      stInOutControlUnitCabinetOF4 : "UDT_MainState";
   END_VAR

   VAR 
      xAllMainContactorsOk { S7_SetPoint := 'True'} : Bool;
      xAllReadyToStartOF1 : Bool;
      xAllReadyToStartOF2 : Bool;
      xAllReadyToStartOF3 : Bool;
      xAllReadyToStartOF4 : Bool;
      fbStateMainOF1 : "FB_StateMain";
      fbStateMainOF2 : "FB_StateMain";
      fbStateMainOF3 : "FB_StateMain";
      fbStateMainOF4 : "FB_StateMain";
      xQuitNec : Bool;
      fbMonFuse24VUH03 : "FB_Monitoring";
      fbMonFuse24VUC031 : "FB_Monitoring";
      fbMonFuseMotorAndBrakeUC031 : "FB_Monitoring";
      fbMonFuse24VUC032 : "FB_Monitoring";
      fbMonFuseMotorAndBrakeUC032 : "FB_Monitoring";
      fbMonFuse24VUC033 : "FB_Monitoring";
      fbMonFuseMotorAndBrakeUC033 : "FB_Monitoring";
      fbMonFuseCircuitBrakerUH03 : "FB_Monitoring";
      fbMonMotorProtectionUH03 : "FB_Monitoring";
      fbMonMotorProtectionUC031 : "FB_Monitoring";
      fbMonMotorProtectionUC032 : "FB_Monitoring";
      fbMonMotorProtectionUC033 : "FB_Monitoring";
      fbMonPhaseFailure : "FB_Monitoring";
      fbMonFuse400VUC031 : "FB_Monitoring";
      fbMonFuse400VUC032 : "FB_Monitoring";
      fbMonFuse400VUC033 : "FB_Monitoring";
      fbMonPressureUH03 : "FB_Monitoring";
      fbMonPressureUC031 : "FB_Monitoring";
      fbMonPressureUC032 : "FB_Monitoring";
      fbMonPressureUC033 : "FB_Monitoring";
      fbMonMainContactorsUH03 : "FB_Monitoring";
      fbMonSafetyContactorsUH03toUC072 : "FB_Monitoring";
      fbMonSafetyContactorsUH03toUH02 : "FB_Monitoring";
      fbMonMainContactorsUC031 : "FB_Monitoring";
      fbMonSafetyContactorsUC031Extern : "FB_Monitoring";
      fbMonMainContactorsUC032 : "FB_Monitoring";
      fbMonSafetyContactorsUC032Extern : "FB_Monitoring";
      fbMonMainContactorsUC033 : "FB_Monitoring";
      fbMonSafetyContactorsUC033Extern : "FB_Monitoring";
      fbMonFAS1 : "FB_Monitoring";   // IF from FACP "fire alarm" DI0034
      fbMonFAS2 : "FB_Monitoring";   // IF from FACP "fire alarm" DI0033
      fbMonFPG_Open : "FB_Monitoring";   // Control from FPG
      fbMonFPG_Fault : "FB_Monitoring";   // Control from FPG
      fbMonFPG_Fire : "FB_Monitoring";   // Control from FPG
      fbMonCommFortnaWCS : "FB_Monitoring";
      fbMonCommFortnaWES_ASRS : "FB_Monitoring";
      fbMonEstopExternUC031 : "FB_Monitoring";
      fbMonEstopExternUC032 : "FB_Monitoring";
      fbMonEstopExternUC033 : "FB_Monitoring";
      fbMonEstopExternUH02 : "FB_Monitoring";
      fbMonEstopExternUC072 : "FB_Monitoring";
      arESTOPAck { S7_SetPoint := 'False'} : Array[0..30] of "FB_ESTOPhandling";
      xReInit : Bool;
      fTrigReIntTime {InstructionName := 'F_TRIG'; LibVersion := '1.0'} : F_TRIG;
      tOfReIntTime {InstructionName := 'TOF_TIME'; LibVersion := '1.0'} : TOF_TIME;   // nach Hochfahren vergeht diese Zeit bis erstmalig Quit
   END_VAR

   VAR_TEMP 
      tDebug : Int;
      nIdx : USInt;
   END_VAR

   VAR CONSTANT 
      c_UH03 : Int := 0;
      c_UZ0301 : Int := 1;
      c_UZ0302 : Int := 2;
      c_UZ0303 : Int := 3;
      c_UZ0304 : Int := 4;
      c_UZ0305 : Int := 5;
      c_UZ0306 : Int := 6;
      c_UZ0307 : Int := 7;
      c_UZ0308 : Int := 8;
      c_UZ0309 : Int := 9;
      c_UZ0310 : Int := 10;
      c_UC031 : Int := 11;
      c_UZ3101 : Int := 12;
      c_UZ3102 : Int := 13;
      c_UZ3103 : Int := 14;
      c_UZ3104 : Int := 15;
      c_UC032 : Int := 16;
      c_UZ3201 : Int := 17;
      c_UZ3202 : Int := 18;
      c_UZ3203 : Int := 19;
      c_UZ3204 : Int := 20;
      c_UC033 : Int := 21;
      c_UZ3301 : Int := 22;
      c_UZ3302 : Int := 23;
      c_UZ3303 : Int := 24;
      c_UZ3304 : Int := 25;
      c_UH03_Extern1 : Int := 26;
      c_UH03_Extern2 : Int := 27;
      c_UC031_Extern : Int := 28;
      c_UC032_Extern : Int := 29;
      c_UC033_Extern : Int := 30;
   END_VAR


BEGIN
	// ------------------------------------------------
	// GLOBAL INFORMATION - do before other FB calls
	// ------------------------------------------------
	
	REGION Reinitialisieren
	    #tOfReIntTime(IN := NOT #xReInit,
	                  PT := T#10s);
	    
	    IF NOT #xReInit THEN
	        #xReInit := TRUE;
	    END_IF;
	    
	    #fTrigReIntTime(CLK := #tOfReIntTime.Q);
	    
	END_REGION
	
	REGION CycleTime
	    // "DB_MachineGlobal".nLogicCycle := "DB_MachineGlobal".nLogicCycle + 1;
	    #tDebug := RD_SYS_T("DB_MachineGlobal".DTL_TimePLC);
	    // #fbCycleTime("DB_MachineGlobal".nPrevCycle);
	END_REGION
	
	REGION Alarmnummern zurücksetzten
	    IF "DB_MachineGlobal".Cold_Restart THEN
	        "DB_AlarmGlobal".nAlarmNoOffsetGlobal := 10;
	    END_IF;
	END_REGION
	
	REGION Monitoring
	    
	    REGION UH03
	        REGION Motor Protection UH03
	            #fbMonMotorProtectionUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMotorProtectionUH03.stSettings.xSelfQuit := FALSE;
	            #fbMonMotorProtectionUH03(sInFctnName := 'Motorschutz UH03',
	                                      sInPrefix := 'Motor',
	                                      sInAlarmMessage := 'Motorschutz ausgeloest',
	                                      sInSuffix := 'FC0060-FC0093',
	                                      wInTextListId_Function := 3,
	                                      wInTextListId_Message := 1,
	                                      xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                      xInSignal := "FC0060" AND "FC0061" //nur diese zwei für IBN SL2.1
	                                      AND "FC0071" //seitlicher Kreisel oben
	                                      AND "FC0072" //seitlicher Kreisel unten
	                                      AND "FC0062" AND "FC0063" AND "FC0064" AND "FC0065" AND "FC0066" AND "FC0067"
	                                      AND "FC0070" //Übergang
	                                      AND "FC0074" //Highway
	                                      AND "FC0075" //Highway
	                                      //   AND "FC0092" (* AND "FC0093" *) //Highway
	                                      AND "FC0090" AND "FC0091" // Highway
	                                      AND "FC0073", //Übergang
	                                      InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                      stOutHMI => "DB_Interface_HMI".stSystem.stMotorProtection.UH03);
	        END_REGION
	        
	        REGION Phasenüberwachung
	            #fbMonPhaseFailure.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonPhaseFailure.stSettings.xSelfQuit := FALSE;
	            #fbMonPhaseFailure(sInFctnName := 'Phasenausfall',
	                               sInPrefix := 'Phase',
	                               sInAlarmMessage := 'Phase ausgefallen',
	                               sInSuffix := 'DI0005',
	                               wInTextListId_Function := 6,
	                               wInTextListId_Message := 2,
	                               xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                               xInSignal := "DI0005",
	                               InOutMachineState := #stInOutControlUnitCabinetOF1,
	                               stOutHMI => "DB_Interface_HMI".stSystem.stPhase.UH03_400V);
	        END_REGION
	        
	        REGION 24 V UH03
	            #fbMonFuse24VUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse24VUH03.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse24VUH03(sInFctnName := 'Sicherungsfall 24 V UH03',
	                              sInPrefix := '24V-Intern',
	                              sInAlarmMessage := 'Sicherung ausgeloest',
	                              sInSuffix := 'DI0021-26',
	                              wInTextListId_Function := 4,
	                              wInTextListId_Message := 3,
	                              xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                              xInSignal := "DI0021" AND "DI0022" AND "DI0023" AND "DI0024" AND "DI0025" AND "DI0026",
	                              InOutMachineState := #stInOutControlUnitCabinetOF1,
	                              stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UH03_24V);
	        END_REGION
	        
	        REGION Sicherungsautomat UH03
	            #fbMonFuseCircuitBrakerUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuseCircuitBrakerUH03.stSettings.xSelfQuit := FALSE;
	            #fbMonFuseCircuitBrakerUH03(sInFctnName := 'Sicherungsfall',
	                                        sInPrefix := 'Backup Vorsicherung',
	                                        sInAlarmMessage := 'Sicherung ausgeloest',
	                                        sInSuffix := 'DI0016',
	                                        wInTextListId_Function := 4,
	                                        wInTextListId_Message := 3,
	                                        xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                        xInSignal := "DI0016",
	                                        InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                        stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UH03_400V);
	        END_REGION
	        
	        REGION Druckluft UH03
	            #fbMonPressureUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonPressureUH03.stSettings.xSelfQuit := FALSE;
	            #fbMonPressureUH03(sInFctnName := 'Druckluftueberwachung',
	                               sInPrefix := 'Druckluft UH03',
	                               sInAlarmMessage := 'Druckluft zu niedrig',
	                               sInSuffix := 'BP0004',
	                               wInTextListId_Function := 5,
	                               wInTextListId_Message := 4,
	                               xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                               xInSignal := "BP0004",
	                               InOutMachineState := #stInOutControlUnitCabinetOF1,
	                               stOutHMI => "DB_Interface_HMI".stSystem.stPressure.UH03);
	        END_REGION
	        
	        REGION Hauptschütze UH03
	            #fbMonMainContactorsUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMainContactorsUH03.stSettings.xSelfQuit := FALSE;
	            #fbMonMainContactorsUH03(sInFctnName := 'Hauptschuetzueberwachung',
	                                     sInPrefix := 'Hauptschuetze UH03',
	                                     sInAlarmMessage := 'Hauptschuetze Fehler',
	                                     sInSuffix := 'QA06xx',
	                                     wInTextListId_Function := 7,
	                                     wInTextListId_Message := 5,
	                                     xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                     xInSignal := "DB_InterfaceSafety".stFromSafety.stMainContactorsUH03.xOk,
	                                     InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                     stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UH03);
	        END_REGION
	        
	        REGION 400 V UC031
	            #fbMonFuse400VUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse400VUC031.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse400VUC031(sInFctnName := 'Sicherungsfall',
	                                sInPrefix := '400V UC031',
	                                sInAlarmMessage := 'Sicherung ausgeloest',
	                                sInSuffix := 'DI0006',
	                                wInTextListId_Function := 4,
	                                wInTextListId_Message := 3,
	                                xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError OR "SF0117",
	                                xInSignal := "DI0006",
	                                InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC031_400V);
	        END_REGION
	        
	        REGION 400 V UC032
	            #fbMonFuse400VUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse400VUC032.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse400VUC032(sInFctnName := 'Sicherungsfall',
	                                sInPrefix := '400V UC032',
	                                sInAlarmMessage := 'Sicherung ausgeloest',
	                                sInSuffix := 'DI0007',
	                                wInTextListId_Function := 4,
	                                wInTextListId_Message := 3,
	                                xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                xInSignal := "DI0007",
	                                InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC032_400V);
	        END_REGION
	        
	        REGION 400 V UC033
	            #fbMonFuse400VUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse400VUC033.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse400VUC033(sInFctnName := 'Sicherungsfall',
	                                sInPrefix := '400V UC033',
	                                sInAlarmMessage := 'Sicherung ausgeloest',
	                                sInSuffix := 'DI0010',
	                                wInTextListId_Function := 4,
	                                wInTextListId_Message := 3,
	                                xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                xInSignal := "DI0010",
	                                InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC033_400V);
	        END_REGION
	        
	        REGION SafetyRelais UH03 to UC072
	            #fbMonSafetyContactorsUH03toUC072.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonSafetyContactorsUH03toUC072.stSettings.xSelfQuit := FALSE;
	            #fbMonSafetyContactorsUH03toUC072(sInFctnName := 'Relaisueberwachung',
	                                              sInPrefix := 'Relais UH03 to UC072',
	                                              sInAlarmMessage := 'Relais Fehler',
	                                              sInSuffix := 'QA0660/61',
	                                              wInTextListId_Function := 7,
	                                              wInTextListId_Message := 5,
	                                              xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                              xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUH03toUC072.xOk,
	                                              InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                              stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UH03toUC072);
	        END_REGION
	        
	        REGION SafetyRelais UH03 to UH02
	            #fbMonSafetyContactorsUH03toUH02.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonSafetyContactorsUH03toUH02.stSettings.xSelfQuit := FALSE;
	            #fbMonSafetyContactorsUH03toUH02(sInFctnName := 'Relaisueberwachung',
	                                             sInPrefix := 'Relais UH03 to UH02',
	                                             sInAlarmMessage := 'Relais Fehler',
	                                             sInSuffix := 'QA0662/63',
	                                             wInTextListId_Function := 7,
	                                             wInTextListId_Message := 5,
	                                             xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                             xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUH03toUH02.xOk,
	                                             InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                             stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UH03toUH02);
	        END_REGION
	        
	        
	    END_REGION
	    
	    REGION UC031
	        
	        REGION Motor Protection UC031
	            #fbMonMotorProtectionUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMotorProtectionUC031.stSettings.xSelfQuit := FALSE;
	            #fbMonMotorProtectionUC031(sInFctnName := 'Motorschutz UC031',
	                                       sInPrefix := 'Motor',
	                                       sInAlarmMessage := 'Motorschutz ausgeloest',
	                                       wInTextListId_Function := 3,
	                                       wInTextListId_Message := 1,
	                                       sInSuffix := 'FC0140-FC0145',
	                                       xInQuitError := #stInOutControlUnitCabinetOF2.xQuitError OR "SF0117",
	                                       xInSignal := "FC0140" AND "FC0141" AND "FC0142" AND "FC0143" AND "FC0144" AND "FC0145",
	                                       InOutMachineState := #stInOutControlUnitCabinetOF2,
	                                       stOutHMI => "DB_Interface_HMI".stSystem.stMotorProtection.UC031);
	        END_REGION
	        
	        REGION Vorsicherung Motor + Bremse UC031
	            #fbMonFuseMotorAndBrakeUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuseMotorAndBrakeUC031.stSettings.xSelfQuit := FALSE;
	            #fbMonFuseMotorAndBrakeUC031(sInFctnName := 'Sicherungsfall 24 V Motorbremse UC031',
	                                         sInPrefix := '24V-Intern',
	                                         sInAlarmMessage := 'Sicherung ausgeloest',
	                                         sInSuffix := 'DI0100',
	                                         wInTextListId_Function := 4,
	                                         wInTextListId_Message := 3,
	                                         xInQuitError := #stInOutControlUnitCabinetOF2.xQuitError OR "SF0117",
	                                         xInSignal := "DI0100",
	                                         InOutMachineState := #stInOutControlUnitCabinetOF2,
	                                         stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC031_MotorBrake);
	        END_REGION
	        
	        REGION 24 V UC031
	            #fbMonFuse24VUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse24VUC031.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse24VUC031(sInFctnName := 'Sicherungsfall 24 V UC031',
	                               sInPrefix := '24V-Intern',
	                               sInAlarmMessage := 'Sicherung ausgeloest',
	                               sInSuffix := 'DI0101-103',
	                               wInTextListId_Function := 4,
	                               wInTextListId_Message := 3,
	                               xInQuitError := #stInOutControlUnitCabinetOF2.xQuitError OR "SF0117",
	                               xInSignal := "DI0101" AND "DI0102" AND "DI0103",
	                               InOutMachineState := #stInOutControlUnitCabinetOF2,
	                               stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC031_24V);
	        END_REGION
	        
	        REGION Druckluft UC031
	            #fbMonPressureUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonPressureUC031.stSettings.xSelfQuit := FALSE;
	            #fbMonPressureUC031(sInFctnName := 'Druckluftueberwachung',
	                                sInPrefix := 'Druckluft UC031',
	                                sInAlarmMessage := 'Druckluft zu niedrig',
	                                sInSuffix := 'BP0107',
	                                wInTextListId_Function := 5,
	                                wInTextListId_Message := 4,
	                                xInQuitError := #stInOutControlUnitCabinetOF2.xQuitError OR "SF0117",
	                                xInSignal := "BP0107",
	                                InOutMachineState := #stInOutControlUnitCabinetOF2,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stPressure.UC031);
	        END_REGION
	        REGION Hauptschütze UC031
	            #fbMonMainContactorsUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMainContactorsUC031.stSettings.xSelfQuit := FALSE;
	            #fbMonMainContactorsUC031(sInFctnName := 'Hauptschuetzueberwachung',
	                                      sInPrefix := 'Hauptschuetze UC031',
	                                      sInAlarmMessage := 'Hauptschuetze Fehler',
	                                      sInSuffix := 'QA09xx',
	                                      wInTextListId_Function := 5,
	                                      wInTextListId_Message := 4,
	                                      xInQuitError := #stInOutControlUnitCabinetOF2.xQuitError OR "SF0117",
	                                      xInSignal := "DB_InterfaceSafety".stFromSafety.stMainContactorsUC031.xOk,
	                                      InOutMachineState := #stInOutControlUnitCabinetOF2,
	                                      stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC031);
	        END_REGION
	        
	        REGION SafetyRelais UC031 Extern
	            #fbMonSafetyContactorsUC031Extern.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonSafetyContactorsUC031Extern.stSettings.xSelfQuit := FALSE;
	            #fbMonSafetyContactorsUC031Extern(sInFctnName := 'Relaisueberwachung',
	                                              sInPrefix := 'Relais UC031 Extern',
	                                              sInAlarmMessage := 'Relais Fehler',
	                                              sInSuffix := 'QA0922/23',
	                                              wInTextListId_Function := 7,
	                                              wInTextListId_Message := 5,
	                                              xInQuitError := #stInOutControlUnitCabinetOF2.xQuitError,
	                                              xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC031Extern.xOk,
	                                              InOutMachineState := #stInOutControlUnitCabinetOF2,
	                                              stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC031Extern);
	        END_REGION
	        
	        
	      
	        
	    END_REGION
	    
	    REGION UC032
	        
	        REGION Motor Protection UC032
	            #fbMonMotorProtectionUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMotorProtectionUC032.stSettings.xSelfQuit := FALSE;
	            #fbMonMotorProtectionUC032(sInFctnName := 'Motorschutz UC032',
	                                       sInPrefix := 'Motor',
	                                       sInAlarmMessage := 'Motorschutz ausgeloest',
	                                       sInSuffix := 'FC0200-FC0205',
	                                       wInTextListId_Function := 3,
	                                       wInTextListId_Message := 1,
	                                       xInQuitError := #stInOutControlUnitCabinetOF3.xQuitError OR "SF0177",
	                                       xInSignal := "FC0200" AND "FC0201" AND "FC0202" AND "FC0203" AND "FC0204" AND "FC0205",
	                                       InOutMachineState := #stInOutControlUnitCabinetOF3,
	                                       stOutHMI => "DB_Interface_HMI".stSystem.stMotorProtection.UC032);
	        END_REGION
	        
	        
	        REGION Vorsicherung Motor + Bremse UC032
	            #fbMonFuseMotorAndBrakeUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuseMotorAndBrakeUC032.stSettings.xSelfQuit := FALSE;
	            #fbMonFuseMotorAndBrakeUC032(sInFctnName := 'Sicherungsfall 24 V Motorbremse UC032',
	                                         sInPrefix := '24V-Intern',
	                                         sInAlarmMessage := 'Sicherung ausgeloest',
	                                         sInSuffix := 'DI0160',
	                                         wInTextListId_Function := 4,
	                                         wInTextListId_Message := 3,
	                                         xInQuitError := #stInOutControlUnitCabinetOF3.xQuitError,
	                                         xInSignal := "DI0160",
	                                         InOutMachineState := #stInOutControlUnitCabinetOF3,
	                                         stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC032_MotorBrake);
	        END_REGION
	        
	        REGION 24 V UC032
	            #fbMonFuse24VUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse24VUC032.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse24VUC032(sInFctnName := 'Sicherungsfall 24 V UC032',
	                               sInPrefix := '24V-Intern',
	                               sInAlarmMessage := 'Sicherung ausgeloest',
	                               sInSuffix := 'DI0161-165',
	                               wInTextListId_Function := 4,
	                               wInTextListId_Message := 3,
	                               xInQuitError := #stInOutControlUnitCabinetOF3.xQuitError,
	                               xInSignal := ("DI0161" AND "DI0162" AND "DI0163" AND "DI0164" AND "DI0165"),
	                               InOutMachineState := #stInOutControlUnitCabinetOF3,
	                               stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC032_24V);
	        END_REGION
	        
	        REGION Druckluft UC032
	            #fbMonPressureUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonPressureUC032.stSettings.xSelfQuit := FALSE;
	            #fbMonPressureUC032(sInFctnName := 'Druckluftueberwachung',
	                                sInPrefix := 'Druckluft UC032',
	                                sInAlarmMessage := 'Druckluft zu niedrig',
	                                sInSuffix := 'BP0167',
	                                wInTextListId_Function := 5,
	                                wInTextListId_Message := 4,
	                                xInQuitError := #stInOutControlUnitCabinetOF3.xQuitError OR "SF0177",
	                                xInSignal := "BP0167",
	                                InOutMachineState := #stInOutControlUnitCabinetOF3,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stPressure.UC032);
	        END_REGION
	        
	        REGION Hauptschütze UC032
	            #fbMonMainContactorsUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMainContactorsUC032.stSettings.xSelfQuit := FALSE;
	            #fbMonMainContactorsUC032(sInFctnName := 'Hauptschuetzueberwachung',
	                                      sInPrefix := 'Hauptschuetze UC032',
	                                      sInAlarmMessage := 'Hauptschuetze Fehler',
	                                      sInSuffix := 'QA12xx',
	                                      wInTextListId_Function := 5,
	                                      wInTextListId_Message := 4,
	                                      xInQuitError := #stInOutControlUnitCabinetOF3.xQuitError OR "SF0177",
	                                      xInSignal := "DB_InterfaceSafety".stFromSafety.stMainContactorsUC032.xOk,
	                                      InOutMachineState := #stInOutControlUnitCabinetOF3,
	                                      stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC032);
	        END_REGION
	        
	        REGION SafetyRelais UC032 Extern
	            #fbMonSafetyContactorsUC032Extern.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonSafetyContactorsUC032Extern.stSettings.xSelfQuit := FALSE;
	            #fbMonSafetyContactorsUC032Extern(sInFctnName := 'Relaisueberwachung',
	                                              sInPrefix := 'Relais UC032 Extern',
	                                              sInAlarmMessage := 'Relais Fehler',
	                                              sInSuffix := 'QA1232/33',
	                                              wInTextListId_Function := 7,
	                                              wInTextListId_Message := 5,
	                                              xInQuitError := #stInOutControlUnitCabinetOF3.xQuitError,
	                                              xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC032Extern.xOk,
	                                              InOutMachineState := #stInOutControlUnitCabinetOF3,
	                                              stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC032Extern);
	        END_REGION
	        
	        
	    END_REGION
	    
	    
	    
	   (* REGION Motor Protection UH03
	        #fbMonMotorProtectionUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	        #fbMonMotorProtectionUH03.stSettings.xSelfQuit := FALSE;
	        #fbMonMotorProtectionUH03(sInFctnName := 'Motorschutz UH03',
	                                  sInPrefix := 'Motor',
	                                  sInAlarmMessage := 'Motorschutz ausgeloest',
	                                  sInSuffix := 'FC0060-FC0093',
	                                  wInTextListId_Function := 3,
	                                  wInTextListId_Message := 1,
	                                  xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                  xInSignal := "FC0060" AND "FC0061" //nur diese zwei für IBN SL2.1
	                                  AND "FC0071" //seitlicher Kreisel oben
	                                  AND "FC0072" //seitlicher Kreisel unten
	                                  AND "FC0062" AND "FC0063" AND "FC0064" AND "FC0065" AND "FC0066" AND "FC0067"
	                                  AND "FC0070" //Übergang
	                                  AND "FC0074" //Highway
	                                  AND "FC0075" //Highway
	                               //   AND "FC0092" (* AND "FC0093" *) //Highway
	                                  AND "FC0090" AND "FC0091" // Highway
	                                  AND "FC0073", //Übergang
	                                  InOutMachineState := #stInOutControlUnitCabinet,
	                                  stOutHMI => "DB_Interface_HMI".stSystem.stMotorProtection.UH03);
	    END_REGION *)
	    
	    
	    (* REGION Motor Protection UC031
	        #fbMonMotorProtectionUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	        #fbMonMotorProtectionUC031.stSettings.xSelfQuit := FALSE;
	        #fbMonMotorProtectionUC031(sInFctnName := 'Motorschutz UC031',
	                                   sInPrefix := 'Motor',
	                                   sInAlarmMessage := 'Motorschutz ausgeloest',
	                                   wInTextListId_Function := 3,
	                                   wInTextListId_Message := 1,
	                                   sInSuffix := 'FC0140-FC0145',
	                                   xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0117",
	                                   xInSignal := "FC0140" AND "FC0141" AND "FC0142" AND "FC0143" AND "FC0144" AND "FC0145",
	                                   InOutMachineState := #stInOutControlUnitCabinet,
	                                   stOutHMI => "DB_Interface_HMI".stSystem.stMotorProtection.UC031);
	    END_REGION *)
	    
	    (* REGION Motor Protection UC032
	        #fbMonMotorProtectionUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	        #fbMonMotorProtectionUC032.stSettings.xSelfQuit := FALSE;
	        #fbMonMotorProtectionUC032(sInFctnName := 'Motorschutz UC032',
	                                   sInPrefix := 'Motor',
	                                   sInAlarmMessage := 'Motorschutz ausgeloest',
	                                   sInSuffix := 'FC0200-FC0205',
	                                   wInTextListId_Function := 3,
	                                   wInTextListId_Message := 1,
	                                   xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0177",
	                                   xInSignal := "FC0200" AND "FC0201" AND "FC0202" AND "FC0203" AND "FC0204" AND "FC0205",
	                                   InOutMachineState := #stInOutControlUnitCabinet,
	                                   stOutHMI => "DB_Interface_HMI".stSystem.stMotorProtection.UC032);
	    END_REGION *)
	    
	    REGION UC033
	        
	        REGION Motor Protection UC033
	            #fbMonMotorProtectionUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMotorProtectionUC033.stSettings.xSelfQuit := FALSE;
	            #fbMonMotorProtectionUC033(sInFctnName := 'Motorschutz UC033',
	                                       sInPrefix := 'Motor',
	                                       sInAlarmMessage := 'Motorschutz ausgeloest',
	                                       sInSuffix := 'FC0260-FC0265',
	                                       wInTextListId_Function := 3,
	                                       wInTextListId_Message := 1,
	                                       xInQuitError := #stInOutControlUnitCabinetOF4.xQuitError OR "SF0237",
	                                       xInSignal := ("FC0260" AND "FC0261" AND "FC0262" AND "FC0263" AND "FC0264" AND "FC0265"),
	                                       InOutMachineState := #stInOutControlUnitCabinetOF4,
	                                       stOutHMI => "DB_Interface_HMI".stSystem.stMotorProtection.UC033);
	        END_REGION
	        
	        
	        (* REGION Phasenüberwachung
	            #fbMonPhaseFailure.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonPhaseFailure.stSettings.xSelfQuit := FALSE;
	            #fbMonPhaseFailure(sInFctnName := 'Phasenausfall',
	                               sInPrefix := 'Phase',
	                               sInAlarmMessage := 'Phase ausgefallen',
	                               sInSuffix := 'DI0005',
	                               wInTextListId_Function := 6,
	                               wInTextListId_Message := 2,
	                               xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                               xInSignal := "DI0005",
	                               InOutMachineState := #stInOutControlUnitCabinet,
	                               stOutHMI => "DB_Interface_HMI".stSystem.stPhase.UH03_400V);
	        END_REGION *)
	        
	        
	        (* REGION 24 V UH03
	            #fbMonFuse24VUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse24VUH03.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse24VUH03(sInFctnName := 'Sicherungsfall 24 V UH03',
	                              sInPrefix := '24V-Intern',
	                              sInAlarmMessage := 'Sicherung ausgeloest',
	                              sInSuffix := 'DI0021-26',
	                              wInTextListId_Function := 4,
	                              wInTextListId_Message := 3,
	                              xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                              xInSignal := "DI0021" AND "DI0022" AND "DI0023" AND "DI0024" AND "DI0025" AND "DI0026",
	                              InOutMachineState := #stInOutControlUnitCabinet,
	                              stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UH03_24V);
	        END_REGION *)
	        
	        
	        (* REGION 24 V UC031
	             #fbMonFuse24VUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuse24VUC031.stSettings.xSelfQuit := FALSE;
	             #fbMonFuse24VUC031(sInFctnName := 'Sicherungsfall 24 V UC031',
	                                sInPrefix := '24V-Intern',
	                                sInAlarmMessage := 'Sicherung ausgeloest',
	                                sInSuffix := 'DI0101-103',
	                                wInTextListId_Function := 4,
	                                wInTextListId_Message := 3,
	                                xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0117",
	                                xInSignal := "DI0101" AND "DI0102" AND "DI0103",
	                                InOutMachineState := #stInOutControlUnitCabinet,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC031_24V);
	         END_REGION
	         
	         REGION 24 V UC032
	             #fbMonFuse24VUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuse24VUC032.stSettings.xSelfQuit := FALSE;
	             #fbMonFuse24VUC032(sInFctnName := 'Sicherungsfall 24 V UC032',
	                                sInPrefix := '24V-Intern',
	                                sInAlarmMessage := 'Sicherung ausgeloest',
	                                sInSuffix := 'DI0161-165',
	                                wInTextListId_Function := 4,
	                                wInTextListId_Message := 3,
	                                xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                xInSignal := ("DI0161" AND "DI0162" AND "DI0163" AND "DI0164" AND "DI0165"),
	                                InOutMachineState := #stInOutControlUnitCabinet,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC032_24V);
	         END_REGION
	         
	         REGION 24 V UC033
	             #fbMonFuse24VUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuse24VUC033.stSettings.xSelfQuit := FALSE;
	             #fbMonFuse24VUC033(sInFctnName := 'Sicherungsfall 24 V UC033',
	                                sInPrefix := '24V-Intern',
	                                sInAlarmMessage := 'Sicherung ausgeloest',
	                                sInSuffix := 'DI0221-223',
	                                wInTextListId_Function := 4,
	                                wInTextListId_Message := 3,
	                                xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                xInSignal := ("DI0221" AND "DI0222" AND "DI0223"),
	                                InOutMachineState := #stInOutControlUnitCabinet,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC033_24V);
	         END_REGION *)
	        
	        (* REGION Vorsicherung Motor + Bremse UC031
	             #fbMonFuseMotorAndBrakeUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuseMotorAndBrakeUC031.stSettings.xSelfQuit := FALSE;
	             #fbMonFuseMotorAndBrakeUC031(sInFctnName := 'Sicherungsfall 24 V Motorbremse UC031',
	                                          sInPrefix := '24V-Intern',
	                                          sInAlarmMessage := 'Sicherung ausgeloest',
	                                          sInSuffix := 'DI0100',
	                                          wInTextListId_Function := 4,
	                                          wInTextListId_Message := 3,
	                                          xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0117",
	                                          xInSignal := "DI0100",
	                                          InOutMachineState := #stInOutControlUnitCabinet,
	                                          stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC031_MotorBrake);
	         END_REGION *)
	        
	        (* REGION Vorsicherung Motor + Bremse UC032
	             #fbMonFuseMotorAndBrakeUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuseMotorAndBrakeUC032.stSettings.xSelfQuit := FALSE;
	             #fbMonFuseMotorAndBrakeUC032(sInFctnName := 'Sicherungsfall 24 V Motorbremse UC032',
	                                          sInPrefix := '24V-Intern',
	                                          sInAlarmMessage := 'Sicherung ausgeloest',
	                                          sInSuffix := 'DI0160',
	                                          wInTextListId_Function := 4,
	                                          wInTextListId_Message := 3,
	                                          xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                          xInSignal := "DI0160",
	                                          InOutMachineState := #stInOutControlUnitCabinet,
	                                          stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC032_MotorBrake);
	         END_REGION *)
	        
	        REGION Vorsicherung Motor + Bremse UC033
	            #fbMonFuseMotorAndBrakeUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuseMotorAndBrakeUC033.stSettings.xSelfQuit := FALSE;
	            #fbMonFuseMotorAndBrakeUC033(sInFctnName := 'Sicherungsfall 24 V Motorbremse UC033',
	                                         sInPrefix := '24V-Intern',
	                                         sInAlarmMessage := 'Sicherung ausgeloest',
	                                         sInSuffix := 'DI0220',
	                                         wInTextListId_Function := 4,
	                                         wInTextListId_Message := 3,
	                                         xInQuitError := #stInOutControlUnitCabinetOF4.xQuitError,
	                                         xInSignal := "DI0220",
	                                         InOutMachineState := #stInOutControlUnitCabinetOF4,
	                                         stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC033_MotorBrake);
	        END_REGION
	        
	        REGION 24 V UC033
	            #fbMonFuse24VUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuse24VUC033.stSettings.xSelfQuit := FALSE;
	            #fbMonFuse24VUC033(sInFctnName := 'Sicherungsfall 24 V UC033',
	                               sInPrefix := '24V-Intern',
	                               sInAlarmMessage := 'Sicherung ausgeloest',
	                               sInSuffix := 'DI0221-223',
	                               wInTextListId_Function := 4,
	                               wInTextListId_Message := 3,
	                               xInQuitError := #stInOutControlUnitCabinetOF4.xQuitError,
	                               xInSignal := ("DI0221" AND "DI0222" AND "DI0223"),
	                               InOutMachineState := #stInOutControlUnitCabinetOF4,
	                               stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC033_24V);
	        END_REGION
	        
	        
	        (* REGION Sicherungsautomat UH03
	            #fbMonFuseCircuitBrakerUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFuseCircuitBrakerUH03.stSettings.xSelfQuit := FALSE;
	            #fbMonFuseCircuitBrakerUH03(sInFctnName := 'Sicherungsfall',
	                                        sInPrefix := 'Backup Vorsicherung',
	                                        sInAlarmMessage := 'Sicherung ausgeloest',
	                                        sInSuffix := 'DI0016',
	                                        wInTextListId_Function := 4,
	                                        wInTextListId_Message := 3,
	                                        xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                        xInSignal := "DI0016",
	                                        InOutMachineState := #stInOutControlUnitCabinet,
	                                        stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UH03_400V);
	        END_REGION *)
	        
	        (* REGION 400 V UC031
	             #fbMonFuse400VUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuse400VUC031.stSettings.xSelfQuit := FALSE;
	             #fbMonFuse400VUC031(sInFctnName := 'Sicherungsfall',
	                                 sInPrefix := '400V UC031',
	                                 sInAlarmMessage := 'Sicherung ausgeloest',
	                                 sInSuffix := 'DI0006',
	                                 wInTextListId_Function := 4,
	                                 wInTextListId_Message := 3,
	                                 xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0117",
	                                 xInSignal := "DI0006",
	                                 InOutMachineState := #stInOutControlUnitCabinet,
	                                 stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC031_400V);
	         END_REGION
	         
	         REGION 400 V UC032
	             #fbMonFuse400VUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuse400VUC032.stSettings.xSelfQuit := FALSE;
	             #fbMonFuse400VUC032(sInFctnName := 'Sicherungsfall',
	                                 sInPrefix := '400V UC032',
	                                 sInAlarmMessage := 'Sicherung ausgeloest',
	                                 sInSuffix := 'DI0007',
	                                 wInTextListId_Function := 4,
	                                 wInTextListId_Message := 3,
	                                 xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                 xInSignal := "DI0007",
	                                 InOutMachineState := #stInOutControlUnitCabinet,
	                                 stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC032_400V);
	         END_REGION
	         
	         REGION 400 V UC033
	             #fbMonFuse400VUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonFuse400VUC033.stSettings.xSelfQuit := FALSE;
	             #fbMonFuse400VUC033(sInFctnName := 'Sicherungsfall',
	                                 sInPrefix := '400V UC033',
	                                 sInAlarmMessage := 'Sicherung ausgeloest',
	                                 sInSuffix := 'DI0010',
	                                 wInTextListId_Function := 4,
	                                 wInTextListId_Message := 3,
	                                 xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                 xInSignal := "DI0010",
	                                 InOutMachineState := #stInOutControlUnitCabinet,
	                                 stOutHMI => "DB_Interface_HMI".stSystem.stFuse.UC033_400V);
	         END_REGION *)
	        
	        (* REGION Druckluft UH03
	             #fbMonPressureUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonPressureUH03.stSettings.xSelfQuit := FALSE;
	             #fbMonPressureUH03(sInFctnName := 'Druckluftueberwachung',
	                                sInPrefix := 'Druckluft UH03',
	                                sInAlarmMessage := 'Druckluft zu niedrig',
	                                sInSuffix := 'BP0004',
	                                wInTextListId_Function := 5,
	                                wInTextListId_Message := 4,
	                                xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                xInSignal := "BP0004",
	                                InOutMachineState := #stInOutControlUnitCabinet,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stPressure.UH03);
	         END_REGION *)
	        
	        
	        (* REGION Druckluft UC031
	             #fbMonPressureUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonPressureUC031.stSettings.xSelfQuit := FALSE;
	             #fbMonPressureUC031(sInFctnName := 'Druckluftueberwachung',
	                                 sInPrefix := 'Druckluft UC031',
	                                 sInAlarmMessage := 'Druckluft zu niedrig',
	                                 sInSuffix := 'BP0107',
	                                 wInTextListId_Function := 5,
	                                 wInTextListId_Message := 4,
	                                 xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0117",
	                                 xInSignal := "BP0107",
	                                 InOutMachineState := #stInOutControlUnitCabinet,
	                                 stOutHMI => "DB_Interface_HMI".stSystem.stPressure.UC031);
	         END_REGION *)
	        
	        
	        (* REGION Druckluft UC032
	             #fbMonPressureUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonPressureUC032.stSettings.xSelfQuit := FALSE;
	             #fbMonPressureUC032(sInFctnName := 'Druckluftueberwachung',
	                                 sInPrefix := 'Druckluft UC032',
	                                 sInAlarmMessage := 'Druckluft zu niedrig',
	                                 sInSuffix := 'BP0167',
	                                 wInTextListId_Function := 5,
	                                 wInTextListId_Message := 4,
	                                 xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0177",
	                                 xInSignal := "BP0167",
	                                 InOutMachineState := #stInOutControlUnitCabinet,
	                                 stOutHMI => "DB_Interface_HMI".stSystem.stPressure.UC032);
	         END_REGION *)
	        
	        
	        REGION Druckluft UC033
	            #fbMonPressureUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonPressureUC033.stSettings.xSelfQuit := FALSE;
	            #fbMonPressureUC033(sInFctnName := 'Druckluftueberwachung',
	                                sInPrefix := 'Druckluft UC033',
	                                sInAlarmMessage := 'Druckluft zu niedrig',
	                                sInSuffix := 'BP0227',
	                                wInTextListId_Function := 5,
	                                wInTextListId_Message := 4,
	                                xInQuitError := #stInOutControlUnitCabinetOF4.xQuitError OR "SF0237",
	                                xInSignal := "BP0227",
	                                InOutMachineState := #stInOutControlUnitCabinetOF4,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stPressure.UC033);
	        END_REGION
	        
	        (*  REGION Hauptschütze UH03
	              #fbMonMainContactorsUH03.stSettings.xErrLedIfMachineIsOff := TRUE;
	              #fbMonMainContactorsUH03.stSettings.xSelfQuit := FALSE;
	              #fbMonMainContactorsUH03(sInFctnName := 'Hauptschuetzueberwachung',
	                                       sInPrefix := 'Hauptschuetze UH03',
	                                       sInAlarmMessage := 'Hauptschuetze Fehler',
	                                       sInSuffix := 'QA06xx',
	                                       wInTextListId_Function := 7,
	                                       wInTextListId_Message := 5,
	                                       xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                       xInSignal := "DB_InterfaceSafety".stFromSafety.stMainContactorsUH03.xOk,
	                                       InOutMachineState := #stInOutControlUnitCabinet,
	                                       stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UH03);
	          END_REGION *)
	        
	        (* REGION SafetyRelais UH03 to UC072
	             #fbMonSafetyContactorsUH03toUC072.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonSafetyContactorsUH03toUC072.stSettings.xSelfQuit := FALSE;
	             #fbMonSafetyContactorsUH03toUC072(sInFctnName := 'Relaisueberwachung',
	                                               sInPrefix := 'Relais UH03 to UC072',
	                                               sInAlarmMessage := 'Relais Fehler',
	                                               sInSuffix := 'QA0660/61',
	                                               wInTextListId_Function := 7,
	                                               wInTextListId_Message := 5,
	                                               xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                               xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUH03toUC072.xOk,
	                                               InOutMachineState := #stInOutControlUnitCabinet,
	                                               stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UH03toUC072);
	         END_REGION *)
	        
	        (* REGION SafetyRelais UH03 to UH02
	             #fbMonSafetyContactorsUH03toUH02.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonSafetyContactorsUH03toUH02.stSettings.xSelfQuit := FALSE;
	             #fbMonSafetyContactorsUH03toUH02(sInFctnName := 'Relaisueberwachung',
	                                               sInPrefix := 'Relais UH03 to UH02',
	                                               sInAlarmMessage := 'Relais Fehler',
	                                               sInSuffix := 'QA0662/63',
	                                               wInTextListId_Function := 7,
	                                               wInTextListId_Message := 5,
	                                               xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                               xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUH03toUH02.xOk,
	                                               InOutMachineState := #stInOutControlUnitCabinet,
	                                               stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UH03toUH02);
	         END_REGION *)
	        
	        (* REGION Hauptschütze UC031
	             #fbMonMainContactorsUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonMainContactorsUC031.stSettings.xSelfQuit := FALSE;
	             #fbMonMainContactorsUC031(sInFctnName := 'Hauptschuetzueberwachung',
	                                       sInPrefix := 'Hauptschuetze UC031',
	                                       sInAlarmMessage := 'Hauptschuetze Fehler',
	                                       sInSuffix := 'QA09xx',
	                                       wInTextListId_Function := 5,
	                                       wInTextListId_Message := 4,
	                                       xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0117",
	                                       xInSignal := "DB_InterfaceSafety".stFromSafety.stMainContactorsUC031.xOk,
	                                       InOutMachineState := #stInOutControlUnitCabinet,
	                                       stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC031);
	         END_REGION *)
	        
	        (* REGION SafetyRelais UC031 Extern
	             #fbMonSafetyContactorsUC031Extern.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonSafetyContactorsUC031Extern.stSettings.xSelfQuit := FALSE;
	             #fbMonSafetyContactorsUC031Extern(sInFctnName := 'Relaisueberwachung',
	                                              sInPrefix := 'Relais UC031 Extern',
	                                              sInAlarmMessage := 'Relais Fehler',
	                                              sInSuffix := 'QA0922/23',
	                                              wInTextListId_Function := 7,
	                                              wInTextListId_Message := 5,
	                                              xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                              xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC031Extern.xOk,
	                                              InOutMachineState := #stInOutControlUnitCabinet,
	                                              stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC031Extern);
	         END_REGION *)
	        
	        (* REGION Hauptschütze UC032
	             #fbMonMainContactorsUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	             #fbMonMainContactorsUC032.stSettings.xSelfQuit := FALSE;
	             #fbMonMainContactorsUC032(sInFctnName := 'Hauptschuetzueberwachung',
	                                       sInPrefix := 'Hauptschuetze UC032',
	                                       sInAlarmMessage := 'Hauptschuetze Fehler',
	                                       sInSuffix := 'QA12xx',
	                                       wInTextListId_Function := 5,
	                                       wInTextListId_Message := 4,
	                                       xInQuitError := #stInOutControlUnitCabinet.xQuitError OR "SF0177",
	                                       xInSignal := "DB_InterfaceSafety".stFromSafety.stMainContactorsUC032.xOk,
	                                       InOutMachineState := #stInOutControlUnitCabinet,
	                                       stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC032);
	         END_REGION
	         *)
	         (* REGION SafetyRelais UC032 Extern
	              #fbMonSafetyContactorsUC032Extern.stSettings.xErrLedIfMachineIsOff := TRUE;
	              #fbMonSafetyContactorsUC032Extern.stSettings.xSelfQuit := FALSE;
	              #fbMonSafetyContactorsUC032Extern(sInFctnName := 'Relaisueberwachung',
	                                                sInPrefix := 'Relais UC032 Extern',
	                                                sInAlarmMessage := 'Relais Fehler',
	                                                sInSuffix := 'QA1232/33',
	                                                wInTextListId_Function := 7,
	                                                wInTextListId_Message := 5,
	                                                xInQuitError := #stInOutControlUnitCabinet.xQuitError,
	                                                xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC032Extern.xOk,
	                                                InOutMachineState := #stInOutControlUnitCabinet,
	                                                stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC032Extern);
	          END_REGION *)
	        
	        REGION Hauptschütze UC033
	            #fbMonMainContactorsUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonMainContactorsUC033.stSettings.xSelfQuit := FALSE;
	            #fbMonMainContactorsUC033(sInFctnName := 'Hauptschuetzueberwachung',
	                                      sInPrefix := 'Hauptschuetze UC033',
	                                      sInAlarmMessage := 'Hauptschuetze Fehler',
	                                      sInSuffix := 'QA15xx',
	                                      wInTextListId_Function := 5,
	                                      wInTextListId_Message := 4,
	                                      xInQuitError := #stInOutControlUnitCabinetOF4.xQuitError OR "SF0237",
	                                      xInSignal := "DB_InterfaceSafety".stFromSafety.stMainContactorsUC033.xOk,
	                                      InOutMachineState := #stInOutControlUnitCabinetOF4,
	                                      stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC033);
	        END_REGION
	        
	        REGION SafetyRelais UC033 Extern
	            #fbMonSafetyContactorsUC033Extern.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonSafetyContactorsUC033Extern.stSettings.xSelfQuit := FALSE;
	            #fbMonSafetyContactorsUC033Extern(sInFctnName := 'Relaisueberwachung',
	                                              sInPrefix := 'Relais UC033 Extern',
	                                              sInAlarmMessage := 'Relais Fehler',
	                                              sInSuffix := 'QA1542/43',
	                                              wInTextListId_Function := 7,
	                                              wInTextListId_Message := 5,
	                                              xInQuitError := #stInOutControlUnitCabinetOF4.xQuitError,
	                                              xInSignal := "DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC033Extern.xOk,
	                                              InOutMachineState := #stInOutControlUnitCabinetOF4,
	                                              stOutHMI => "DB_Interface_HMI".stSystem.stMainContactor.UC033Extern);
	        END_REGION
	        
	    END_REGION
	    
	    REGION Brandschutz Interface
	        
	        REGION FAS 1
	            #fbMonFAS1.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFAS1.stSettings.xSelfQuit := FALSE;
	            #fbMonFAS1(sInFctnName := 'Feueralarm',
	                       sInPrefix := 'UH03 | FAS1',
	                       sInAlarmMessage := 'Feueralarm Signal 1',
	                       sInSuffix := 'DI0034',
	                       wInTextListId_Function := 8,
	                       wInTextListId_Message := 6,
	                       xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError OR "SF0002",
	                       xInSignal := "DI0034",
	                       InOutMachineState := #stInOutControlUnitCabinetOF1,
	                       stOutHMI => "DB_Interface_HMI".stSystem.stFireControl.NoFireAlarmFAS1);
	        END_REGION
	        
	        REGION FAS 2
	            #fbMonFAS2.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFAS2.stSettings.xSelfQuit := FALSE;
	            #fbMonFAS2(sInFctnName := 'Feueralarm',
	                       sInPrefix := 'UH03 | FAS2',
	                       sInAlarmMessage := 'Feueralarm Signal 2',
	                       sInSuffix := 'DI0033',
	                       wInTextListId_Function := 8,
	                       wInTextListId_Message := 6,
	                       xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError OR "SF0002",
	                       xInSignal := "DI0033",
	                       InOutMachineState := #stInOutControlUnitCabinetOF1,
	                       stOutHMI => "DB_Interface_HMI".stSystem.stFireControl.NoFireAlarmFAS2);
	        END_REGION
	        
	        REGION FPG open
	            #fbMonFPG_Open.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFPG_Open.stSettings.xSelfQuit := FALSE;
	            #fbMonFPG_Open(sInFctnName := 'Feueralarm',
	                           sInPrefix := 'UH03 | FD202',
	                           sInAlarmMessage := 'Tor nicht offen',
	                           sInSuffix := 'DI4612',
	                           wInTextListId_Function := 8,
	                           wInTextListId_Message := 7,
	                           xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError OR "SF0002",
	                           xInSignal := "DI4612",
	                           InOutMachineState := #stInOutControlUnitCabinetOF1,
	                           stOutHMI => "DB_Interface_HMI".stSystem.stFireControl.FPCOpened);
	        END_REGION
	        
	        REGION FPG fault
	            #fbMonFPG_Fault.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFPG_Fault.stSettings.xSelfQuit := FALSE;
	            #fbMonFPG_Fault(sInFctnName := 'Feueralarm',
	                            sInPrefix := 'UH03 | FD202',
	                            sInAlarmMessage := 'Fehler',
	                            sInSuffix := 'DI4611',
	                            wInTextListId_Function := 8,
	                            wInTextListId_Message := 8,
	                            xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError OR "SF0002",
	                            xInSignal := "DI4611",
	                            InOutMachineState := #stInOutControlUnitCabinetOF1,
	                            stOutHMI => "DB_Interface_HMI".stSystem.stFireControl.NoFault);
	        END_REGION
	        
	        REGION FPG fire alarm
	            #fbMonFPG_Fire.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonFPG_Fire.stSettings.xSelfQuit := FALSE;
	            #fbMonFPG_Fire(sInFctnName := 'Feueralarm',
	                           sInPrefix := 'UH03 | FD202',
	                           sInAlarmMessage := 'Feuer',
	                           sInSuffix := 'DI4610',
	                           wInTextListId_Function := 8,
	                           wInTextListId_Message := 6,
	                           xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError OR "SF0002",
	                           xInSignal := "DI4610",
	                           InOutMachineState := #stInOutControlUnitCabinetOF1,
	                           stOutHMI => "DB_Interface_HMI".stSystem.stFireControl.NoFireAlarmFPG);
	        END_REGION
	        
	    END_REGION
	    
	    REGION MISC (nicht für AllReadyToStart)
	        REGION NOT-Halt extern
	            #fbMonEstopExternUC031.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonEstopExternUC031.stSettings.xSelfQuit := TRUE;
	            #fbMonEstopExternUC031(sInFctnName := 'Not-Halt Extern',
	                                   sInPrefix := 'UC031',
	                                   sInSuffix := 'SF0781',
	                                   wInTextListId_Function := 20,
	                                   wInTextListId_Message := 20,
	                                   xInQuitError := #stInOutControlUnitCabinetOF2.xQuitError,
	                                   xInSignal := "DB_InterfaceSafety".stFromSafety.EStopUC031Extern1.Q,
	                                   InOutMachineState := #stInOutControlUnitCabinetOF2,
	                                   stOutHMI => "DB_Interface_HMI".stSystem.stExternal.EStopUC031);
	            
	            #fbMonEstopExternUC032.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonEstopExternUC032.stSettings.xSelfQuit := TRUE;
	            #fbMonEstopExternUC032(sInFctnName := 'Not-Halt Extern',
	                                   sInPrefix := 'UC032',
	                                   sInSuffix := 'SF1091',
	                                   wInTextListId_Function := 20,
	                                   wInTextListId_Message := 20,
	                                   xInQuitError := #stInOutControlUnitCabinetOF3.xQuitError,
	                                   xInSignal := "DB_InterfaceSafety".stFromSafety.EStopUC032Extern1.Q,
	                                   InOutMachineState := #stInOutControlUnitCabinetOF3,
	                                   stOutHMI => "DB_Interface_HMI".stSystem.stExternal.EStopUC032);
	            
	            #fbMonEstopExternUC033.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonEstopExternUC033.stSettings.xSelfQuit := TRUE;
	            #fbMonEstopExternUC033(sInFctnName := 'Not-Halt Extern',
	                                   sInPrefix := 'UC033',
	                                   sInSuffix := 'SF1401',
	                                   wInTextListId_Function := 20,
	                                   wInTextListId_Message := 20,
	                                   xInQuitError := #stInOutControlUnitCabinetOF4.xQuitError,
	                                   xInSignal := "DB_InterfaceSafety".stFromSafety.EStopUC033Extern1.Q,
	                                   InOutMachineState := #stInOutControlUnitCabinetOF4,
	                                   stOutHMI => "DB_Interface_HMI".stSystem.stExternal.EStopUC033);
	            
	            #fbMonEstopExternUH02.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonEstopExternUH02.stSettings.xSelfQuit := TRUE;
	            #fbMonEstopExternUH02(sInFctnName := 'Not-Halt Extern',
	                                  sInPrefix := 'UH02',
	                                  sInSuffix := 'SF0542',
	                                  wInTextListId_Function := 20,
	                                  wInTextListId_Message := 20,
	                                  xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                  xInSignal := "DB_InterfaceSafety".stFromSafety.EStopUH03ExternUH02.Q,
	                                  InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                  stOutHMI => "DB_Interface_HMI".stSystem.stExternal.EStopUH02);
	            
	            #fbMonEstopExternUC072.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonEstopExternUC072.stSettings.xSelfQuit := TRUE;
	            #fbMonEstopExternUC072(sInFctnName := 'Not-Halt Extern',
	                                   sInPrefix := 'UC072',
	                                   sInSuffix := 'SF0541',
	                                   wInTextListId_Function := 20,
	                                   wInTextListId_Message := 20,
	                                   xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                   xInSignal := "DB_InterfaceSafety".stFromSafety.EStopUH03ExternUC072.Q,
	                                   InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                   stOutHMI => "DB_Interface_HMI".stSystem.stExternal.EStopUC072);
	            
	        END_REGION
	        
	        REGION TCP-Kommunikation
	            #fbMonCommFortnaWCS.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonCommFortnaWCS.stSettings.xSelfQuit := TRUE;
	            #fbMonCommFortnaWCS(sInFctnName := 'Kommunikationsfehler',
	                                sInPrefix := 'UH03',
	                                sInSuffix := 'Fortna WCS',
	                                wInTextListId_Function := 20000,
	                                wInTextListId_Message := 20000,
	                                xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                xInSignal := "FB_CommunicationWCSBL_DB".fbTeleHandler.xOutConnectionActive,
	                                InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                stOutHMI => "DB_Interface_HMI".stSystem.stExternal.TCPFortnaWCS);
	            
	            #fbMonCommFortnaWES_ASRS.stSettings.xErrLedIfMachineIsOff := TRUE;
	            #fbMonCommFortnaWES_ASRS.stSettings.xSelfQuit := TRUE;
	            #fbMonCommFortnaWES_ASRS(sInFctnName := 'Kommunikationsfehler',
	                                     sInPrefix := 'UH03',
	                                     sInSuffix := 'Fortna WES ASRS',
	                                     wInTextListId_Function := 20000,
	                                     wInTextListId_Message := 20000,
	                                     xInQuitError := #stInOutControlUnitCabinetOF1.xQuitError,
	                                     xInSignal := "FB_CommunicationWCSBL_DB".fbTeleHandler.xOutConnectionActive,
	                                     InOutMachineState := #stInOutControlUnitCabinetOF1,
	                                     stOutHMI => "DB_Interface_HMI".stSystem.stExternal.TCPFortnaWES_ASRS);
	            
	        END_REGION
	        
	    END_REGION
	    
	END_REGION
	
	REGION AllReadyToStart
	    
	    #xAllReadyToStartOF1 :=
	    
	    //#fbMonMotorProtectionUH03.xOutOk AND
	    #fbMonPhaseFailure.xOutOk AND
	    #fbMonFuse24VUH03.xOutOk AND
	    #fbMonFuse400VUC031.xOutOk AND
	    #fbMonFuse400VUC032.xOutOk AND
	    #fbMonFuse400VUC033.xOutOk AND
	    #fbMonPressureUH03.xOutOk AND
	    #fbMonFuseCircuitBrakerUH03.xOutOk AND
	    #fbMonMainContactorsUH03.xOutOk AND
	    #fbMonSafetyContactorsUH03toUC072.xOutOk AND
	    #fbMonSafetyContactorsUH03toUH02.xOutOk AND
	    #fbMonFAS1.xOutOk AND
	    #fbMonFAS2.xOutOk AND
	    #fbMonFPG_Fire.xOutOk;// AND
	    //#fbMonFPG_Fault.xOutOk AND
	    //#fbMonFPG_Open.xOutOk; 
	    
	    
	    #xAllReadyToStartOF2 :=
	   // #fbMonMotorProtectionUC031.xOutOk AND
	    #fbMonFuse24VUC031.xOutOk AND
	    #fbMonFuseMotorAndBrakeUC031.xOutOk AND
	    #fbMonPressureUC031.xOutOk AND
	    #fbMonMainContactorsUC031.xOutOk AND
	    #fbMonSafetyContactorsUC031Extern.xOutOk AND
	    #fbMonFAS1.xOutOk AND
	    #fbMonFAS2.xOutOk AND
	    #fbMonFPG_Fire.xOutOk;// AND 
	   // #fbMonFPG_Fault.xOutOk  AND
	   // #fbMonFPG_Open.xOutOk;
	    
	    #xAllReadyToStartOF3 :=
	  //  #fbMonMotorProtectionUC032.xOutOk AND
	    #fbMonFuse24VUC032.xOutOk AND
	    #fbMonFuseMotorAndBrakeUC032.xOutOk AND
	    #fbMonPressureUC032.xOutOk AND
	    #fbMonMainContactorsUC032.xOutOk AND
	    #fbMonSafetyContactorsUC032Extern.xOutOk AND
	    #fbMonFAS1.xOutOk AND
	    #fbMonFAS2.xOutOk AND
	    #fbMonFPG_Fire.xOutOk; //AND
	    //#fbMonFPG_Fault.xOutOk AND
	   // #fbMonFPG_Open.xOutOk;
	    
	    #xAllReadyToStartOF4 :=
	    
	  //  #fbMonMotorProtectionUC033.xOutOk AND
	    #fbMonFuse24VUC033.xOutOk AND
	    #fbMonFuseMotorAndBrakeUC033.xOutOk AND
	    #fbMonPressureUC033.xOutOk AND
	    #fbMonMainContactorsUC033.xOutOk AND
	    #fbMonSafetyContactorsUC033Extern.xOutOk AND
	    #fbMonFAS1.xOutOk AND
	    #fbMonFAS2.xOutOk AND
	    #fbMonFPG_Fire.xOutOk;// AND
	   // #fbMonFPG_Fault.xOutOk AND
	   // #fbMonFPG_Open.xOutOk;
	    
	    //#fbMonPhaseFailure.xOutOk AND
	   // #fbMonFuse24VUH03.xOutOk AND
	   // #fbMonFuse24VUC031.xOutOk AND
	    //#fbMonFuse24VUC032.xOutOk AND
	   // #fbMonFuseMotorAndBrakeUC031.xOutOk AND
	  //  #fbMonFuseMotorAndBrakeUC032.xOutOk AND
	   
	  //  #fbMonFuseCircuitBrakerUH03.xOutOk AND
	  //  #fbMonFuse400VUC031.xOutOk AND
	  //  #fbMonFuse400VUC032.xOutOk AND
	   // #fbMonFuse400VUC033.xOutOk AND
	  //  #fbMonPressureUH03.xOutOk AND
	    //#fbMonPressureUC031.xOutOk AND
	   // #fbMonPressureUC032.xOutOk AND
	   // #fbMonMainContactorsUH03.xOutOk AND
	    //#fbMonSafetyContactorsUH03toUC072.xOutOk AND
	   // #fbMonSafetyContactorsUH03toUH02.xOutOk AND
	   // #fbMonMainContactorsUC031.xOutOk AND
	   // #fbMonSafetyContactorsUC031Extern.xOutOk AND
	   // #fbMonMainContactorsUC032.xOutOk AND
	   // #fbMonSafetyContactorsUC032Extern.xOutOk AND
	    
	   // #fbMonFAS1.xOutOk AND
	   // #fbMonFAS2.xOutOk AND
	    //#fbMonFPG_Fire.xOutOk AND
	    //#fbMonFPG_Fault.xOutOk AND
	    //#fbMonFPG_Open.xOutOk;
	    
	END_REGION
	
	REGION StateMain
	    
	    #fbStateMainOF1.stSettings.xEnableStartUpWarning := TRUE;
	    #fbStateMainOF1.stSettings.tStartUpTime := T#5s;
	    #fbStateMainOF1(xInBtnMachineOn := "SF0001",
	                 xInBtnMachineNotOff := "SF0000",
	                 xInBtnTrigMot := "SF0002" OR "IBN".xQuitGlob,
	                 xInBtnQuitError := "SF0002" OR "IBN".xQuitGlob,
	                 xInAllReadyToStart := #xAllReadyToStartOF1,
	                 xInAllInExecute := TRUE,
	                 xInAllStarted := TRUE,
	                 xInSafetyActive := "DB_InterfaceSafety".stFromSafety.EStopMainOF1.Q,
	                 xInAllInSafeState := "DB_InterfaceSafety".stFromSafety.EStopMainOF1.Q,
	                 stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                 stInOutHMI := "DB_Interface_HMI".stStateMachine);
	    
	    #fbStateMainOF2.stSettings.xEnableStartUpWarning := TRUE;
	    #fbStateMainOF2.stSettings.tStartUpTime := T#5s;
	    #fbStateMainOF2(xInBtnMachineOn := "SF0001" ,
	                    xInBtnMachineNotOff := "SF0000",
	                    xInBtnTrigMot := "SF0117" OR "IBN".xQuitGlob,
	                    xInBtnQuitError := "SF0117" OR "IBN".xQuitGlob,
	                    xInAllReadyToStart := #xAllReadyToStartOF2,
	                    xInAllInExecute := TRUE,
	                    xInAllStarted := TRUE,
	                    xInSafetyActive := "DB_InterfaceSafety".stFromSafety.EStopMainOF2.Q,
	                    xInAllInSafeState := "DB_InterfaceSafety".stFromSafety.EStopMainOF2.Q,
	                    stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF2,
	                    stInOutHMI := "DB_Interface_HMI".stStateMachine);
	    
	    #fbStateMainOF3.stSettings.xEnableStartUpWarning := TRUE;
	    #fbStateMainOF3.stSettings.tStartUpTime := T#5s;
	    #fbStateMainOF3(xInBtnMachineOn := "SF0001",
	                    xInBtnMachineNotOff := "SF0000",
	                    xInBtnTrigMot := "SF0117" OR "IBN".xQuitGlob,
	                    xInBtnQuitError := "SF0117" OR "IBN".xQuitGlob,
	                    xInAllReadyToStart := #xAllReadyToStartOF3,
	                    xInAllInExecute := TRUE,
	                    xInAllStarted := TRUE,
	                    xInSafetyActive := "DB_InterfaceSafety".stFromSafety.EStopMainOF3.Q,
	                    xInAllInSafeState := "DB_InterfaceSafety".stFromSafety.EStopMainOF3.Q,
	                    stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF3,
	                    stInOutHMI := "DB_Interface_HMI".stStateMachine);
	    
	    #fbStateMainOF4.stSettings.xEnableStartUpWarning := TRUE;
	    #fbStateMainOF4.stSettings.tStartUpTime := T#5s;
	    #fbStateMainOF4(xInBtnMachineOn := "SF0001",
	                    xInBtnMachineNotOff := "SF0000",
	                    xInBtnTrigMot := "SF0237" OR "IBN".xQuitGlob,
	                    xInBtnQuitError := "SF0237" OR "IBN".xQuitGlob,
	                    xInAllReadyToStart := #xAllReadyToStartOF4,
	                    xInAllInExecute := TRUE,
	                    xInAllStarted := TRUE,
	                    xInSafetyActive := "DB_InterfaceSafety".stFromSafety.EStopMainOF4.Q,
	                    xInAllInSafeState := "DB_InterfaceSafety".stFromSafety.EStopMainOF4.Q,
	                    stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF4,
	                    stInOutHMI := "DB_Interface_HMI".stStateMachine);
	    
	    
	    
	    
	    
	    
	    
	END_REGION
	
	REGION SCADA-Interface
	    "FB-OPC_UA_System-Stat_DB"(nInSystemStat := #fbStateMainOF1.nState,
	                               xInFireAlarm := (#fbMonFAS1.xOutError OR #fbMonFAS2.xOutError OR #fbMonFPG_Fire.xOutError),
	                               xInSafetyStop := NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF1.Q OR
	                               NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF2.Q OR
	                               NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF3.Q OR
	                               NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF4.Q,
	                               xInError := "DB_Interface_HMI".nActiveAlarms > 0,
	                               xInCommunicationError := "cTodoFalse",
	                               nOutScadaStatus => "DB_Status".System.Status);
	END_REGION
	
	REGION Interface Safety
	    
	    REGION to Safety
	        
	        "DB_InterfaceSafety".stToSafety.xAckGlob := "IBN".xAckGlob OR #fTrigReIntTime.Q;
	        
	        "DB_InterfaceSafety".stToSafety.xQuitButtonHss := "SF0002" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0301 := "SF0041" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0302 := "SF0043" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0303 := "SF0045" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0304 := "SF0047" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0305 := "SF0051" OR #fTrigReIntTime.Q;//"SF0191";
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0306 := "SF0053" OR #fTrigReIntTime.Q;//"SF0193";
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0307 := "SF0055" OR #fTrigReIntTime.Q;//"SF0195";
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0308 := "SF0057" OR #fTrigReIntTime.Q;//"SF0197";
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0309 := "SF0081" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ0310 := "SF0083" OR #fTrigReIntTime.Q;
	        
	        
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUC031 := "SF0117" OR"IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3101 := "SF0121" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3102 := "SF0123" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3103 := "SF0125" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3104 := "SF0127" OR #fTrigReIntTime.Q;
	        
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUC032 := "SF0177" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3201 := "SF0181" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3202 := "SF0183" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3203 := "SF0185" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3204 := "SF0187" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUC033 := "SF0237" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3301 := "SF0241" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3302 := "SF0243" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3303 := "SF0245" OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.xQuitButtonUZ3304 := "SF0247" OR #fTrigReIntTime.Q;
	        
	        
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUH03.xFeedback := "DI0013";
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUH03toUC072.xFeedback := "DI0014";
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUH03toUH02.xFeedback := "DI0015";
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUC031.xFeedback := "DI0106";
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUC031Extern.xFeedback := "DI0114";
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUC032.xFeedback := "DI0166";
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUC032Extern.xFeedback := "DI0174";
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUC033.xFeedback := "DI0226";
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUC033Extern.xFeedback := "DI0234";
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUH03.xQuit := "SF0002" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUH03toUC072.xQuit := "SF0002" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUH03toUH02.xQuit := "SF0002" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUC031.xQuit := "SF0117" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUC031Extern.xQuit := "SF0117" OR "SF0002" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUC032.xQuit := "SF0177" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUC032Extern.xQuit := "SF0177" OR "SF0002" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stMainContactorsUC033.xQuit := "SF0237" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        "DB_InterfaceSafety".stToSafety.stSafetyContactorsUC033Extern.xQuit := "SF0237" OR "SF0002" OR "IBN".xQuitGlob OR #fTrigReIntTime.Q;
	        
	        
	        "DB_InterfaceSafety".stToSafety.xMachineRunningOF1 := #stInOutControlUnitCabinetOF1.xRunning;
	        "DB_InterfaceSafety".stToSafety.xMachineRunningOF2 := #stInOutControlUnitCabinetOF2.xRunning;
	        "DB_InterfaceSafety".stToSafety.xMachineRunningOF3 := #stInOutControlUnitCabinetOF3.xRunning;
	        "DB_InterfaceSafety".stToSafety.xMachineRunningOF4 := #stInOutControlUnitCabinetOF4.xRunning;
	        
	        "DB_InterfaceSafety".stToSafety.xMachineStartingOF1 := #stInOutControlUnitCabinetOF1.xStarting;
	        "DB_InterfaceSafety".stToSafety.xMachineStartingOF2 := #stInOutControlUnitCabinetOF2.xStarting;
	        "DB_InterfaceSafety".stToSafety.xMachineStartingOF3 := #stInOutControlUnitCabinetOF3.xStarting;
	        "DB_InterfaceSafety".stToSafety.xMachineStartingOF4 := #stInOutControlUnitCabinetOF4.xStarting;
	        
	    END_REGION
	    
	    // "DB_InterfaceSafety".xFeedback400 := "DI0006";
	    // "DB_InterfaceSafety".xFeedback24 := "DI0007";
	    
	    REGION from Safety
	        
	    END_REGION
	    
	END_REGION
	
	REGION Outputs
	    
	    REGION UH03
	        
	        //LED Störung
	        // "PF0000" bei Ampel
	        
	        //LED Ein
	        "PF0001" := #stInOutControlUnitCabinetOF1.xRunning OR
	        #stInOutControlUnitCabinetOF1.xStartUpWarning OR "SF0003";
	        
	        //LED Start nach Störung
	        "PF0002" := #arESTOPAck[#c_UH03].xOutLed (* OR NOT #xAllReadyToStart *)OR
	        (#fbMonMotorProtectionUH03.xOutAckReq AND "Clock_1Hz") OR
	        //(#fbMonMotorProtectionUC031.xOutAckReq AND "Clock_1Hz") OR
	        //(#fbMonMotorProtectionUC032.xOutAckReq AND "Clock_1Hz") OR
	        //(#fbMonMotorProtectionUC033.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonPhaseFailure.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse24VUH03.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonFuse24VUC031.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonFuse24VUC032.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonFuse24VUC033.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonFuseMotorAndBrakeUC031.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonFuseMotorAndBrakeUC032.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonFuseMotorAndBrakeUC033.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuseCircuitBrakerUH03.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse400VUC031.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse400VUC032.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse400VUC033.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonPressureUH03.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonPressureUC031.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonPressureUC032.xOutAckReq AND "Clock_1Hz") OR
	        // (#fbMonPressureUC033.xOutAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stMainContactorsUH03.xAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUH03toUC072.xAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUH03toUH02.xAckReq AND "Clock_1Hz") OR
	        // ("DB_InterfaceSafety".stFromSafety.stMainContactorsUC031.xAckReq AND "Clock_1Hz") OR
	        // ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC031Extern.xAckReq AND "Clock_1Hz") OR
	        // ("DB_InterfaceSafety".stFromSafety.stMainContactorsUC032.xAckReq AND "Clock_1Hz") OR
	        // ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC032Extern.xAckReq AND "Clock_1Hz") OR
	        // ("DB_InterfaceSafety".stFromSafety.stMainContactorsUC033.xAckReq AND "Clock_1Hz") OR
	        // ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC033Extern.xAckReq AND "Clock_1Hz") OR
	        (#fbMonFAS1.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFAS2.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFPG_Fire.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFPG_Fault.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFPG_Open.xOutAckReq AND "Clock_1Hz") OR
	        "SF0003";
	        
	        //LED Druckluft
	        "PF0003" := #fbMonPressureUH03.xOutLedError OR
	        // #fbMonPressureUC031.xOutLedError OR
	        // #fbMonPressureUC032.xOutLedError OR
	        // #fbMonPressureUC033.xOutLedError OR
	        "SF0003";
	        
	        //LED Motorschutz
	        "PF0004" := #fbMonMotorProtectionUH03.xOutLedError OR
	        // #fbMonMotorProtectionUC031.xOutLedError OR
	        // #fbMonMotorProtectionUC032.xOutLedError OR
	        // #fbMonMotorProtectionUC033.xOutLedError OR
	        "SF0003";
	        
	        //LED Sicherung
	        "PF0005" := #fbMonFuse24VUH03.xOutLedError OR
	        // #fbMonFuse24VUC031.xOutLedError OR
	        // #fbMonFuse24VUC032.xOutLedError OR
	        // #fbMonFuse24VUC033.xOutLedError OR
	        // #fbMonFuseMotorAndBrakeUC031.xOutLedError OR
	        // #fbMonFuseMotorAndBrakeUC032.xOutLedError OR
	        // #fbMonFuseMotorAndBrakeUC033.xOutLedError OR
	        #fbMonFuseCircuitBrakerUH03.xOutLedError OR
	        #fbMonFuse400VUC031.xOutLedError OR
	        #fbMonFuse400VUC032.xOutLedError OR
	        #fbMonFuse400VUC033.xOutLedError OR
	        "SF0003";
	        
	        //LED Brandfall
	        "PF0006" := "SF0003"
	        OR #fbMonFAS1.xOutError
	        OR #fbMonFAS2.xOutError
	        OR #fbMonFPG_Fire.xOutError
	        OR #fbMonFPG_Fault.xOutError
	        OR #fbMonFPG_Open.xOutError;
	        
	        REGION Signalampel
	            //E-Stop Signalsäule
	            "PF0030" := NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF1.Q OR
	            NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF2.Q OR
	            NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF3.Q OR
	            NOT "DB_InterfaceSafety".stFromSafety.EStopMainOF4.Q OR
	            #fbMonFAS1.xOutError OR
	            #fbMonFAS2.xOutError OR
	            #fbMonFPG_Fire.xOutError OR
	            #fbMonFPG_Fault.xOutError OR //?
	            #fbMonFPG_Open.xOutError OR //?
	            "SF0003";
	            
	            //LED Störung + Signalsäule gelb
	            "PF0000" := "PF0031" :=
	            #fbMonMotorProtectionUH03.xOutLedError OR
	            #fbMonMotorProtectionUC031.xOutLedError OR
	            #fbMonMotorProtectionUC032.xOutLedError OR
	            #fbMonMotorProtectionUC033.xOutLedError OR
	            #fbMonPhaseFailure.xOutLedError OR
	            #fbMonFuse24VUH03.xOutLedError OR
	            #fbMonFuse24VUC031.xOutLedError OR
	            #fbMonFuse24VUC032.xOutLedError OR
	            #fbMonFuse24VUC033.xOutLedError OR
	            #fbMonFuseMotorAndBrakeUC031.xOutLedError OR
	            #fbMonFuseMotorAndBrakeUC032.xOutLedError OR
	            #fbMonFuseMotorAndBrakeUC033.xOutLedError OR
	            #fbMonFuseCircuitBrakerUH03.xOutLedError OR
	            #fbMonFuse400VUC031.xOutLedError OR
	            #fbMonFuse400VUC032.xOutLedError OR
	            #fbMonFuse400VUC033.xOutLedError OR
	            #fbMonPressureUH03.xOutLedError OR
	            #fbMonPressureUC031.xOutLedError OR
	            #fbMonPressureUC032.xOutLedError OR
	            #fbMonPressureUC033.xOutLedError OR
	            #fbMonMainContactorsUH03.xOutLedError OR
	            #fbMonMainContactorsUC031.xOutLedError OR
	            #fbMonMainContactorsUC032.xOutLedError OR
	            #fbMonMainContactorsUC033.xOutLedError OR
	            #fbMonSafetyContactorsUH03toUC072.xOutLedError OR
	            #fbMonSafetyContactorsUH03toUH02.xOutLedError OR
	            #fbMonSafetyContactorsUC031Extern.xOutLedError OR
	            #fbMonSafetyContactorsUC032Extern.xOutLedError OR
	            #fbMonSafetyContactorsUC033Extern.xOutLedError OR
	            "SF0003";
	            
	            (* // System Ready
	            "PF0032" := #stInOutControlUnitCabinet.xRunning OR
	            #stInOutControlUnitCabinet.xStartUpWarning OR "SF0003";
	            
	            //Anfahrwarnung
	            "PF0033" := #stInOutControlUnitCabinet.xStartUpWarning AND "Clock_1Hz"; *)
	            
	            
	            // System Ready
	            "PF0032" := #stInOutControlUnitCabinetOF1.xRunning OR
	            #stInOutControlUnitCabinetOF1.xStartUpWarning OR
	            #stInOutControlUnitCabinetOF2.xRunning OR
	            #stInOutControlUnitCabinetOF2.xStartUpWarning OR
	            #stInOutControlUnitCabinetOF3.xRunning OR
	            #stInOutControlUnitCabinetOF3.xStartUpWarning OR
	            #stInOutControlUnitCabinetOF4.xRunning OR
	            #stInOutControlUnitCabinetOF4.xStartUpWarning OR "SF0003";
	            
	            //Anfahrwarnung
	            "PF0033" := ("DB_MachineGlobal".stStateMainOF1.xStartUpWarning AND "Clock_1Hz") OR
	            ("DB_MachineGlobal".stStateMainOF2.xStartUpWarning AND "Clock_1Hz") OR
	            ("DB_MachineGlobal".stStateMainOF3.xStartUpWarning AND "Clock_1Hz") OR
	            ("DB_MachineGlobal".stStateMainOF4.xStartUpWarning AND "Clock_1Hz");
	            
	        END_REGION 
	        
	    END_REGION
	    
	    REGION UC031
	        
	        //LED Start nach Störung
	        "PF0117" := #arESTOPAck[#c_UC031].xOutLed OR
	        ("fbMain_DB".TRO327.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO330.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO333.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO336.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2101.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2102.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2101_1.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2102_1.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        (* NOT #xAllReadyToStart OR *)
	        (#fbMonMotorProtectionUC031.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse24VUC031.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuseMotorAndBrakeUC031.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse400VUC031.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonPressureUC031.xOutAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stMainContactorsUC031.xAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC031Extern.xAckReq AND "Clock_1Hz") OR "SF0003";
	        
	        //LED Druckluft
	        "PF0100" := #fbMonPressureUC031.xOutLedError OR "SF0003";
	        
	        //LED Motorschutz
	        "PF0101" := #fbMonMotorProtectionUC031.xOutLedError OR "SF0003";
	        
	        //LED Sicherung
	        "PF0102" :=
	        #fbMonFuse24VUC031.xOutLedError OR
	        #fbMonFuseMotorAndBrakeUC031.xOutLedError OR
	        #fbMonFuse400VUC031.xOutLedError OR "SF0003";
	    END_REGION
	    
	    REGION UC032
	        
	        //LED Start nach Störung
	        "PF0177" := #arESTOPAck[#c_UC032].xOutLed (* OR NOT #xAllReadyToStart *)OR
	        ("fbMain_DB".TRO349.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO352.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO355.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO358.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2201.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2202.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2201_1.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2202_1.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        (#fbMonMotorProtectionUC032.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse24VUC032.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuseMotorAndBrakeUC032.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse400VUC032.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonPressureUC032.xOutAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stMainContactorsUC032.xAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC032Extern.xAckReq AND "Clock_1Hz") OR "SF0003";
	        
	        //LED Druckluft
	        "PF0160" := #fbMonPressureUC032.xOutLedError OR "SF0003";
	        
	        //LED Motorschutz
	        "PF0161" := #fbMonMotorProtectionUC032.xOutLedError OR "SF0003";
	        
	        //LED Sicherung
	        "PF0162" :=
	        #fbMonFuse24VUC032.xOutLedError OR
	        #fbMonFuseMotorAndBrakeUC032.xOutLedError OR
	        #fbMonFuse400VUC032.xOutLedError OR "SF0003";
	    END_REGION
	    
	    REGION UC033
	        
	        //LED Start nach Störung
	        "PF0237" := #arESTOPAck[#c_UC033].xOutLed OR
	        (* NOT #xAllReadyToStart OR *)
	        ("fbMain_DB".TRO371.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO374.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO377.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO380.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2303.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2304.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2303_1.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2304_1.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        (#fbMonMotorProtectionUC033.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse24VUC033.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuseMotorAndBrakeUC033.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonFuse400VUC033.xOutAckReq AND "Clock_1Hz") OR
	        (#fbMonPressureUC033.xOutAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stMainContactorsUC033.xAckReq AND "Clock_1Hz") OR
	        ("DB_InterfaceSafety".stFromSafety.stSafetyContactorsUC033Extern.xAckReq AND "Clock_1Hz") OR "SF0003";
	        
	        //LED Druckluft
	        "PF0220" := #fbMonPressureUC033.xOutLedError OR "SF0003";
	        
	        //LED Motorschutz
	        "PF0221" := #fbMonMotorProtectionUC033.xOutLedError OR "SF0003";
	        
	        //LED Sicherung
	        "PF0222" :=
	        #fbMonFuse24VUC033.xOutLedError OR
	        #fbMonFuseMotorAndBrakeUC033.xOutLedError OR
	        #fbMonFuse400VUC033.xOutLedError OR "SF0003";
	    END_REGION
	    
	    REGION Ready for use (grüne LED) // TO DO 
	        
	        "PF0040" := "PF0042" := "PF0044" := "PF0046" :=
	        "PF0050" := "PF0052" := "PF0054" := "PF0056" :=
	        "PF0080" := "PF0082" := "PF0084" := "PF0086" :=
	        #stInOutControlUnitCabinetOF1.xRunning OR #stInOutControlUnitCabinetOF1.xStartUpWarning OR "SF0003";
	        
	        "PF0120" := "PF0122" := "PF0124" := "PF0126" :=
	        #stInOutControlUnitCabinetOF2.xRunning OR #stInOutControlUnitCabinetOF2.xStartUpWarning OR "SF0003";
	        
	        
	        "PF0180" := "PF0182" := "PF0184" := "PF0186" :=
	        "PF0190" := "PF0192" := "PF0194" := "PF0196" :=
	        #stInOutControlUnitCabinetOF3.xRunning OR #stInOutControlUnitCabinetOF3.xStartUpWarning OR "SF0003";
	        
	        
	        "PF0240" := "PF0242" := "PF0244" := "PF0246" :=
	        #stInOutControlUnitCabinetOF4.xRunning OR #stInOutControlUnitCabinetOF4.xStartUpWarning OR "SF0003";
	        
	        
	        
	    END_REGION
	    
	    REGION Reset ohne Estop
	        REGION UZ0311
	            "PF0085" :=
	            ("fbMain_DB".TRO300.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	            ("fbMain_DB".TRO303.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	            ("fbMain_DB".TRO306.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	            ("fbMain_DB".TRO307.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	        END_REGION
	        REGION UZ3205
	            "PF0191" :=
	            ("fbMain_DB".TRO372.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	            ("fbMain_DB".fbExitConv2301.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        END_REGION
	        
	        REGION UZ3206
	            "PF0193" :=
	            ("fbMain_DB".TRO375.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	            ("fbMain_DB".fbExitConv2301.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        END_REGION
	        
	        REGION UZ3207
	            "PF0195" :=
	            ("fbMain_DB".TRO378.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	            ("fbMain_DB".fbExitConv2302.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        END_REGION
	        
	        REGION UZ3208
	            "PF0197" :=
	            ("fbMain_DB".TRO381.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	            ("fbMain_DB".fbExitConv2302.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        END_REGION
	    END_REGION
	
	    
	    
	    
	END_REGION
	
	REGION NOT-Halt
	    REGION UH03
	        #arESTOPAck[#c_UH03](sInAlarmFunction := 'HSS',
	                             sInAlarmDevice := 'UH03',
	                             sInAlarmMessage := 'Not-Halt aktiv',
	                             sInAlarmSuffix := 'PF0002',
	                             wInTextListId_Function := 0,
	                             wInTextListId_Message := 0,
	                             xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUH03.AckReq,
	                             xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUH03.Q,
	                             xInAckReqGlobal := #arESTOPAck[#c_UZ0301].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0302].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0303].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0304].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0305].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0306].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0307].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0308].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0309].xOutAckReq OR
	                             #arESTOPAck[#c_UZ0310].xOutAckReq OR
	                             #arESTOPAck[#c_UH03_Extern1].xOutAckReq OR
	                             #arESTOPAck[#c_UH03_Extern2].xOutAckReq,
	                             (* #arESTOPAck[#c_UC031].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3101].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3102].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3103].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3104].xOutAckReq OR
	                             #arESTOPAck[#c_UC032].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3201].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3202].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3203].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3204].xOutAckReq OR
	                             #arESTOPAck[#c_UC033].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3301].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3302].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3303].xOutAckReq OR
	                             #arESTOPAck[#c_UZ3304].xOutAckReq, *)
	                             xInSafetyNotOkGlobal := #arESTOPAck[#c_UZ0301].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0302].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0303].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0304].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0305].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0306].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0307].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0308].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0309].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ0310].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UH03_Extern1].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UH03_Extern2].xOutSafetyNotOk,
	                            (* // #arESTOPAck[#c_UZ0311].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UC031].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3101].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3102].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3103].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3104].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UC032].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3201].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3202].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3203].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3204].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UC033].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3301].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3302].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3303].xOutSafetyNotOk OR
	                             #arESTOPAck[#c_UZ3304].xOutSafetyNotOk, *)
	                             xInMainCabinet := TRUE,
	                             //        xOutLed => "PF0002",
	                             stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                             stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UH03]);
	    END_REGION
	    
	    REGION UH03 Extern 1
	        #arESTOPAck[#c_UH03_Extern1](sInAlarmDevice := 'UH03 Ext1',
	                                     sInAlarmSuffix := 'PF0002',
	                                     wInTextListId_Function := 20,
	                                     wInTextListId_Message := 20,
	                                     stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UH03_Extern1],
	                                     stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                                     xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUH03ExternUH02.AckReq,
	                                     xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUH03ExternUH02.Q);
	        
	    END_REGION
	    
	    REGION UH03 Extern 2
	        #arESTOPAck[#c_UH03_Extern2](sInAlarmDevice := 'UH03 Ext2',
	                                     sInAlarmSuffix := 'PF0002',
	                                     wInTextListId_Function := 20,
	                                     wInTextListId_Message := 20,
	                                     stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UH03_Extern2],
	                                     stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                                     xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUH03ExternUC072.AckReq,
	                                     xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUH03ExternUC072.Q);
	        
	    END_REGION
	    
	    REGION UZ0301
	        #arESTOPAck[#c_UZ0301](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0301',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0041',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0301],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0301.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0301.Q);
	        // xOutLed => "PF0041");
	        
	        "PF0041" := #arESTOPAck[#c_UZ0301].xOutLed OR
	        ("fbMain_DB".TRO328.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2103.xOutGridError AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ0302
	        #arESTOPAck[#c_UZ0302](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0302',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0043',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0302],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0302.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0302.Q);
	        // xOutLed => "PF0043");
	        
	        "PF0043" := #arESTOPAck[#c_UZ0302].xOutLed OR
	        ("fbMain_DB".TRO331.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2103.xOutGridError AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ0303
	        #arESTOPAck[#c_UZ0303](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0303',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0045',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0303],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0303.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0303.Q);
	        // xOutLed => "PF0045");
	        
	        "PF0045" := #arESTOPAck[#c_UZ0303].xOutLed OR
	        ("fbMain_DB".TRO334.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2104.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        
	    END_REGION ;
	    
	    REGION UZ0304
	        #arESTOPAck[#c_UZ0304](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0304',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0047',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0304],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0304.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0304.Q);
	        // xOutLed => "PF0047");
	        
	        "PF0047" := #arESTOPAck[#c_UZ0304].xOutLed OR
	        ("fbMain_DB".TRO337.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2104.xOutGridError AND "Clock_1Hz") OR "SF0003";
	    END_REGION ;
	    
	    REGION UZ0305
	        
	        #arESTOPAck[#c_UZ0305](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0305',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0051',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0305],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0305.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0305.Q(* xOutLed => "PF0051" *));
	        
	        "PF0051" := #arESTOPAck[#c_UZ0305].xOutLed OR
	        ("fbMain_DB".TRO349.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2201.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2201_2.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ0306
	        
	        #arESTOPAck[#c_UZ0306](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0306',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0053',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0306],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0306.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0306.Q);
	        // xOutLed => "PF0053");
	        
	        "PF0053" := #arESTOPAck[#c_UZ0306].xOutLed OR
	        ("fbMain_DB".TRO352.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2201.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2201_1.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ0307
	        
	        #arESTOPAck[#c_UZ0307](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0307',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0055',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0307],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0307.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0307.Q);
	        // xOutLed => "PF0055");
	        
	        "PF0055" := #arESTOPAck[#c_UZ0307].xOutLed OR
	        ("fbMain_DB".TRO355.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2202.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2202_1.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ0308
	        
	        #arESTOPAck[#c_UZ0308](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0308',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0057',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0308],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0308.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0308.Q);
	        // xOutLed => "PF0057");
	        
	        "PF0057" := #arESTOPAck[#c_UZ0308].xOutLed OR
	        ("fbMain_DB".TRO358.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2202.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2202_2.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ0309
	        #arESTOPAck[#c_UZ0309](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0309',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0081',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0309],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0309.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0309.Q);
	                               // xOutLed => "PF0081");
	                               
	        "PF0081" := #arESTOPAck[#c_UZ0309].xOutLed OR
	        ("fbMain_DB".TRO308.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO302.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".TRO305.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	        
	    END_REGION
	    
	    REGION UZ0310
	        #arESTOPAck[#c_UZ0310](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ0310',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0083',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ0310],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF1,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0310.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ0310.Q);
	                               // xOutLed => "PF0083");
	                               
	        "PF0083" := #arESTOPAck[#c_UZ0310].xOutLed OR
	        ("fbMain_DB".fbCarousel2110.xOutGridError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbCarousel2112.xOutGridError AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UC031
	        
	        #arESTOPAck[#c_UC031](sInAlarmFunction := 'Unterverteiler',
	                              sInAlarmDevice := 'UC031',
	                              sInAlarmMessage := 'Not-Halt aktiv',
	                              sInAlarmSuffix := 'PF0117',
	                              wInTextListId_Function := 2,
	                              wInTextListId_Message := 0,
	                              stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UC031],
	                              stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF2,
	                              xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUC031.AckReq,
	                              xInAckReqGlobal:= #arESTOPAck[#c_UC031].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3101].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3102].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3103].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3104].xOutAckReq OR
	                              #arESTOPAck[#c_UC031_Extern].xOutAckReq,
	                              xInSafetyNotOkGlobal:= #arESTOPAck[#c_UC031].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3101].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3102].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3103].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3104].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UC031_Extern].xOutSafetyNotOk,
	                              xInMainCabinet:= TRUE ,
	                              xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUC031.Q);
	        
	        //xOutLed => "PF0117"); // wird oben beschrieben
	        
	    END_REGION
	    
	    REGION UC031 Extern
	        #arESTOPAck[#c_UC031_Extern](sInAlarmDevice := 'UC031 Ext',
	                                     sInAlarmSuffix := 'PF0117',
	                                     wInTextListId_Function := 20,
	                                     wInTextListId_Message := 20,
	                                     stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UC031_Extern],
	                                     stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF2,
	                                     xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUC031Extern1.AckReq,
	                                     xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUC031Extern1.Q);
	        
	    END_REGION
	    
	    REGION UZ3101
	        
	        #arESTOPAck[#c_UZ3101](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3101',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0121',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3101],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF2,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3101.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3101.Q);
	        // xOutLed => "PF0121");
	        
	        "PF0121" := #arESTOPAck[#c_UZ3101].xOutLed OR
	        ("fbMain_DB".TRO327.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2101.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2101_2.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ3102
	        
	        #arESTOPAck[#c_UZ3102](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3102',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0123',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3102],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF2,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3102.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3102.Q);
	        // xOutLed => "PF0123");
	        
	        "PF0123" := #arESTOPAck[#c_UZ3102].xOutLed OR
	        ("fbMain_DB".TRO330.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2101.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2101_1.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ3103
	        
	        #arESTOPAck[#c_UZ3103](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3103',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0125',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3103],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF2,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3103.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3103.Q);
	        // xOutLed => "PF0125");
	        
	        "PF0125" := #arESTOPAck[#c_UZ3103].xOutLed OR
	        ("fbMain_DB".TRO333.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2102.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2102_1.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION ;
	    
	    REGION UZ3104
	        
	        #arESTOPAck[#c_UZ3104](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3104',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0127',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3104],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF2,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3104.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3104.Q);
	        // xOutLed => "PF0127");
	        
	        "PF0127" := #arESTOPAck[#c_UZ3104].xOutLed OR
	        ("fbMain_DB".TRO336.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2102.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2102_2.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION ;
	    
	    REGION UC032
	        
	        #arESTOPAck[#c_UC032](sInAlarmFunction := 'Unterverteiler',
	                              sInAlarmDevice := 'UC032',
	                              sInAlarmMessage := 'Not-Halt aktiv',
	                              sInAlarmSuffix := 'PF0177',
	                              wInTextListId_Function := 2,
	                              wInTextListId_Message := 0,
	                              stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UC032],
	                              stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF3,
	                              xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUC032.AckReq,
	                              xInAckReqGlobal:= #arESTOPAck[#c_UC032].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3201].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3202].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3203].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3204].xOutAckReq OR
	                              #arESTOPAck[#c_UC032_Extern].xOutAckReq,
	                              xInSafetyNotOkGlobal:= #arESTOPAck[#c_UC032].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3201].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3202].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3203].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3204].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UC032_Extern].xOutSafetyNotOk,
	                              xInMainCabinet:= TRUE ,
	                              xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUC032.Q);
	        //   xOutLed => "PF0177" ); // wird oben beschrieben 
	    END_REGION
	    
	    REGION UC032 Extern
	        #arESTOPAck[#c_UC032_Extern](sInAlarmDevice := 'UC032 Ext',
	                                     sInAlarmSuffix := 'PF0177',
	                                     wInTextListId_Function := 20,
	                                     wInTextListId_Message := 20,
	                                     stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UC032_Extern],
	                                     stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF3,
	                                     xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUC032Extern1.AckReq,
	                                     xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUC032Extern1.Q);
	        
	    END_REGION
	    
	    REGION UZ3201
	        
	        #arESTOPAck[#c_UZ3201](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3201',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0181',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3201],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF3,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3201.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3201.Q);
	        // xOutLed => "PF0181");
	        
	        "PF0181" := #arESTOPAck[#c_UZ3201].xOutLed OR
	        ("fbMain_DB".TRO350.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2203.xOutGridError AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ3202
	        
	        #arESTOPAck[#c_UZ3202](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3202',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0183',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3202],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF3,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3202.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3202.Q);
	        // xOutLed => "PF0183");
	        
	        "PF0183" := #arESTOPAck[#c_UZ3202].xOutLed OR
	        ("fbMain_DB".TRO353.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2203.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        
	    END_REGION
	    
	    REGION UZ3203
	        
	        #arESTOPAck[#c_UZ3203](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3203',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0185',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3203],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF3,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3203.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3203.Q);
	        // xOutLed => "PF0185");
	        
	        "PF0185" := #arESTOPAck[#c_UZ3203].xOutLed OR
	        ("fbMain_DB".TRO356.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2204.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        
	    END_REGION
	    
	    REGION UZ3204
	        
	        #arESTOPAck[#c_UZ3204](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3204',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0187',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3204],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF3,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3204.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3204.Q);
	        // xOutLed => "PF0187");
	        
	        "PF0187" := #arESTOPAck[#c_UZ3204].xOutLed OR
	        ("fbMain_DB".TRO359.fbConvVario.fbFingerControl.xOutErrorRasterSensor AND "Clock_1Hz") OR
	        ("fbMain_DB".fbExitConv2204.xOutGridError AND "Clock_1Hz") OR "SF0003";
	        
	    END_REGION
	    
	    REGION UC033
	        
	        #arESTOPAck[#c_UC033](sInAlarmFunction := 'Unterverteiler',
	                              sInAlarmDevice := 'UC033',
	                              sInAlarmMessage := 'Not-Halt aktiv',
	                              sInAlarmSuffix := 'PF0237',
	                              wInTextListId_Function := 2,
	                              wInTextListId_Message := 0,
	                              stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UC033],
	                              stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF4,
	                              xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUC033.AckReq,
	                              xInAckReqGlobal:= #arESTOPAck[#c_UC033].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3301].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3302].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3303].xOutAckReq OR
	                              #arESTOPAck[#c_UZ3304].xOutAckReq OR
	                              #arESTOPAck[#c_UC033_Extern].xOutAckReq,
	                              xInSafetyNotOkGlobal:= #arESTOPAck[#c_UC033].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3301].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3302].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3303].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UZ3304].xOutSafetyNotOk OR
	                              #arESTOPAck[#c_UC033_Extern].xOutSafetyNotOk,
	                              xInMainCabinet:= TRUE ,
	                              xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUC033.Q);
	        //  xOutLed => "PF0237"); wird oben beschrieben
	    END_REGION
	    
	    REGION UC033 Extern
	        #arESTOPAck[#c_UC033_Extern](sInAlarmDevice := 'UC033 Ext',
	                                     sInAlarmSuffix := 'PF0237',
	                                     wInTextListId_Function := 20,
	                                     wInTextListId_Message := 20,
	                                     stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UC033_Extern],
	                                     stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF4,
	                                     xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUC033Extern1.AckReq,
	                                     xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUC033Extern1.Q);
	        
	    END_REGION
	    
	    REGION UZ3301
	        
	        #arESTOPAck[#c_UZ3301](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3301',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0241',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3301],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF4,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3301.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3301.Q);
	        // xOutLed => "PF0241");
	        
	        "PF0241" := #arESTOPAck[#c_UZ3301].xOutLed OR
	        ("fbMain_DB".TRO371.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2303.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2303_2.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ3302
	        
	        #arESTOPAck[#c_UZ3302](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3302',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0243',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3302],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF4,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3302.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3302.Q);
	        //   xOutLed => "PF0243");
	        "PF0243" := #arESTOPAck[#c_UZ3302].xOutLed OR
	        ("fbMain_DB".TRO374.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2303.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2303_1.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ3303
	        
	        #arESTOPAck[#c_UZ3303](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3303',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0245',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3303],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF4,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3303.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3303.Q);
	        // xOutLed => "PF0245");
	        
	        "PF0245" := #arESTOPAck[#c_UZ3303].xOutLed OR
	        ("fbMain_DB".TRO377.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2304.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2304_1.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	    REGION UZ3304
	        
	        #arESTOPAck[#c_UZ3304](sInAlarmFunction := 'Bedientableau',
	                               sInAlarmDevice := 'UZ3304',
	                               sInAlarmMessage := 'Not-Halt aktiv',
	                               sInAlarmSuffix := 'PF0247',
	                               wInTextListId_Function := 1,
	                               wInTextListId_Message := 0,
	                               stInOutHmiEstopPanel := "DB_Interface_HMI".arEStops[#c_UZ3304],
	                               stInOutControlUnitCabinet := #stInOutControlUnitCabinetOF4,
	                               xInAckReqLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3304.AckReq,
	                               xInEstopOkLocal := "DB_InterfaceSafety".stFromSafety.EStopUZ3304.Q);
	        //   xOutLed => "PF0247");
	        
	        "PF0247" := #arESTOPAck[#c_UZ3304].xOutLed OR
	        ("fbMain_DB".TRO380.xOutUnloadingError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbEncoderMonitor2304.xOutError AND "Clock_1Hz") OR
	        ("fbMain_DB".fbPinControl2304_2.xOutErrorRasterSensor AND "Clock_1Hz") OR "SF0003";
	    END_REGION
	    
	END_REGION
END_FUNCTION_BLOCK

