{
    S7_Author := "ABH";
    S7_BlockNumber := "15176";
    S7_BlockTitle := "MLC_3Ks";
    S7_Family := "ZeusControl";
    S7_Optimized := "TRUE";
    S7_PreferredLanguage := "LAD";
    S7_Version := "1.0"
}
FUNCTION_BLOCK "FB15176_ZC_COCINA_AD_AGUA"
    VAR_INPUT
        { S7_MLC := "MLC_wb" }
        NombreSecuencia : String := 'ADICION AGUA';
        { S7_MLC := "MLC_3F6" }
        Pulso1Seg : Bool;
        { S7_MLC := "MLC_3iC" }
        Ack : Bool;
        { S7_MLC := "MLC_3vK" }
        OrdenMarcha : Bool;
        { S7_MLC := "MLC_Uw" }
        EstadoEnMarcha : Bool;
        { S7_MLC := "MLC_wc" }
        EnEtapa : Bool;
        { S7_MLC := "MLC_4ku" }
        OrdenPausa : Bool;
        { S7_MLC := "MLC_5A4" }
        EstadoBomba : Bool;
        { S7_MLC := "MLC_b4" }
        TipoValvulaDrenaje : Bool;
        OrdenCalcular : Bool;
        Parametros : _.UDT_ZC_RECETA_BATCH_ETAPA := (
            { S7_MLC := "MLC_Rq" }
            P_Real_1 := (),
            { S7_MLC := "MLC_4ME" }
            P_Real_2 := (),
            { S7_MLC := "MLC_jD" }
            P_Real_3 := (),
            { S7_MLC := "MLC_kz" }
            P_Real_4 := (),
            { S7_MLC := "MLC_42a" }
            P_Real_5 := (),
            { S7_MLC := "MLC_3eN" }
            P_Real_6 := (),
            { S7_MLC := "MLC_4Ez" }
            P_Real_7 := (),
            { S7_MLC := "MLC_ui" }
            P_Real_8 := (),
            { S7_MLC := "MLC_yb" }
            P_Real_9 := (),
            { S7_MLC := "MLC_mU" }
            P_Real_10 := (),
            { S7_MLC := "MLC_ZL" }
            P_Real_11 := (),
            { S7_MLC := "MLC_4ET" }
            P_Real_12 := (),
            { S7_MLC := "MLC_WG" }
            P_Real_13 := (),
            { S7_MLC := "MLC_pw" }
            P_Real_14 := (),
            { S7_MLC := "MLC_4AK" }
            P_Real_15 := (),
            { S7_MLC := "MLC_4BQ" }
            P_Real_16 := (),
            { S7_MLC := "MLC_SC" }
            P_Real_17 := (),
            { S7_MLC := "MLC_3A6" }
            P_Int_1 := (),
            { S7_MLC := "MLC_43B" }
            P_Int_2 := (),
            { S7_MLC := "MLC_nV" }
            P_Int_3 := (),
            { S7_MLC := "MLC_48n" }
            P_Int_4 := (),
            { S7_MLC := "MLC_3xi" }
            P_Int_5 := (),
            { S7_MLC := "MLC_3Jd" }
            P_Int_6 := (),
            { S7_MLC := "MLC_3LN" }
            P_Int_7 := (),
            { S7_MLC := "MLC_4Pv" }
            P_Int_8 := (),
            { S7_MLC := "MLC_4t8" }
            P_Int_9 := (),
            { S7_MLC := "MLC_4bs" }
            P_Int_10 := (),
            { S7_MLC := "MLC_3a7" }
            P_Int_11 := (),
            { S7_MLC := "MLC_34h" }
            P_Int_12 := (),
            { S7_MLC := "MLC_yN" }
            P_Int_13 := (),
            { S7_MLC := "MLC_39v" }
            P_Int_14 := (),
            { S7_MLC := "MLC_eE" }
            P_Int_15 := (),
            { S7_MLC := "MLC_R3" }
            P_String_1 := (),
            { S7_MLC := "MLC_3TR" }
            P_String_2 := (),
            { S7_MLC := "MLC_38g" }
            P_String_3 := (),
            { S7_MLC := "MLC_3Xd" }
            P_String_4 := (),
            { S7_MLC := "MLC_h8" }
            P_String_5 := (),
            { S7_MLC := "MLC_NY" }
            P_String_6 := (),
            { S7_MLC := "MLC_574" }
            P_String_7 := (),
            { S7_MLC := "MLC_3fU" }
            P_String_8 := (),
            { S7_MLC := "MLC_4CE" }
            P_String_9 := (),
            { S7_MLC := "MLC_39j" }
            P_String_10 := ()
        );
        { S7_MLC := "MLC_gE" }
        LitrosDrenajeInicial : Real := 150.0;
        { S7_MLC := "MLC_3ZP" }
        LitrosEmpujeFinal : Real := 150.0;
        { S7_MLC := "MLC_4mK" }
        TotalizadorDrenaje : Real := 0.0;
        { S7_MLC := "MLC_4XR" }
        TotalizadorEmpuje : Real := 0.0;
        { S7_MLC := "MLC_3ym" }
        TiempoAclarado : Int := 60;
        { S7_MLC := "MLC_sd" }
        TiempoMaximoDrenaje : Int := 80;
        { S7_MLC := "MLC_45U" }
        TiempoMaximoEmpuje : Int := 80;
        { S7_MLC := "MLC_4Bh" }
        KilosTanque : Real := 0.0;
    END_VAR
    VAR_OUTPUT
        { S7_MLC := "MLC_3Z9" }
        MarchaBombaBlender : Bool;
        { S7_MLC := "MLC_4RC" }
        VelocidadBombaBlender : Real;
        { S7_MLC := "MLC_4Eh" }
        MarchaBombaIntermedia : Bool;
        { S7_MLC := "MLC_5A5" }
        AperturaValvulaSalidaTanque : Bool;
        { S7_MLC := "MLC_346" }
        AperturaValvulaDrenaje : Bool;
        { S7_MLC := "MLC_3Ci" }
        AperturaValvulaEntradaTanque : Bool;
        { S7_MLC := "MLC_3pD" }
        AperturaValvulaEmpuje : Bool;
        { S7_MLC := "MLC_Xi" }
        OrdenTotalizadorDrenaje : Bool;
        { S7_MLC := "MLC_4FX" }
        OrdenTotalizadorEmpuje : Bool;
        { S7_MLC := "MLC_3hN" }
        ResetTotalizadorDrenaje : Bool;
        { S7_MLC := "MLC_4Sx" }
        ResetTotalizadorEmpuje : Bool;
        { S7_MLC := "MLC_3Rz" }
        VisibilidadLitrosDrenaje : Bool;
        { S7_MLC := "MLC_4jR" }
        VisibilidadLitrosEmpuje : Bool;
        { S7_MLC := "MLC_3VJ" }
        VisibilidadLitrosAdicionAgua : Bool;
        { S7_MLC := "MLC_49C" }
        LitrosAdicionAgua : Real;
        { S7_MLC := "MLC_t9" }
        LitrosDosificados : Real;
        { S7_MLC := "MLC_57C" }
        SecuenciaIniciada : Bool;
        { S7_MLC := "MLC_52B" }
        FinSecuencia : Bool;
    END_VAR
    VAR RETAIN
        { S7_MLC := "MLC_3tB" }
        s_EtapaActual : Int;
        { S7_MLC := "MLC_4Ps" }
        s_TextoEtapa : String[100];
        s_Pausa_M : Bool;
        s_Pausa_V : Bool;
        s_Continuar : Bool;
        {
            S7_MLC := "MLC_3jB";
            S7_Setpoint := "True"
        }
        s_LitrosCalculados : Real;
        { S7_MLC := "MLC_4yw" }
        s_LitrosInicialTanque : Real;
        { S7_MLC := "MLC_3cu" }
        s_LitrosDosificados : Real;
    END_VAR
    VAR
        {
            S7_Access := "ReadOnly := External";
            S7_Visibility := "Hidden := External"
        }
        s_Pulsos : Array[0..15] of Bool := [
            { S7_MLC := "MLC_47p" }
        (),
            { S7_MLC := "MLC_4nA" }
        (),
            { S7_MLC := "MLC_33D" }
        (),
            { S7_MLC := "MLC_4WB" }
        (),
            { S7_MLC := "MLC_3ma" }
        (),
            { S7_MLC := "MLC_4Nh" }
        (),
            { S7_MLC := "MLC_3pY" }
        (),
            { S7_MLC := "MLC_4fk" }
        (),
            { S7_MLC := "MLC_4yW" }
        (),
            { S7_MLC := "MLC_3GZ" }
        (),
            { S7_MLC := "MLC_4u3" }
        (),
            { S7_MLC := "MLC_m5" }
        (),
            { S7_MLC := "MLC_5BL" }
        (),
            { S7_MLC := "MLC_48z" }
        (),
            { S7_MLC := "MLC_Pk" }
        (),
            { S7_MLC := "MLC_3iG" }
        ()
        ];
    END_VAR
    VAR RETAIN
        { S7_MLC := "MLC_4XH" }
        s_TiempoEtapa : STRUCT
            { S7_MLC := "MLC_y7" }
            Activar : Bool;
            { S7_MLC := "MLC_4iy" }
            Reset : Bool;
            { S7_MLC := "MLC_3mC" }
            Actual : Int;
            { S7_MLC := "MLC_NW" }
            SP : Int;
            { S7_MLC := "MLC_XG" }
            Restante : Int;
        END_STRUCT;
    END_VAR
    VAR
        {
            S7_Access := "ReadOnly := External";
            S7_Setpoint := "False";
            S7_Visibility := "Hidden := External"
        }
        s_TON : Array[1..#NUM_MAX_TON] of _.UDT_ZC_DISP_TON := [
            { S7_MLC := "MLC_4GL" }
        (),
            { S7_MLC := "MLC_4qx" }
        ()
        ];
    END_VAR
    VAR RETAIN
        {
            S7_Access := "ReadOnly := External";
            S7_Setpoint := "False";
            S7_Visibility := "Hidden := External"
        }
        s_TOF : Array[1..#NUM_MAX_TOF] of _.UDT_ZC_DISP_TOF := [
            { S7_MLC := "MLC_gf" }
        (),
            { S7_MLC := "MLC_4Pq" }
        (),
            { S7_MLC := "MLC_3h4" }
        (),
            { S7_MLC := "MLC_49U" }
        (),
            { S7_MLC := "MLC_3bM" }
        ()
        ];
        {
            S7_Access := "ReadOnly := External";
            S7_Setpoint := "False";
            S7_Visibility := "Hidden := External"
        }
        s_TONR : Array[1..#NUM_MAX_TONR] of _.UDT_ZC_DISP_TONR;
    END_VAR
    VAR_TEMP
        for_i : Int;
        t_CalcularDosificacion : Bool;
    END_VAR
    VAR CONSTANT
        SiempreON : Bool := TRUE;
        SiempreOFF : Bool := FALSE;
        NUM_MAX_TON : Int := 2;
        NUM_MAX_TOF : Int := 5;
        NUM_MAX_TONR : Int := 1;
    END_VAR

    {
        S7_Language := "SCL";
        S7_NetworkTitle := "MLC_jd"
    }
    NETWORK
        (*
        ============================================================================
        ZEUS CONTROL, S.A.
        (c)Copyright (2024) All Rights Reserved
        -----------------------------------------------------------------------------
        
        Software:       TIA Portal 18
        Restricciones:  PLC serie 1200/1500
        
        
        Nombre:         FB15176_ZC_COCINA_AD_AGUA
        Descripcion:    Bloque de gestión de fase adicion de agua
        
        Dependencias:   
            FC:         -
            FB:         -
            DB:         -
            UDT:        -
                     
        
        Change log:
        
            Version     Fecha       Tecnico a cargo     Descripción
            
            01.00.00    09.07.2024  (ABH)               Primera versión
        
         ============================================================================
         *)
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4z8"
    }
    NETWORK
        RUNG wire#powerrail
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_3Va"
    }
    NETWORK
        RUNG wire#powerrail
            Contact( #SiempreON )
            wire#w1
            Contact( #OrdenPausa )
            wire#w2
            S_Coil( #s_Pausa_M )
        END_RUNG
        RUNG wire#w1
            I_Contact( #EstadoEnMarcha )
        END_RUNG wire#w2
        RUNG wire#w1
            Contact( #s_Pausa_M )
            wire#w3
            Move(
                in := 3,
                out1 => #s_TON[1].SP
            )
            Coil( #s_TON[1].IN )
        END_RUNG
        RUNG wire#w3
            Contact( #s_TON[1].Q )
            I_Contact( #s_Continuar )
            S_Coil( #s_Pausa_V )
        END_RUNG
        RUNG wire#w1
            I_Contact( #OrdenPausa )
            Contact( #EstadoEnMarcha )
            wire#w4
            R_Coil( #s_Pausa_V )
        END_RUNG
        RUNG wire#w4
            S_Coil( #s_Continuar )
        END_RUNG
        RUNG wire#w1
            Contact( #s_Continuar )
            wire#w5
            Move(
                in := 3,
                out1 => #s_TON[2].SP
            )
            Coil( #s_TON[2].IN )
        END_RUNG
        RUNG wire#w5
            Contact( #s_TON[2].Q )
            wire#w6
            R_Coil( #s_Pausa_M )
        END_RUNG
        RUNG wire#w6
            R_Coil( #s_Continuar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 0
            )
            wire#w7
            R_Coil( #s_Pausa_M )
        END_RUNG
        RUNG wire#w7
            R_Coil( #s_Pausa_V )
        END_RUNG
        RUNG wire#w7
            R_Coil( #s_Continuar )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_hM"
    }
    NETWORK
        RUNG wire#powerrail
            I_Contact( #EnEtapa )
            Move(
                in := 0,
                out1 => #s_EtapaActual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "SCL";
        S7_NetworkTitle := "MLC_4d8"
    }
    NETWORK
        //  ================================================================
        //  TEXTO ETAPA
        CASE #s_EtapaActual OF
            0:
                #s_TextoEtapa := CONCAT_STRING(IN1:= #NombreSecuencia,IN2:= ' - REPOSO');
                
                //  =========================================================================================
                //  Adicion de agua
            10:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - APERTURA DE CAMINO');
            20:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - ENCENDIDO DE BOMBA');
            30:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - DRENAJE PREVIO');
            40:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - ADICION DE AGUA ');
            50:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - APAGADO DE BOMBA');
            60:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - CIERRE CAMINO');
                
                //  =========================================================================================
                //  Homogenizacion en linea
            100:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - APERTURA DE CAMINO');
            110:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - ENCENDIDO DE BOMBA');
            120:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - DRENAJE PREVIO');
            150:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - HOMOGENIZACION EN LINEA');
            160:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - EMPUJE');
            170:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - ACLARADO');
            180:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - APAGADO DE BOMBA');
            190:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - CIERRE CAMINO');
                
                //  =========================================================================================
                //  Homogenizacion en tanque
        
                
            999:
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - FIN DE SECUENCIA');
                
            ELSE
                #s_TextoEtapa := CONCAT_STRING(IN1 := #NombreSecuencia, IN2 := ' - FUERA DE ETAPA');
        END_CASE;
        
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4dB"
    }
    NETWORK
        RUNG wire#powerrail
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4pE"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 0
            )
            Contact( #EnEtapa )
            Contact( #OrdenMarcha )
            wire#w1
            { S7_Templates := "SrcType := Real" }
            NE_Contact(
                in1 := #Parametros.P_Real_5,
                in2 := 0.0
            )
            Move(
                in := 10,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Real" }
            EQ_Contact(
                in1 := #Parametros.P_Real_5,
                in2 := 0.0
            )
            Move(
                in := 999,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_3xp"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 10
            )
            wire#w1
            P_Trig( #s_Pulsos[0] )
            Move(
                in := 3,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 20,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4pf"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 20
            )
            wire#w1
            P_Trig( #s_Pulsos[1] )
            Move(
                in := 1,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            Contact( #EstadoBomba )
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 30,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4XB"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 30
            )
            wire#w1
            P_Trig( #s_Pulsos[2] )
            Move(
                in := #TiempoMaximoDrenaje,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Real" }
            GE_Contact(
                in1 := #TotalizadorDrenaje,
                in2 := #LitrosDrenajeInicial
            )
            wire#w2
            Move(
                in := 40,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
        END_RUNG wire#w2
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_58T"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
            wire#w1
            P_Trig( #s_Pulsos[3] )
            Move(
                in := 1,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            R_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Real" }
            GE_Contact(
                in1 := #s_LitrosDosificados,
                in2 := #s_LitrosCalculados
            )
            wire#w2
            Move(
                in := 50,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
        END_RUNG wire#w2
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4ze"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 50
            )
            wire#w1
            P_Trig( #s_Pulsos[4] )
            Move(
                in := 1,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            I_Contact( #EstadoBomba )
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 60,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkComment := "MLC_3u7";
        S7_NetworkTitle := "MLC_4bx"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 60
            )
            wire#w1
            P_Trig( #s_Pulsos[5] )
            Move(
                in := 3,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            wire#w2
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #Parametros.P_Int_1,
                in2 := 0
            )
            wire#w3
            Move(
                in := 999,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
        RUNG wire#w2
            Contact( #SiempreON )
        END_RUNG wire#w3
        RUNG wire#w2
            Contact( #SiempreOFF )
            { S7_Templates := "SrcType := Int" }
            NE_Contact(
                in1 := #Parametros.P_Int_1,
                in2 := 0
            )
            Move(
                in := 100,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_R6"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 100
            )
            wire#w1
            P_Trig( #s_Pulsos[6] )
            Move(
                in := 3,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 110,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4Z6"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 110
            )
            wire#w1
            P_Trig( #s_Pulsos[7] )
            Move(
                in := 1,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            Contact( #EstadoBomba )
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 120,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_3MV"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 120
            )
            wire#w1
            P_Trig( #s_Pulsos[8] )
            Move(
                in := #TiempoMaximoDrenaje,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Real" }
            GE_Contact(
                in1 := #TotalizadorDrenaje,
                in2 := #LitrosDrenajeInicial
            )
            wire#w2
            Move(
                in := 150,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
        END_RUNG wire#w2
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_3xz"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 150
            )
            wire#w1
            P_Trig( #s_Pulsos[9] )
            Move(
                in := #Parametros.P_Int_1,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 160,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4vd"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 160
            )
            wire#w1
            P_Trig( #s_Pulsos[10] )
            Move(
                in := #TiempoMaximoEmpuje,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Real" }
            GE_Contact(
                in1 := #TotalizadorEmpuje,
                in2 := #LitrosEmpujeFinal
            )
            wire#w2
            Move(
                in := 170,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
        END_RUNG wire#w2
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_37Q"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 170
            )
            wire#w1
            P_Trig( #s_Pulsos[11] )
            Move(
                in := #TiempoAclarado,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 180,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_48g"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 180
            )
            wire#w1
            P_Trig( #s_Pulsos[12] )
            Move(
                in := 1,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            I_Contact( #EstadoBomba )
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 190,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4Ka"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 190
            )
            wire#w1
            P_Trig( #s_Pulsos[13] )
            Move(
                in := 3,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 999,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_599"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 999
            )
            wire#w1
            P_Trig( #s_Pulsos[15] )
            Move(
                in := 3,
                out1 => #s_TiempoEtapa.SP
            )
        END_RUNG
        RUNG wire#w1
            I_Contact( #EnEtapa )
            S_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            Move(
                in := 0,
                out1 => #s_EtapaActual
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_39q"
    }
    NETWORK
        RUNG wire#powerrail
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4KU"
    }
    NETWORK
        RUNG wire#powerrail
            Contact( #s_TiempoEtapa.Activar )
            wire#w1
            Contact( #EstadoEnMarcha )
            I_Contact( #s_Pausa_M )
            Contact( #Pulso1Seg )
            { S7_Templates := "SrcType := Int" }
            LT_Contact(
                in1 := #s_TiempoEtapa.Actual,
                in2 := #s_TiempoEtapa.SP
            )
            { S7_Templates := "DestType := Int" }
            Inc( #s_TiempoEtapa.Actual )
        END_RUNG
        RUNG wire#w1
            Contact( #s_TiempoEtapa.Reset )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Actual
            )
        END_RUNG
        RUNG wire#w1
            R_Coil( #s_TiempoEtapa.Activar )
        END_RUNG
        RUNG wire#powerrail
            Sub(
                in1 := #s_TiempoEtapa.SP,
                in2 := #s_TiempoEtapa.Actual,
                out => #s_TiempoEtapa.Restante
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_TiempoEtapa.Restante,
                in2 := 0
            )
            Move(
                in := 0,
                out1 => #s_TiempoEtapa.Restante
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "SCL";
        S7_NetworkTitle := "MLC_4mk"
    }
    NETWORK
        
        //  ============================================================================
        //  TON
        FOR #for_i := 1 TO #NUM_MAX_TON DO
            "FC2928_ZC_TON_INDV"(Pulso1seg:=#Pulso1Seg,
                                 TON:=#s_TON[#for_i]);
        END_FOR;
        
        //  ============================================================================
        //  TOF
        FOR #for_i := 1 TO #NUM_MAX_TOF DO
            "FC2929_ZC_TOF_INDV"(Pulso1seg := #Pulso1Seg,
                                 TOF := #s_TOF[#for_i]);
        END_FOR;
        
        //  ============================================================================
        //  TONR
        FOR #for_i := 1 TO #NUM_MAX_TONR DO
            "FC2930_ZC_TONR_INDV"(Pulso1seg := #Pulso1Seg,
                                 TONR := #s_TONR[#for_i]);
        END_FOR;
        
        
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4bX"
    }
    NETWORK
        RUNG wire#powerrail
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_3a5"
    }
    NETWORK
        RUNG wire#powerrail
            Contact( #OrdenCalcular )
            Coil( #t_CalcularDosificacion )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "SCL";
        S7_NetworkTitle := "MLC_3Vj"
    }
    NETWORK
        
        IF #t_CalcularDosificacion THEN
            
            //  Calculamos los kilos a añadir de agua
            #s_LitrosCalculados := (#KilosTanque * #Parametros.P_Real_5) / 1000.0;
            
            //  Guardamos valor actual tanque y reset kilos dosificados
            #s_LitrosInicialTanque := #KilosTanque;
            #s_LitrosDosificados := 0.0;
            
        END_IF;
        
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_43F"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
            Sub(
                in1 := #KilosTanque,
                in2 := #s_LitrosInicialTanque,
                out => #s_LitrosDosificados
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4jy"
    }
    NETWORK
        RUNG wire#powerrail
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_43i"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 10
            )
            wire#w1
            Coil( #ResetTotalizadorDrenaje )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 100
            )
        END_RUNG wire#w1
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 30
            )
            wire#w2
            Coil( #OrdenTotalizadorDrenaje )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 120
            )
        END_RUNG wire#w2
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_ae"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 10
            )
            wire#w1
            Coil( #ResetTotalizadorEmpuje )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 100
            )
        END_RUNG wire#w1
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 160
            )
            Coil( #OrdenTotalizadorEmpuje )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_579"
    }
    NETWORK
        RUNG wire#powerrail
            Contact( #OrdenTotalizadorDrenaje )
            Coil( #VisibilidadLitrosDrenaje )
        END_RUNG
        RUNG wire#powerrail
            Contact( #OrdenTotalizadorEmpuje )
            Coil( #VisibilidadLitrosEmpuje )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 60
            )
            Coil( #VisibilidadLitrosAdicionAgua )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_cU"
    }
    NETWORK
        RUNG wire#powerrail
            Move(
                in := #s_LitrosCalculados,
                out1 => #LitrosAdicionAgua
            )
        END_RUNG
        RUNG wire#powerrail
            Move(
                in := #s_LitrosDosificados,
                out1 => #LitrosDosificados
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_5AP"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 20
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
            wire#w1
            I_Contact( #s_Pausa_M )
            wire#w2
            Coil( #MarchaBombaBlender )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 110
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 170
            )
        END_RUNG wire#w1
        RUNG wire#w2
            Move(
                in := #Parametros.P_Real_1,
                out1 => #VelocidadBombaBlender
            )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_jC"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 20
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
            wire#w1
            I_Contact( #s_Pausa_M )
            Coil( #MarchaBombaIntermedia )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 110
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 170
            )
        END_RUNG wire#w1
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_36h"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 100
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 150
            )
            I_Contact( #s_Pausa_V )
            Move(
                in := 2,
                out1 => #s_TOF[1].SP
            )
            Coil( #s_TOF[1].IN )
        END_RUNG
        RUNG wire#powerrail
            Contact( #s_TOF[1].Q )
            Coil( #AperturaValvulaSalidaTanque )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_473"
    }
    NETWORK
        RUNG wire#powerrail
            I_Contact( #TipoValvulaDrenaje )
            wire#w1
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 100
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 120
            )
            wire#w2
            I_Contact( #s_Pausa_V )
            Move(
                in := 2,
                out1 => #s_TOF[3].SP
            )
            Coil( #s_TOF[3].IN )
        END_RUNG
        RUNG wire#w1
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 170
            )
        END_RUNG wire#w2
        RUNG wire#powerrail
            Contact( #TipoValvulaDrenaje )
            wire#w3
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
        END_RUNG wire#w2
        RUNG wire#w3
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 130
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 160
            )
        END_RUNG wire#w2
        RUNG wire#powerrail
            Contact( #s_TOF[3].Q )
            Coil( #AperturaValvulaDrenaje )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_36S"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
            wire#w1
            I_Contact( #s_Pausa_M )
            Move(
                in := 2,
                out1 => #s_TOF[4].SP
            )
            Coil( #s_TOF[4].IN )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 150
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 160
            )
        END_RUNG wire#w1
        RUNG wire#powerrail
            Contact( #s_TOF[4].Q )
            Coil( #AperturaValvulaEntradaTanque )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_3bJ"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 30
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 40
            )
            wire#w1
            I_Contact( #s_Pausa_M )
            Move(
                in := 2,
                out1 => #s_TOF[5].SP
            )
            Coil( #s_TOF[5].IN )
        END_RUNG
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GE_Contact(
                in1 := #s_EtapaActual,
                in2 := 160
            )
            { S7_Templates := "SrcType := Int" }
            LE_Contact(
                in1 := #s_EtapaActual,
                in2 := 170
            )
        END_RUNG wire#w1
        RUNG wire#powerrail
            Contact( #s_TOF[5].Q )
            Coil( #AperturaValvulaEmpuje )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_bE"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            GT_Contact(
                in1 := #s_EtapaActual,
                in2 := 0
            )
            Coil( #SecuenciaIniciada )
        END_RUNG
    END_NETWORK
    {
        S7_Language := "LAD";
        S7_NetworkTitle := "MLC_4Lr"
    }
    NETWORK
        RUNG wire#powerrail
            { S7_Templates := "SrcType := Int" }
            EQ_Contact(
                in1 := #s_EtapaActual,
                in2 := 999
            )
            Coil( #FinSecuencia )
        END_RUNG
    END_NETWORK
END_FUNCTION_BLOCK
