FUNCTION_BLOCK "FB_Visu"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
   VAR_TEMP 
      nIdx : Int;
   END_VAR


BEGIN
	REGION Konfiguration TRO-Nummern
	    "DB_Interface_HMI".stTRO.TRO400.UDT_Config.sName := 'TRO400';
	    "DB_Interface_HMI".stTRO.TRO401.UDT_Config.sName := 'TRO401'; 
	    "DB_Interface_HMI".stTRO.TRO402.UDT_Config.sName := 'TRO402'; 
	    "DB_Interface_HMI".stTRO.TRO403.UDT_Config.sName := 'TRO403';
	    "DB_Interface_HMI".stTRO.TRO404.UDT_Config.sName := 'TRO404';
	    "DB_Interface_HMI".stTRO.TRO405.UDT_Config.sName := 'TRO405';
	    "DB_Interface_HMI".stTRO.TRO406.UDT_Config.sName := 'TRO406';
	    "DB_Interface_HMI".stTRO.TRO407.UDT_Config.sName := 'TRO407';
	    "DB_Interface_HMI".stTRO.TRO408.UDT_Config.sName := 'TRO408';
	    "DB_Interface_HMI".stTRO.TRO409.UDT_Config.sName := 'TRO409';
	    "DB_Interface_HMI".stTRO.TRO410.UDT_Config.sName := 'TRO410';
	    "DB_Interface_HMI".stTRO.TRO411.UDT_Config.sName := 'TRO411';
	    "DB_Interface_HMI".stTRO.TRO412.UDT_Config.sName := 'TRO412';
	    "DB_Interface_HMI".stTRO.TRO413.UDT_Config.sName := 'TRO413';
	    "DB_Interface_HMI".stTRO.TRO414.UDT_Config.sName := 'TRO414';
	    "DB_Interface_HMI".stTRO.TRO415.UDT_Config.sName := 'TRO415';
	    "DB_Interface_HMI".stTRO.TRO416.UDT_Config.sName := 'TRO416';
	    "DB_Interface_HMI".stTRO.TRO417.UDT_Config.sName := 'TRO417';
	    "DB_Interface_HMI".stTRO.TRO418.UDT_Config.sName := 'TRO418';
	    "DB_Interface_HMI".stTRO.TRO419.UDT_Config.sName := 'TRO419';
	    "DB_Interface_HMI".stTRO.TRO420.UDT_Config.sName := 'TRO420';
	    "DB_Interface_HMI".stTRO.TRO421.UDT_Config.sName := 'TRO421';
	    "DB_Interface_HMI".stTRO.TRO422.UDT_Config.sName := 'TRO422';
	    "DB_Interface_HMI".stTRO.TRO423.UDT_Config.sName := 'TRO423';
	    "DB_Interface_HMI".stTRO.TRO424.UDT_Config.sName := 'TRO424';
	END_REGION
	
	REGION Group-Error Schaltschränke
	    REGION UH04
	        "DB_Interface_HMI".stSystem.stGroupError.xUH04 :=
	        "DB_Interface_HMI".arEstops[0].xEStopActive OR
	        NOT "DB_Interface_HMI".stSystem.stFuse.UH04_400V.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stMainContactor.UH04.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stMotorProtection.UH04.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stPhase.UH04_400V.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stPressure.UH04.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stFireControl.NoFireAlarmFAS1.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stFireControl.NoFireAlarmFAS2.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stFireControl.FPCOpened.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stFireControl.NoFault.xSigOk OR
	        NOT "DB_Interface_HMI".stSystem.stFireControl.NoFireAlarmFPG.xSigOk;
	    END_REGION
	END_REGION
	
	REGION Sammelnothalt
	    "DB_Interface_HMI".stSystem.stGroupError.UDT_Panel_EmergencyStopCollected.xEStopActive :=
	    "DB_Interface_HMI".arEstops[0].xEStopActive OR
	    "DB_Interface_HMI".arEstops[1].xEStopActive OR
	    "DB_Interface_HMI".arEstops[2].xEStopActive OR
	    "DB_Interface_HMI".arEstops[3].xEStopActive OR
	    "DB_Interface_HMI".arEstops[4].xEStopActive;
	END_REGION
	
	REGION Workstations
	    "DB_Interface_HMI".stWorkStations.Workstation1 := "DB_Prozessdaten".stWorkStations.stMPS1;
	    "DB_Interface_HMI".stWorkStations.Workstation2 := "DB_Prozessdaten".stWorkStations.stMPS2;
	    "DB_Interface_HMI".stWorkStations.Workstation3 := "DB_Prozessdaten".stWorkStations.stMPS3;
	END_REGION
END_FUNCTION_BLOCK

