{
    S7_Author := "ABH";
    S7_BlockNumber := "21";
    S7_BlockTitle := "MLC_Zt";
    S7_Family := "ZeusControl";
    S7_Optimized := "TRUE";
    S7_StandardRetain := "FALSE";
    S7_Version := "1.0"
}
DATA_BLOCK DB20_GESTION_SCADA
    VAR
        BitDevida : Array[0.._.N_MAX_SCADA] of Bool;
        ConexionOk : Array[0.._.N_MAX_SCADA] of Bool;
    END_VAR

    VAR RETAIN
        { S7_MLC := "MLC_Rs" }
        Maestro : Int;
    END_VAR

    VAR
        PermisoInformes : Array[0.._.N_MAX_SCADA] of Bool;
        Sincronizacion : STRUCT
            AmbosConectados : Bool;
            Informes : Array[0.._.N_MAX_SCADA] of Int;
            CIP : Array[0.._.N_MAX_SCADA] of Int;
            Fermentadores : Array[0.._.N_MAX_SCADA] of Int;
            Cocina1 : Array[0.._.N_MAX_SCADA] of Int;
        END_STRUCT;
        BitVida : Array[0.._.N_MAX_SCADA] of STRUCT
            { S7_Setpoint := "False" }
            TON_ON : Array[0..1] of _.UDT_ZC_DISP_TON;
            TON_OFF : Array[0..1] of _.UDT_ZC_DISP_TON;
        END_STRUCT;
    END_VAR

    VAR RETAIN
        TON_CIP_ESTADO : Array[0..1] of _.UDT_ZC_DISP_TON;
        TON_INFORME_ESTADO : Array[0..1] of _.UDT_ZC_DISP_TON;
        TON_FERM_ESTADO : Array[0..1] of _.UDT_ZC_DISP_TON;
        TON_COCINA1_ESTADO : Array[0..1] of _.UDT_ZC_DISP_TON;
    END_VAR

    VAR
        Aux : STRUCT
            OldAmbosConectados : Bool;
        END_STRUCT;
    END_VAR

        BitDevida[0] := TRUE;
        ConexionOk[0] := TRUE;
    Maestro := 10;
        PermisoInformes[0] := TRUE;
    Sincronizacion.AmbosConectados := FALSE;
        Sincronizacion.Informes[0] := 0;
        Sincronizacion.CIP[0] := 0;
        Sincronizacion.Fermentadores[0] := 0;
        Sincronizacion.Cocina1[0] := 0;
    Aux.OldAmbosConectados := FALSE;

END_DATA_BLOCK
