FUNCTION_BLOCK "FB_Main_skel_UH02"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
// ============================================================
// AUTOMATISCH GENERIERTES GRUNDGERUEST — create_skel.py
// Quelle: E/A-Listen UH02 (data/)
// TODO-Marken kennzeichnen manuell zu ergaenzende Stellen
// (Timings, Topologie/JamAreas, Safety, Release, Priority).
// ============================================================
   VAR
      TRO201 : "FB_ILS_MTRO_PinStore_Auto";   // KR-K1101 / Block 1.1.1
      TRO202 : "FB_ILS_MTRO_PinStore_Auto";   // KR-K1102 / Block 1.1.3
      TRO203 : "FB_ILS_MTRO_PinStore_Auto";   // KR-K1201 / Block 1.2.1
      TRO204 : "FB_ILS_MTRO_PinStore_Auto";   // KR-K1202 / Block 1.2.3
      TRO205 : "FB_ILS_MTRO_PinStore_Auto";   // KR-K1303 / Block 1.3.1
      TRO206 : "FB_ILS_MTRO_PinStore_Auto";   // KR-K1304 / Block 1.3.3
      TRO207 : "FB_ILS_MTRO_1Sep";   // KR-M1100
      TRO208 : "FB_ILS_MTRO_PinStore_Auto";   // KR-M1101 / Block 1.1.1
      TRO209 : "FB_ILS_MTRO_PinStore_Auto";   // KR-M1102 / Block 1.1.3
      TRO210 : "FB_ILS_MTRO_1Sep";   // KR-M1103
      TRO211 : "FB_ILS_MTRO_1Sep";   // CV-M1104
      TRO212 : "FB_ILS_MTRO_Vario";   // CV-M1105
      TRO213 : "FB_ILS_MTRO_Vario";   // CV-M1106 / Block 1.1.2
      TRO214 : "FB_ILS_MTRO_Vario";   // CV-M1107
      TRO215 : "FB_ILS_MTRO_Vario";   // CV-M1108 / Block 1.1.4
      TRO216 : "FB_ILS_MTRO_Vario";   // CV-M1109
      fbConveyor1110 : "FB_Conveyor";   // KR-M1110
      TRO218 : "FB_ILS_MTRO_PinStore_Auto";   // KR-M1201 / Block 1.2.1
      TRO219 : "FB_ILS_MTRO_PinStore_Auto";   // KR-M1202 / Block 1.2.3
      TRO220 : "FB_ILS_MTRO_1Sep";   // KR-M1203
      fbConveyor1204 : "FB_Conveyor";   // KR-M1204
      TRO222 : "FB_ILS_MTRO_Vario";   // CV-M1205
      TRO223 : "FB_ILS_MTRO_Vario";   // CV-M1206
      TRO224 : "FB_ILS_MTRO_Vario";   // CV-M1207 / Block 1.2.3
      TRO225 : "FB_ILS_MTRO_Vario";   // CV-M1208
      TRO226 : "FB_ILS_MTRO_Vario";   // CV-M1209
      TRO227 : "FB_ILS_MTRO_1Sep";   // KR-M1301
      TRO228 : "FB_ILS_MTRO_1Sep";   // KR-M1302
      TRO229 : "FB_ILS_MTRO_PinStore_Auto";   // KR-M1303 / Block 1.3.1
      TRO230 : "FB_ILS_MTRO_PinStore_Auto";   // KR-M1304 / Block 1.3.3
      TRO231 : "FB_ILS_MTRO_Vario";   // CV-M1305
      TRO232 : "FB_ILS_MTRO_Vario";   // CV-M1306 / Block 1.3.2
      TRO233 : "FB_ILS_MTRO_Vario";   // CV-M1307
      TRO234 : "FB_ILS_MTRO_Vario";   // CV-M1308
      TRO235 : "FB_ILS_MTRO_Vario";   // CV-M1309
      TRO236 : "FB_ILS_MTRO_Vario";   // CV-M1401
      TRO237 : "FB_ILS_MTRO_Vario";   // CV-M1501
      TRO238 : "FB_ILS_MTRO_Vario";   // CV-M1601
      TRO239 : "FB_ILS_MTRO_1Sep";   // CV-M1801
      TRO240 : "FB_ILS_MTRO_Vario";   // CV-M4701
   END_VAR

BEGIN
    REGION TRO201 (PinStore_Auto) — KR-K1101 / Block 1.1.1
        #TRO201.stInSeparator1.Settings.nSeparatorNo := "cSep201.1";
        #TRO201.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO201.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO201.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO201.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO201.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO201.stInSenJam2 := "DB_Inputs".Sensors["cInBG3065"];

        #TRO201.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO201(nInMainTroNo := "cMainTro201",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea201".stJam201_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea201".stJam201_1.stData,
                arInOutJamExit2 := "DB_JamArea201".stJam201_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea201".stJam201_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro201"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO201);
    END_REGION

    REGION TRO202 (PinStore_Auto) — KR-K1102 / Block 1.1.3
        #TRO202.stInSeparator1.Settings.nSeparatorNo := "cSep202.1";
        #TRO202.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO202.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO202.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO202.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO202.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO202.stInSenJam2 := "DB_Inputs".Sensors["cInBG3125"];

        #TRO202.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO202(nInMainTroNo := "cMainTro202",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea202".stJam202_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea202".stJam202_1.stData,
                arInOutJamExit2 := "DB_JamArea202".stJam202_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea202".stJam202_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro202"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO202);
    END_REGION

    REGION TRO203 (PinStore_Auto) — KR-K1201 / Block 1.2.1
        #TRO203.stInSeparator1.Settings.nSeparatorNo := "cSep203.1";
        #TRO203.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO203.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO203.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO203.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO203.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO203.stInSenJam2 := "DB_Inputs".Sensors["cInBG3553"];

        #TRO203.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO203(nInMainTroNo := "cMainTro203",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea203".stJam203_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea203".stJam203_1.stData,
                arInOutJamExit2 := "DB_JamArea203".stJam203_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea203".stJam203_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro203"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO203);
    END_REGION

    REGION TRO204 (PinStore_Auto) — KR-K1202 / Block 1.2.3
        #TRO204.stInSeparator1.Settings.nSeparatorNo := "cSep204.1";
        #TRO204.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO204.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO204.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO204.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO204.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO204.stInSenJam2 := "DB_Inputs".Sensors["cInBGxxxx"];

        #TRO204.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO204(nInMainTroNo := "cMainTro204",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea204".stJam204_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea204".stJam204_1.stData,
                arInOutJamExit2 := "DB_JamArea204".stJam204_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea204".stJam204_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro204"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO204);
    END_REGION

    REGION TRO205 (PinStore_Auto) — KR-K1303 / Block 1.3.1
        #TRO205.stInSeparator1.Settings.nSeparatorNo := "cSep205.1";
        #TRO205.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO205.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO205.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO205.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO205.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO205.stInSenJam2 := "DB_Inputs".Sensors["cInBG4273"];

        #TRO205.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO205(nInMainTroNo := "cMainTro205",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea205".stJam205_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea205".stJam205_1.stData,
                arInOutJamExit2 := "DB_JamArea205".stJam205_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea205".stJam205_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro205"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO205);
    END_REGION

    REGION TRO206 (PinStore_Auto) — KR-K1304 / Block 1.3.3
        #TRO206.stInSeparator1.Settings.nSeparatorNo := "cSep206.1";
        #TRO206.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO206.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO206.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO206.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO206.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO206.stInSenJam2 := "DB_Inputs".Sensors["cInBG4375"];

        #TRO206.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO206(nInMainTroNo := "cMainTro206",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea206".stJam206_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea206".stJam206_1.stData,
                arInOutJamExit2 := "DB_JamArea206".stJam206_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea206".stJam206_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro206"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO206);
    END_REGION

    REGION TRO207 (1Sep) — KR-M1100
        #TRO207.stInSeparator1.Settings.nSeparatorNo := "cSep207.1";
        #TRO207.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO207.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO207.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO207.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO207.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4440"];
        #TRO207.stInSenJam2 := "DB_Inputs".Sensors["cInBG4442"];

        #TRO207.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO207(nInMainTroNo := "cMainTro207",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea207".stJam207_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea207".stJam207_1.stData,
                arInOutJamExit2 := "DB_JamArea207".stJam207_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea207".stJam207_2.stData,
                xOutStopper1 => "MB4440",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro207"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO207);
    END_REGION

    REGION TRO208 (PinStore_Auto) — KR-M1101 / Block 1.1.1
        #TRO208.stInSeparator1.Settings.nSeparatorNo := "cSep208.1";
        #TRO208.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO208.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO208.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO208.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO208.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO208.stInSenJam2 := "DB_Inputs".Sensors["cInBG3003"];

        #TRO208.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO208(nInMainTroNo := "cMainTro208",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea208".stJam208_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea208".stJam208_1.stData,
                arInOutJamExit2 := "DB_JamArea208".stJam208_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea208".stJam208_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro208"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO208);
    END_REGION

    REGION TRO209 (PinStore_Auto) — KR-M1102 / Block 1.1.3
        #TRO209.stInSeparator1.Settings.nSeparatorNo := "cSep209.1";
        #TRO209.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO209.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO209.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO209.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO209.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO209.stInSenJam2 := "DB_Inputs".Sensors["cInBG3123"];

        #TRO209.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO209(nInMainTroNo := "cMainTro209",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea209".stJam209_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea209".stJam209_1.stData,
                arInOutJamExit2 := "DB_JamArea209".stJam209_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea209".stJam209_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro209"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO209);
    END_REGION

    REGION TRO210 (1Sep) — KR-M1103
        #TRO210.stInSeparator1.Settings.nSeparatorNo := "cSep210.1";
        #TRO210.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO210.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO210.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO210.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO210.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3245"];
        #TRO210.stInSenJam2 := "DB_Inputs".Sensors["cInBG3242"];

        #TRO210.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO210(nInMainTroNo := "cMainTro210",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea210".stJam210_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea210".stJam210_1.stData,
                arInOutJamExit2 := "DB_JamArea210".stJam210_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea210".stJam210_2.stData,
                xOutStopper1 => "MB3245",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro210"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO210);
    END_REGION

    REGION TRO211 (1Sep) — CV-M1104
        #TRO211.stInSeparator1.Settings.nSeparatorNo := "cSep211.1";
        #TRO211.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO211.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO211.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO211.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO211.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3425"];
        #TRO211.stInSenJam2 := "DB_Inputs".Sensors["cInBG3362"];

        #TRO211.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO211(nInMainTroNo := "cMainTro211",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea211".stJam211_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea211".stJam211_1.stData,
                arInOutJamExit2 := "DB_JamArea211".stJam211_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea211".stJam211_2.stData,
                xOutStopper1 => "MB3425",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro211"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO211);
    END_REGION

    REGION TRO212 (Vario) — CV-M1105
        #TRO212.stInSeparator1.Settings.nSeparatorNo := "cSep212.1";
        #TRO212.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO212.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3000"];
        #TRO212.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3247"];
        #TRO212.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3243"];
        #TRO212.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3005"];

        #TRO212(nInMainTroNo := "cMainTro212",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea212".stJam212_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea212".stJam212_1.stData,
                arInOutJamFinger := "DB_JamArea212".stJam212_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3000",
                xOutVarioMotor => "MA0142",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro212"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO212);
    END_REGION

    REGION TRO213 (Vario) — CV-M1106 / Block 1.1.2
        #TRO213.stInSeparator1.Settings.nSeparatorNo := "cSep213.1";
        #TRO213.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO213.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3060"];
        #TRO213.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3307"];
        #TRO213.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO213.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3301"];

        #TRO213(nInMainTroNo := "cMainTro213",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea213".stJam213_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea213".stJam213_1.stData,
                arInOutJamFinger := "DB_JamArea213".stJam213_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3060",
                xOutVarioMotor => "MA0143",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro213"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO213);
    END_REGION

    REGION TRO214 (Vario) — CV-M1107
        #TRO214.stInSeparator1.Settings.nSeparatorNo := "cSep214.1";
        #TRO214.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO214.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3364"];
        #TRO214.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3367"];
        #TRO214.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3363"];
        #TRO214.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3361"];

        #TRO214(nInMainTroNo := "cMainTro214",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea214".stJam214_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea214".stJam214_1.stData,
                arInOutJamFinger := "DB_JamArea214".stJam214_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3364",
                xOutVarioMotor => "MA0144",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro214"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO214);
    END_REGION

    REGION TRO215 (Vario) — CV-M1108 / Block 1.1.4
        #TRO215.stInSeparator1.Settings.nSeparatorNo := "cSep215.1";
        #TRO215.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO215.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3424"];
        #TRO215.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3427"];
        #TRO215.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3423"];
        #TRO215.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3421"];

        #TRO215(nInMainTroNo := "cMainTro215",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea215".stJam215_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea215".stJam215_1.stData,
                arInOutJamFinger := "DB_JamArea215".stJam215_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3424",
                xOutVarioMotor => "MA0145",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro215"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO215);
    END_REGION

    REGION TRO216 (Vario) — CV-M1109
        #TRO216.stInSeparator1.Settings.nSeparatorNo := "cSep216.1";
        #TRO216.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO216.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3143"];
        #TRO216.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3145"];
        #TRO216.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3144"];
        #TRO216.stInVario.stSenJam := "DB_Inputs".Sensors["cInBGxxxx"];

        #TRO216(nInMainTroNo := "cMainTro216",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea216".stJam216_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea216".stJam216_1.stData,
                arInOutJamFinger := "DB_JamArea216".stJam216_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3143",
                xOutVarioMotor => "MA0146",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro216"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO216);
    END_REGION

    REGION fbConveyor1110 — KR-M1110
        #fbConveyor1110.Settings.tEnergySafeTime := "cTimeEnergySafe";
        #fbConveyor1110.Settings.xGridActive := FALSE;                         // TODO Grid
        #fbConveyor1110.Settings.sMotorProtectName := 'FC0075';

        #fbConveyor1110(xInEnabled := TRUE,                                    // TODO Enable
                xInMotorProtection := "FC0075",
                xInPowerContactor := "MA0075",
                stInOutHMI := "DB_Interface_HMI".stConveyors.fbConveyor1110);
    END_REGION

    REGION TRO218 (PinStore_Auto) — KR-M1201 / Block 1.2.1
        #TRO218.stInSeparator1.Settings.nSeparatorNo := "cSep218.1";
        #TRO218.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO218.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO218.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO218.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO218.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO218.stInSenJam2 := "DB_Inputs".Sensors["cInBG3483"];

        #TRO218.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO218(nInMainTroNo := "cMainTro218",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea218".stJam218_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea218".stJam218_1.stData,
                arInOutJamExit2 := "DB_JamArea218".stJam218_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea218".stJam218_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro218"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO218);
    END_REGION

    REGION TRO219 (PinStore_Auto) — KR-M1202 / Block 1.2.3
        #TRO219.stInSeparator1.Settings.nSeparatorNo := "cSep219.1";
        #TRO219.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO219.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO219.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO219.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO219.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO219.stInSenJam2 := "DB_Inputs".Sensors["cInBG3603"];

        #TRO219.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO219(nInMainTroNo := "cMainTro219",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea219".stJam219_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea219".stJam219_1.stData,
                arInOutJamExit2 := "DB_JamArea219".stJam219_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea219".stJam219_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro219"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO219);
    END_REGION

    REGION TRO220 (1Sep) — KR-M1203
        #TRO220.stInSeparator1.Settings.nSeparatorNo := "cSep220.1";
        #TRO220.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO220.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO220.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO220.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO220.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3725"];
        #TRO220.stInSenJam2 := "DB_Inputs".Sensors["cInBG3722"];

        #TRO220.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO220(nInMainTroNo := "cMainTro220",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea220".stJam220_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea220".stJam220_1.stData,
                arInOutJamExit2 := "DB_JamArea220".stJam220_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea220".stJam220_2.stData,
                xOutStopper1 => "MB3725",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro220"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO220);
    END_REGION

    REGION fbConveyor1204 — KR-M1204
        #fbConveyor1204.Settings.tEnergySafeTime := "cTimeEnergySafe";
        #fbConveyor1204.Settings.xGridActive := FALSE;                         // TODO Grid
        #fbConveyor1204.Settings.sMotorProtectName := 'FC0201';

        #fbConveyor1204(xInEnabled := TRUE,                                    // TODO Enable
                xInMotorProtection := "FC0201",
                xInPowerContactor := "MA0201",
                stInOutHMI := "DB_Interface_HMI".stConveyors.fbConveyor1204);
    END_REGION

    REGION TRO222 (Vario) — CV-M1205
        #TRO222.stInSeparator1.Settings.nSeparatorNo := "cSep222.1";
        #TRO222.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO222.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3480"];
        #TRO222.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3727"];
        #TRO222.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3723"];
        #TRO222.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3485"];

        #TRO222(nInMainTroNo := "cMainTro222",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea222".stJam222_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea222".stJam222_1.stData,
                arInOutJamFinger := "DB_JamArea222".stJam222_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3480",
                xOutVarioMotor => "MA0064",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro222"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO222);
    END_REGION

    REGION TRO223 (Vario) — CV-M1206
        #TRO223.stInSeparator1.Settings.nSeparatorNo := "cSep223.1";
        #TRO223.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO223.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3540"];
        #TRO223.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3787"];
        #TRO223.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3783"];
        #TRO223.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3545"];

        #TRO223(nInMainTroNo := "cMainTro223",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea223".stJam223_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea223".stJam223_1.stData,
                arInOutJamFinger := "DB_JamArea223".stJam223_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3540",
                xOutVarioMotor => "MA0065",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro223"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO223);
    END_REGION

    REGION TRO224 (Vario) — CV-M1207 / Block 1.2.3
        #TRO224.stInSeparator1.Settings.nSeparatorNo := "cSep224.1";
        #TRO224.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO224.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3604"];
        #TRO224.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3847"];
        #TRO224.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3843"];
        #TRO224.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3841"];

        #TRO224(nInMainTroNo := "cMainTro224",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea224".stJam224_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea224".stJam224_1.stData,
                arInOutJamFinger := "DB_JamArea224".stJam224_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3604",
                xOutVarioMotor => "MA0066",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro224"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO224);
    END_REGION

    REGION TRO225 (Vario) — CV-M1208
        #TRO225.stInSeparator1.Settings.nSeparatorNo := "cSep225.1";
        #TRO225.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO225.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3660"];
        #TRO225.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3907"];
        #TRO225.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3903"];
        #TRO225.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3665"];

        #TRO225(nInMainTroNo := "cMainTro225",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea225".stJam225_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea225".stJam225_1.stData,
                arInOutJamFinger := "DB_JamArea225".stJam225_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3660",
                xOutVarioMotor => "MA0067",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro225"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO225);
    END_REGION

    REGION TRO226 (Vario) — CV-M1209
        #TRO226.stInSeparator1.Settings.nSeparatorNo := "cSep226.1";
        #TRO226.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO226.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3622"];
        #TRO226.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3624"];
        #TRO226.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3623"];
        #TRO226.stInVario.stSenJam := "DB_Inputs".Sensors["cInBGxxxx"];

        #TRO226(nInMainTroNo := "cMainTro226",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea226".stJam226_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea226".stJam226_1.stData,
                arInOutJamFinger := "DB_JamArea226".stJam226_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3622",
                xOutVarioMotor => "MA0070",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro226"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO226);
    END_REGION

    REGION TRO227 (1Sep) — KR-M1301
        #TRO227.stInSeparator1.Settings.nSeparatorNo := "cSep227.1";
        #TRO227.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO227.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO227.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO227.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO227.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3965"];
        #TRO227.stInSenJam2 := "DB_Inputs".Sensors["cInBG3962"];

        #TRO227.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO227(nInMainTroNo := "cMainTro227",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea227".stJam227_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea227".stJam227_1.stData,
                arInOutJamExit2 := "DB_JamArea227".stJam227_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea227".stJam227_2.stData,
                xOutStopper1 => "MB3965",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro227"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO227);
    END_REGION

    REGION TRO228 (1Sep) — KR-M1302
        #TRO228.stInSeparator1.Settings.nSeparatorNo := "cSep228.1";
        #TRO228.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO228.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO228.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO228.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO228.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4080"];
        #TRO228.stInSenJam2 := "DB_Inputs".Sensors["cInBG4082"];

        #TRO228.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO228(nInMainTroNo := "cMainTro228",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea228".stJam228_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea228".stJam228_1.stData,
                arInOutJamExit2 := "DB_JamArea228".stJam228_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea228".stJam228_2.stData,
                xOutStopper1 => "MB4080",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro228"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO228);
    END_REGION

    REGION TRO229 (PinStore_Auto) — KR-M1303 / Block 1.3.1
        #TRO229.stInSeparator1.Settings.nSeparatorNo := "cSep229.1";
        #TRO229.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO229.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO229.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO229.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO229.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO229.stInSenJam2 := "DB_Inputs".Sensors["cInBG4203"];

        #TRO229.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO229(nInMainTroNo := "cMainTro229",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea229".stJam229_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea229".stJam229_1.stData,
                arInOutJamExit2 := "DB_JamArea229".stJam229_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea229".stJam229_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro229"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO229);
    END_REGION

    REGION TRO230 (PinStore_Auto) — KR-M1304 / Block 1.3.3
        #TRO230.stInSeparator1.Settings.nSeparatorNo := "cSep230.1";
        #TRO230.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO230.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO230.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO230.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO230.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBGxxxx"];
        #TRO230.stInSenJam2 := "DB_Inputs".Sensors["cInBG4323"];

        #TRO230.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO230(nInMainTroNo := "cMainTro230",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea230".stJam230_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea230".stJam230_1.stData,
                arInOutJamExit2 := "DB_JamArea230".stJam230_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea230".stJam230_2.stData,
                xOutStopper1 => "MBxxxx",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro230"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO230);
    END_REGION

    REGION TRO231 (Vario) — CV-M1305
        #TRO231.stInSeparator1.Settings.nSeparatorNo := "cSep231.1";
        #TRO231.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO231.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG3960"];
        #TRO231.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG3967"];
        #TRO231.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG3963"];
        #TRO231.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG3961"];

        #TRO231(nInMainTroNo := "cMainTro231",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea231".stJam231_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea231".stJam231_1.stData,
                arInOutJamFinger := "DB_JamArea231".stJam231_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB3960",
                xOutVarioMotor => "MA0262",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro231"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO231);
    END_REGION

    REGION TRO232 (Vario) — CV-M1306 / Block 1.3.2
        #TRO232.stInSeparator1.Settings.nSeparatorNo := "cSep232.1";
        #TRO232.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO232.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4024"];
        #TRO232.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4027"];
        #TRO232.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4023"];
        #TRO232.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG4021"];

        #TRO232(nInMainTroNo := "cMainTro232",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea232".stJam232_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea232".stJam232_1.stData,
                arInOutJamFinger := "DB_JamArea232".stJam232_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4024",
                xOutVarioMotor => "MA0263",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro232"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO232);
    END_REGION

    REGION TRO233 (Vario) — CV-M1307
        #TRO233.stInSeparator1.Settings.nSeparatorNo := "cSep233.1";
        #TRO233.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO233.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4084"];
        #TRO233.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4087"];
        #TRO233.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4083"];
        #TRO233.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG4081"];

        #TRO233(nInMainTroNo := "cMainTro233",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea233".stJam233_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea233".stJam233_1.stData,
                arInOutJamFinger := "DB_JamArea233".stJam233_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4084",
                xOutVarioMotor => "MA0264",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro233"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO233);
    END_REGION

    REGION TRO234 (Vario) — CV-M1308
        #TRO234.stInSeparator1.Settings.nSeparatorNo := "cSep234.1";
        #TRO234.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO234.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4144"];
        #TRO234.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4147"];
        #TRO234.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4143"];
        #TRO234.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG4141"];

        #TRO234(nInMainTroNo := "cMainTro234",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea234".stJam234_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea234".stJam234_1.stData,
                arInOutJamFinger := "DB_JamArea234".stJam234_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4144",
                xOutVarioMotor => "MA0265",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro234"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO234);
    END_REGION

    REGION TRO235 (Vario) — CV-M1309
        #TRO235.stInSeparator1.Settings.nSeparatorNo := "cSep235.1";
        #TRO235.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO235.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4334"];
        #TRO235.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4344"];
        #TRO235.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4343"];
        #TRO235.stInVario.stSenJam := "DB_Inputs".Sensors["cInBGxxxx"];

        #TRO235(nInMainTroNo := "cMainTro235",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea235".stJam235_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea235".stJam235_1.stData,
                arInOutJamFinger := "DB_JamArea235".stJam235_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4342",
                xOutVarioMotor => "MA0266",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro235"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO235);
    END_REGION

    REGION TRO236 (Vario) — CV-M1401
        #TRO236.stInSeparator1.Settings.nSeparatorNo := "cSep236.1";
        #TRO236.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO236.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4445"];
        #TRO236.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4461"];
        #TRO236.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4462"];
        #TRO236.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG4447"];

        #TRO236(nInMainTroNo := "cMainTro236",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea236".stJam236_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea236".stJam236_1.stData,
                arInOutJamFinger := "DB_JamArea236".stJam236_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4460",
                xOutVarioMotor => "MA0071",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro236"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO236);
    END_REGION

    REGION TRO237 (Vario) — CV-M1501
        #TRO237.stInSeparator1.Settings.nSeparatorNo := "cSep237.1";
        #TRO237.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO237.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4522"];
        #TRO237.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4542"];
        #TRO237.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4541"];
        #TRO237.stInVario.stSenJam := "DB_Inputs".Sensors["cInBGxxxx"];

        #TRO237(nInMainTroNo := "cMainTro237",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea237".stJam237_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea237".stJam237_1.stData,
                arInOutJamFinger := "DB_JamArea237".stJam237_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4512",
                xOutVarioMotor => "MA0072",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro237"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO237);
    END_REGION

    REGION TRO238 (Vario) — CV-M1601
        #TRO238.stInSeparator1.Settings.nSeparatorNo := "cSep238.1";
        #TRO238.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO238.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4526"];
        #TRO238.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4545"];
        #TRO238.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4544"];
        #TRO238.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG4525"];

        #TRO238(nInMainTroNo := "cMainTro238",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea238".stJam238_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea238".stJam238_1.stData,
                arInOutJamFinger := "DB_JamArea238".stJam238_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4526",
                xOutVarioMotor => "MA0073",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro238"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO238);
    END_REGION

    REGION TRO239 (1Sep) — CV-M1801
        #TRO239.stInSeparator1.Settings.nSeparatorNo := "cSep239.1";
        #TRO239.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO239.stInSeparator1.Settings.tTrailingTime := T#500ms;      // TODO Timing
        #TRO239.stInSeparator1.Settings.tHandlingTime := T#200ms;      // TODO Timing
        #TRO239.stInSeparator1.Settings.tJam := "TimeForSepJam";
        #TRO239.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4535"];
        #TRO239.stInSenJam2 := "DB_Inputs".Sensors["cInBG4534"];

        #TRO239.stInPriorityManager.xReleaseOk := TRUE;                // TODO Priority

        #TRO239(nInMainTroNo := "cMainTro239",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInCarouselRun := TRUE,                                // TODO Conveyor
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea239".stJam239_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea239".stJam239_1.stData,
                arInOutJamExit2 := "DB_JamArea239".stJam239_2.arCarrier,   // TODO Topologie
                stInOutJamExit2 := "DB_JamArea239".stJam239_2.stData,
                xOutStopper1 => "MB4535",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro239"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO239);
    END_REGION

    REGION TRO240 (Vario) — CV-M4701
        #TRO240.stInSeparator1.Settings.nSeparatorNo := "cSep240.1";
        #TRO240.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
        #TRO240.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cInBG4530"];
        #TRO240.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cInBG4533"];
        #TRO240.stInVario.stSenFinger := "DB_Inputs".Sensors["cInBG4531"];
        #TRO240.stInVario.stSenJam := "DB_Inputs".Sensors["cInBG4532"];

        #TRO240(nInMainTroNo := "cMainTro240",
                xInSftyOk := TRUE,                                     // TODO Safety
                xInAllRdyToStart := TRUE,
                xInRelease := TRUE,                                    // TODO Release
                stInOutMachineState := #stInOutControlUnit,            // TODO ControlUnit
                arInOutJamEntr1 := "DB_JamArea240".stJam240_1.arCarrier,   // TODO Topologie
                stInOutJamEntr1 := "DB_JamArea240".stJam240_1.stData,
                arInOutJamFinger := "DB_JamArea240".stJam240_2.arCarrier,  // TODO Topologie
                xOutStopper => "MB4530",
                xOutVarioMotor => "MA0074",
                nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro240"],
                stInOutHMI := "DB_Interface_HMI".stTRO.TRO240);
    END_REGION

END_FUNCTION_BLOCK
