From 0cfcfd455505af6e3a61321ddcdadd8c5b126638 Mon Sep 17 00:00:00 2001 From: aketza Date: Fri, 24 Jul 2026 09:01:20 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20Actualizacion=20de=20comentarios.=20Ac?= =?UTF-8?q?tualizacion=20de=20interfaces.=20Se=20a=C3=B1aden=20elementos.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FC11000_GESTOR_COM.s7dcl | 62 +++++++++ .../FC11000_GESTOR_COM.s7res | 11 ++ .../DB3000_GNR_PARAM.s7dcl | 55 ++++++++ .../DB3000_GNR_PARAM.s7res | 13 ++ .../FC3000_GNR_PARAM_VIS.s7dcl | 16 +++ .../FC3000_GNR_PARAM_VIS.s7res | 3 + .../DB5000_GNR_ALM.s7dcl | 57 ++++++++ .../DB5000_GNR_ALM.s7res | 21 +++ .../FC5000_GNR_ALM.s7dcl | 127 ++++++++++++++++++ .../FC5000_GNR_ALM.s7res | 21 +++ .../60_Balizas/FC60_GESTOR_BALIZAS.s7dcl | 44 ++++++ .../60_Balizas/FC60_GESTOR_BALIZAS.s7res | 9 ++ .../000_Sistema_Gestor/FC50_MAIN.s7dcl | 70 ++++++++-- .../FB15049_ZC_AIRE_ESTERIL.s7dcl | 68 ++++++---- .../FB15049_ZC_AIRE_ESTERIL.s7res | 32 ++++- .../FC2010_ZC_V.s7dcl | 2 +- .../FC2041_ZC_TQ_AE.s7dcl | 20 +-- .../FC2041_ZC_TQ_AE.s7res | 4 + .../Documentacion.s7dcl | 56 ++++++++ 19 files changed, 643 insertions(+), 48 deletions(-) create mode 100644 PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7dcl create mode 100644 PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7res create mode 100644 PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7dcl create mode 100644 PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7res create mode 100644 PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7dcl create mode 100644 PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7res create mode 100644 PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7dcl create mode 100644 PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7res create mode 100644 PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7dcl create mode 100644 PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7res create mode 100644 PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7dcl create mode 100644 PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7res create mode 100644 PLC/Bloques de programa/ZC_Estandar_Alimentacion/Documentacion.s7dcl diff --git a/PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7dcl b/PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7dcl new file mode 100644 index 0000000..ebc9bbb --- /dev/null +++ b/PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7dcl @@ -0,0 +1,62 @@ +{ + S7_Author := "ABH"; + S7_BlockNumber := "11000"; + S7_BlockTitle := "MLC_Xv"; + S7_IECCheck := "TRUE"; + S7_Optimized := "TRUE"; + S7_PreferredLanguage := "LAD"; + S7_Version := "1.0" +} +FUNCTION "FC11000_GESTOR_COM" : Void + VAR_TEMP + for_i : Int; + END_VAR + + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_4YC" + } + NETWORK + RUNG wire#powerrail + "DB11000_SEC_S7COM"( + Habilitar := "DB1_SYS".OFF, + Iniciar := "DB1_SYS".Pulso100ms, + Ack := "DB1_SYS".ACK, + Pulso1Seg := "DB1_SYS".Pulso1seg, + NumeroBloques := , + TiempoEspera := , + NDR_DONE := , + ERROR := , + Finalizado => , + EnEjecuccion => , + AlgunError => , + EnError => , + REQ => + ) + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_3nB" + } + NETWORK + RUNG wire#powerrail + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_3At" + } + NETWORK + RUNG wire#powerrail + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_4UN" + } + NETWORK + RUNG wire#powerrail + END_RUNG + END_NETWORK +END_FUNCTION diff --git a/PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7res b/PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7res new file mode 100644 index 0000000..20f10ec --- /dev/null +++ b/PLC/Bloques de programa/11000_Comunicaciones/FC11000_GESTOR_COM.s7res @@ -0,0 +1,11 @@ +MultiLingualTexts: + - id: MLC_Xv + es-ES: FC11000_GESTOR_COM + - id: MLC_4YC + es-ES: =============== Secuenciador comunicaciones S7 + - id: MLC_3nB + es-ES: TO DO Llamadas a bloques PUT/GET + - id: MLC_3At + es-ES: =============== Gestion señales comunicadas + - id: MLC_4UN + es-ES: TO DO Llamadas a funciones de gestion de comunicaciones diff --git a/PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7dcl b/PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7dcl new file mode 100644 index 0000000..e4100cb --- /dev/null +++ b/PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7dcl @@ -0,0 +1,55 @@ +{ + S7_Author := "ABH"; + S7_BlockNumber := "3000"; + S7_BlockTitle := "MLC_48A"; + S7_Family := "ZeusControl"; + S7_Optimized := "TRUE"; + S7_StandardRetain := "TRUE"; + S7_Version := "1.0" +} +DATA_BLOCK DB3000_GNR_PARAM + VAR RETAIN + { + S7_MLC := "MLC_RU"; + S7_Setpoint := "False" + } + PReal : Array[1.._.N_MAX_GNR_PREAL] of _.UDT_ZC_PREAL; + END_VAR + + VAR + { + S7_Access := "ReadOnly := External"; + S7_Visibility := "Hidden := External" + } + PReal_Vis : Array[1.._.N_MAX_GNR_PREAL] of Bool; + END_VAR + + VAR RETAIN + { + S7_MLC := "MLC_36L"; + S7_Setpoint := "False" + } + PInt : Array[1.._.N_MAX_GNR_PINT] of _.UDT_ZC_PINT; + END_VAR + + VAR + PInt_Vis : Array[1.._.N_MAX_GNR_PINT] of Bool; + Aux : STRUCT + { + S7_Access := "ReadOnly := External"; + S7_Visibility := "Hidden := External" + } + PReal_ValorAnterior : Array[1.._.N_MAX_GNR_PREAL] of Real; + { S7_Setpoint := "True" } + PInt_ValorAnterior : Array[1.._.N_MAX_GNR_PINT] of Int; + END_STRUCT; + END_VAR + + { S7_MLC := "MLC_523" } + PReal[1] := (); + { S7_MLC := "MLC_rh" } + PReal_Vis[1] := FALSE; + { S7_MLC := "MLC_4dC" } + Aux.PReal_ValorAnterior[1] := (); + +END_DATA_BLOCK diff --git a/PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7res b/PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7res new file mode 100644 index 0000000..f52bd0f --- /dev/null +++ b/PLC/Bloques de programa/3000_ParametrosGenerales/DB3000_GNR_PARAM.s7res @@ -0,0 +1,13 @@ +MultiLingualTexts: + - id: MLC_48A + es-ES: DB3000_GNR_PARAM + - id: MLC_RU + es-ES: . + - id: MLC_523 + es-ES: COMPACTO - FIJOS - Caudal de descarga lenta + - id: MLC_rh + es-ES: COMPACTO - FIJOS - Caudal de descarga lenta + - id: MLC_36L + es-ES: . + - id: MLC_4dC + es-ES: COMPACTO - FIJOS - Caudal de descarga lenta diff --git a/PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7dcl b/PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7dcl new file mode 100644 index 0000000..c17adb6 --- /dev/null +++ b/PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7dcl @@ -0,0 +1,16 @@ +{ + S7_Author := "ABH"; + S7_BlockNumber := "3000"; + S7_BlockTitle := "MLC_3Wh"; + S7_Family := "ZeusControl"; + S7_Optimized := "TRUE"; + S7_PreferredLanguage := "LAD"; + S7_Version := "1.0" +} +FUNCTION "FC3000_GNR_PARAM_VIS" : Void + { S7_Language := "LAD" } + NETWORK + RUNG wire#powerrail + END_RUNG + END_NETWORK +END_FUNCTION diff --git a/PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7res b/PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7res new file mode 100644 index 0000000..19b34e9 --- /dev/null +++ b/PLC/Bloques de programa/3000_ParametrosGenerales/FC3000_GNR_PARAM_VIS.s7res @@ -0,0 +1,3 @@ +MultiLingualTexts: + - id: MLC_3Wh + es-ES: FC3000_GNR_PARAM_VIS diff --git a/PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7dcl b/PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7dcl new file mode 100644 index 0000000..6e69e17 --- /dev/null +++ b/PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7dcl @@ -0,0 +1,57 @@ +{ + S7_Author := "ABH"; + S7_BlockNumber := "5000"; + S7_BlockTitle := "MLC_Qh"; + S7_Family := "ZeusControl"; + S7_Optimized := "TRUE"; + S7_StandardRetain := "FALSE"; + S7_Version := "1.0" +} +DATA_BLOCK DB5000_GNR_ALM + VAR RETAIN + { S7_MLC := "MLC_3fq" } + AlgunaAlarma : Bool; + END_VAR + + VAR + { S7_MLC := "MLC_4XV" } + NuevaAlarma : Bool; + { S7_MLC := "MLC_4Px" } + BalizaRoja : Bool; + { S7_MLC := "MLC_3YL" } + BalizaAmbar : Bool; + { S7_MLC := "MLC_5C9" } + BalizaVerde : Bool; + { S7_MLC := "MLC_4wQ" } + BalizaAzul : Bool; + { S7_MLC := "MLC_3gf" } + BalizaBlanca : Bool; + { S7_MLC := "MLC_47V" } + BalizaSonora : Bool; + PulsoBalizaSonora : Bool; + END_VAR + + VAR RETAIN + { + S7_MLC := "MLC_48M"; + S7_Setpoint := "False" + } + ALM : Array[1.._.N_MAX_GNR_ALARMAS] of _.UDT_ZC_ALARMA; + END_VAR + + VAR + AlarmasHMI : Array[0.._.N_MAX_GNR_ALARMAS_HMI] of Word; + END_VAR + + AlgunaAlarma := FALSE; + NuevaAlarma := FALSE; + BalizaRoja := FALSE; + BalizaAmbar := FALSE; + BalizaVerde := FALSE; + BalizaAzul := FALSE; + BalizaBlanca := FALSE; + BalizaSonora := FALSE; + PulsoBalizaSonora := TRUE; + AlarmasHMI[0] := 16#0000; + +END_DATA_BLOCK diff --git a/PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7res b/PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7res new file mode 100644 index 0000000..1928535 --- /dev/null +++ b/PLC/Bloques de programa/5000_AlarmasGenerales/DB5000_GNR_ALM.s7res @@ -0,0 +1,21 @@ +MultiLingualTexts: + - id: MLC_Qh + es-ES: DB5000_GNR_ALM + - id: MLC_3fq + es-ES: Alguna alarma activa + - id: MLC_4XV + es-ES: Nueva alarma detectada + - id: MLC_4Px + es-ES: Baliza roja (libre programacion) + - id: MLC_3YL + es-ES: Baliza ambar (libre programacion) + - id: MLC_5C9 + es-ES: Baliza verde (libre programacion) + - id: MLC_4wQ + es-ES: Baliza Azul (libre programacion) + - id: MLC_3gf + es-ES: Baliza blanca (libre programacion) + - id: MLC_47V + es-ES: Baliza sonora (libre programacion) + - id: MLC_48M + es-ES: . diff --git a/PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7dcl b/PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7dcl new file mode 100644 index 0000000..29eb541 --- /dev/null +++ b/PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7dcl @@ -0,0 +1,127 @@ +{ + S7_Author := "ABH"; + S7_BlockNumber := "5000"; + S7_BlockTitle := "MLC_3jK"; + S7_Family := "ZeusControl"; + S7_Optimized := "TRUE"; + S7_PreferredLanguage := "LAD"; + S7_Version := "1.0" +} +FUNCTION "FC5000_GNR_ALM" : Void + { S7_Language := "SCL" } + NETWORK + (* + ###### (C)Copyright ZeusControl 2026 - 2026 + + --- + ### Información del Sistema + | Hardware Compatible | Entorno de Ingeniería | + |---------------------|-----------------------| + | PLC serie 1200/1500 | TIA Portal 18 | + + --- + > **Restricciones:** Ninguna. + + --- + ### Descripción Funcional + + Función para la gestion de alarmas. + + En ella se realizan las siguientes acciones: + + - Gestion logica alarmas. + - Llamadas a gestor de alarmas. + + --- + ### Dependencias Requeridas + | Tipo | Elementos | + |------|-----------| + | FC | - | + | FB | - | + | DB | - | + | UDT | - | + + --- + ### Historial de Cambios + | Versión | Fecha | Técnico | Cambios | + |----------|------------|---------|---------| + | 01.00.00 | 22.07.2026 | (ABH) | Primera version. | + *) + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_ni" + } + NETWORK + RUNG wire#powerrail + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_49a" + } + NETWORK + RUNG wire#powerrail + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_3fz" + } + NETWORK + RUNG wire#powerrail + Contact( "DB1_SYS".OFF ) + Coil( "DB5000_GNR_ALM".BalizaVerde ) + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_3FM" + } + NETWORK + RUNG wire#powerrail + Contact( "DB1_SYS".OFF ) + Coil( "DB5000_GNR_ALM".BalizaAmbar ) + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkComment := "MLC_3rY"; + S7_NetworkTitle := "MLC_3VN" + } + NETWORK + RUNG wire#powerrail + Contact( "DB5000_GNR_ALM".AlgunaAlarma ) + Coil( "DB5000_GNR_ALM".BalizaRoja ) + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkComment := "MLC_3jg"; + S7_NetworkTitle := "MLC_3ej" + } + NETWORK + RUNG wire#powerrail + Contact( "DB5000_GNR_ALM".NuevaAlarma ) + Contact( "DB1_SYS".FlipFlop1seg ) + Coil( "DB5000_GNR_ALM".BalizaSonora ) + END_RUNG + END_NETWORK + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_3ar" + } + NETWORK + RUNG wire#powerrail + "FC17_ZC_GEST_ALM"( + Pulso1Seg := "DB1_SYS".Pulso1seg, + Ack := "DB1_SYS".ACK, + AutoAck := FALSE, + ALM := "DB5000_GNR_ALM".ALM, + AlarmasHMI := "DB5000_GNR_ALM".AlarmasHMI, + NuevaAlarma := "DB5000_GNR_ALM".NuevaAlarma, + AlgunaAlarma := "DB5000_GNR_ALM".AlgunaAlarma + ) + END_RUNG + END_NETWORK +END_FUNCTION diff --git a/PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7res b/PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7res new file mode 100644 index 0000000..7c99c2a --- /dev/null +++ b/PLC/Bloques de programa/5000_AlarmasGenerales/FC5000_GNR_ALM.s7res @@ -0,0 +1,21 @@ +MultiLingualTexts: + - id: MLC_3jK + es-ES: FC5000_GNR_ALM + - id: MLC_ni + es-ES: 'COMUNES_ALM_001 - ' + - id: MLC_49a + es-ES: =============== Gestion de baliza + - id: MLC_3fz + es-ES: Baliza verde + - id: MLC_3FM + es-ES: Baliza ambar + - id: MLC_3VN + es-ES: Baliza roja + - id: MLC_3rY + es-ES: Por norma general, poner la variable "Alguna alarma". + - id: MLC_3ej + es-ES: Baliza sonora + - id: MLC_3jg + es-ES: Por norma general, poner la variable "Nueva alarma" junto al Flip Flop de 1 segundo + - id: MLC_3ar + es-ES: =============== Gestion alarmas diff --git a/PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7dcl b/PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7dcl new file mode 100644 index 0000000..a3cb3fe --- /dev/null +++ b/PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7dcl @@ -0,0 +1,44 @@ +{ + S7_Author := "ABH"; + S7_BlockNumber := "60"; + S7_BlockTitle := "MLC_3Qf"; + S7_Family := "ZeusControl"; + S7_IECCheck := "TRUE"; + S7_Optimized := "TRUE"; + S7_PreferredLanguage := "LAD"; + S7_Version := "1.0" +} +FUNCTION "FC60_GESTOR_BALIZAS" : Void + { + S7_Language := "LAD"; + S7_NetworkTitle := "MLC_iT" + } + NETWORK + RUNG wire#powerrail + END_RUNG + END_NETWORK + { + S7_Language := "SCL"; + S7_NetworkTitle := "MLC_3Ce" + } + NETWORK + + // ========================================================================================================== + // Activacion baliza + // Por norma general, activar la salida fisica o el dispositivo correspondiente a la baliza. + // Ejemplo: Q100.0 := "DB5000_GNR_ALM".AlgunaAlarma; + + END_NETWORK + { + S7_Language := "SCL"; + S7_NetworkTitle := "MLC_4LK" + } + NETWORK + + // ========================================================================================================== + // Activacion baliza + // Por norma general, activar la salida fisica o el dispositivo correspondiente a la baliza. + // Ejemplo: Q100.0 := "DB5000_GNR_ALM".NuevaAlarma; + + END_NETWORK +END_FUNCTION diff --git a/PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7res b/PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7res new file mode 100644 index 0000000..c1884a7 --- /dev/null +++ b/PLC/Bloques de programa/60_Balizas/FC60_GESTOR_BALIZAS.s7res @@ -0,0 +1,9 @@ +MultiLingualTexts: + - id: MLC_3Qf + es-ES: FC60_GESTOR_BALIZAS + - id: MLC_iT + es-ES: =============== CUADRO XXXXX + - id: MLC_3Ce + es-ES: Baliza roja + - id: MLC_4LK + es-ES: Baliza sonora diff --git a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/000_Sistema_Gestor/FC50_MAIN.s7dcl b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/000_Sistema_Gestor/FC50_MAIN.s7dcl index d2c2038..e2ac4b7 100644 --- a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/000_Sistema_Gestor/FC50_MAIN.s7dcl +++ b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/000_Sistema_Gestor/FC50_MAIN.s7dcl @@ -245,7 +245,9 @@ FUNCTION "FC50_MAIN" : Void // Gestion dispositivo "FC2041_ZC_TQ_AE"(Pulso1seg := "DB1_SYS".Pulso1seg, Arranque := "DB1_SYS".ARRANQUE, - Ack := "DB1_SYS".ACK); + Ack := "DB1_SYS".ACK, + UsuarioActual := "DB1_SYS".Usuario.Actual, + FechaHoraActual := "DB1_SYS".FechaHoraActual); END_REGION LLAMADA_TQ_AE @@ -315,17 +317,65 @@ FUNCTION "FC50_MAIN" : Void // ========================================================================================================== REGION POST_PROGRAMA - // Alarmas generales - "FC5000_GEST_ALARMAS_GNR"(); + // ========================================================================================================== + REGION ALARMAS_GENERALES + + // Alarmas generales + "FC5000_GNR_ALM"(); + + // Gestion balizas + "FC60_GESTOR_BALIZAS"(); + + END_REGION ALARMAS_GENERALES - // Parametros generales - "FC15_ZC_GEST_PREAL"(PrimerCiclo:="DB1_SYS".ARRANQUE, - FechaHora:="DB1_SYS".FechaHoraActual, - Usuario:="DB1_SYS".Usuario.Actual, - PReal:="DB3000_GNR_PREAL".PReal, - IndexTraza:=1, - ValorAnterior:="DB3000_GNR_PREAL".PReal); + // ========================================================================================================== + REGION PARAMETROS_GENERALES + + // Parametros reales generales + "FC15_ZC_GEST_PREAL"(PrimerCiclo := "DB1_SYS".ARRANQUE, + FechaHora := "DB1_SYS".FechaHoraActual, + Usuario := "DB1_SYS".Usuario.Actual, + PReal := "DB3000_GNR_PARAM".PReal, + IndexTraza := 1, + ValorAnterior := "DB3000_GNR_PARAM".Aux.PReal_ValorAnterior); + + // Parametros enteros generales + "FC16_ZC_GEST_PINT"(PrimerCiclo := "DB1_SYS".ARRANQUE, + FechaHora := "DB1_SYS".FechaHoraActual, + Usuario := "DB1_SYS".Usuario.Actual, + PInt := "DB3000_GNR_PARAM".PInt, + IndexTraza := 1, + ValorAnterior := "DB3000_GNR_PARAM".Aux.PInt_ValorAnterior); + + END_REGION PARAMETROS_GENERALES + + + // ========================================================================================================== + REGION TRAZABILIDAD + + // Gestor trazabilidad + "FC7_ZC_TRZ_GESTOR"("DB1_SYS".Pulso1seg); + + END_REGION TRAZABILIDAD + + + // ========================================================================================================== + REGION INFORMES + + // Gestor informes + "FC11_ZC_INF_GESTOR"("DB1_SYS".Pulso1seg); + + END_REGION INFORMES + + + // ========================================================================================================== + REGION COMUNICACIONES + + // Gestor comunicaciones + "FC11000_GESTOR_COM"(); + + END_REGION COMUNICACIONES END_REGION POST_PROGRAMA diff --git a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7dcl b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7dcl index 7e826fa..38e972d 100644 --- a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7dcl +++ b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7dcl @@ -11,7 +11,9 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" VAR_INPUT { S7_MLC := "MLC_33z" } Pulso1Seg : Bool; + { S7_MLC := "MLC_4GG" } HabilitarMantenimiento : Bool; + { S7_MLC := "MLC_39V" } AlarmaFalloVapor : Bool; { S7_MLC := "MLC_Xw" } FechaHora : DTL; @@ -21,23 +23,29 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" SP_TiempoEsterilizacion : Int; { S7_MLC := "MLC_3XU" } SP_TiempoEnfriamiento : Int; + { S7_MLC := "MLC_45q" } SP_NumeroMaximoEsterilizacion : Int; { S7_MLC := "MLC_zF" } SP_DiasMaximoFiltroEsteril : Int; { S7_MLC := "MLC_WZ" } - ProcesoID : Int; + ProcesoID : Int := 15049; END_VAR VAR_INPUT RETAIN { S7_MLC := "MLC_3cm" } Usuario : String[25]; END_VAR VAR_INPUT + { S7_MLC := "MLC_42q" } MinutoAlarma : USInt; + { S7_MLC := "MLC_sZ" } SegundoAlarma : USInt; END_VAR VAR_IN_OUT + { S7_MLC := "MLC_54s" } ParoMantenimiento : Bool; + { S7_MLC := "MLC_3Du" } AvisoDiasEsterilizacion : Bool; + { S7_MLC := "MLC_52S" } AlarmaDiasEsterilizacion : Bool; END_VAR VAR @@ -64,16 +72,27 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" s_TiempoEtapa : _.UDT_ZC_PRO_TIEMPO_ETAPA; END_VAR VAR + { S7_MLC := "MLC_4vd" } Pulsadores : STRUCT - { S7_Setpoint := "False" } + { + S7_MLC := "MLC_3jq"; + S7_Setpoint := "False" + } Habilitar : _.UDT_ZC_PULSADOR; - { S7_Setpoint := "False" } + { + S7_MLC := "MLC_3im"; + S7_Setpoint := "False" + } Deshabilitar : _.UDT_ZC_PULSADOR; - { S7_Setpoint := "False" } + { + S7_MLC := "MLC_49T"; + S7_Setpoint := "False" + } Mantenimiento : _.UDT_ZC_PULSADOR; END_STRUCT; END_VAR VAR RETAIN + { S7_MLC := "MLC_4jg" } TiempoEsterelizado : _.UDT_ZC_CONTADOR_TIEMPO; END_VAR VAR @@ -91,15 +110,14 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" s_oldMostrarAlarmaMto : Bool; END_VAR VAR_TEMP - { S7_MLC := "MLC_ps" } t_ResetContador : Bool; t_DiasAvisos : Int; END_VAR VAR CONSTANT - REPOSO : Int := 0; - ESTERILIZANDO : Int := 10; - ESTERILIZADO : Int := 20; - ENFRIAMIENTO : Int := 30; + ETAPA_0_REPOSO : Int := 0; + ETAPA_10_ESTERILIZANDO : Int := 10; + ETAPA_20_ESTERILIZADO : Int := 20; + ETAPA_30_ENFRIAMIENTO : Int := 30; END_VAR { S7_Language := "SCL" } @@ -134,7 +152,7 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" |------|-----------| | FC | `FC15025_ZC_CONTADOR_TIEMPO`, `FC15026_ZC_PULSADOR` | | FB | - | - | DB | `DB1_SYS` | + | DB | - | | UDT | `UDT_ZC_CONTADOR_TIEMPO`, `UDT_ZC_PRO_TIEMPO_ETAPA`, `UDT_ZC_PULSADOR` | --- @@ -197,24 +215,24 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" CASE #s_Etapa OF // ============================================================================= - #REPOSO: + #ETAPA_0_REPOSO: IF #s_Habilitar THEN - #s_Etapa := #ESTERILIZADO; + #s_Etapa := #ETAPA_20_ESTERILIZADO; #s_TiempoEtapa.Actual := 0; END_IF; // ============================================================================= - #ESTERILIZANDO: + #ETAPA_10_ESTERILIZANDO: #s_TiempoEtapa.SP := #SP_TiempoEsterilizacion; IF NOT #s_Habilitar THEN - #s_Etapa := #REPOSO; + #s_Etapa := #ETAPA_0_REPOSO; END_IF; IF #AlarmaFalloVapor THEN - #s_Etapa := #REPOSO; + #s_Etapa := #ETAPA_0_REPOSO; END_IF; IF #s_TiempoEtapa.Cumplido THEN - #s_Etapa := #ENFRIAMIENTO; + #s_Etapa := #ETAPA_30_ENFRIAMIENTO; #s_TiempoEtapa.Actual := 0; #S_NumeroDiasEsterilizacion := 0; #s_NumeroEsterilizaciones += 1; @@ -228,25 +246,25 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" #s_TiempoEtapa.Actual := 0; END_IF; // ============================================================================= - #ENFRIAMIENTO: + #ETAPA_30_ENFRIAMIENTO: #s_TiempoEtapa.SP := #SP_TiempoEnfriamiento; #s_TiempoEtapa.Activar := TRUE; IF NOT #s_Habilitar THEN - #s_Etapa := #REPOSO; + #s_Etapa := #ETAPA_0_REPOSO; END_IF; IF #s_TiempoEtapa.Cumplido THEN - #s_Etapa := #ESTERILIZADO; + #s_Etapa := #ETAPA_20_ESTERILIZADO; #s_TiempoEtapa.Actual := 0; END_IF; // ============================================================================= - #ESTERILIZADO: + #ETAPA_20_ESTERILIZADO: #s_TiempoEtapa.SP := 5; IF NOT #s_Habilitar THEN - #s_Etapa := #REPOSO; + #s_Etapa := #ETAPA_0_REPOSO; END_IF; IF #s_TiempoEtapa.Cumplido THEN - #s_Etapa := #ESTERILIZANDO; + #s_Etapa := #ETAPA_10_ESTERILIZANDO; #s_TiempoEtapa.Actual := 0; END_IF; IF #TempEsterilAlcanzada AND NOT #s_FiltroEsteril THEN @@ -256,7 +274,7 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" #s_TiempoEtapa.Actual := 0; END_IF; ELSE - #s_Etapa := #REPOSO; + #s_Etapa := #ETAPA_0_REPOSO; END_CASE; END_REGION SECUENCIA_FILTRO @@ -272,7 +290,7 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" END_IF; "FC15025_ZC_CONTADOR_TIEMPO"(Pulso1seg:=#Pulso1Seg, - Iniciar:=#Pulso1Seg AND (#s_Etapa = #ESTERILIZADO), + Iniciar:=#Pulso1Seg AND (#s_Etapa = #ETAPA_20_ESTERILIZADO), Reset:=#t_ResetContador, Contador:=#TiempoEsterelizado); @@ -288,7 +306,7 @@ FUNCTION_BLOCK "FB15049_ZC_AIRE_ESTERIL" REGION TIEMPO_ETAPA // Proceso en estado parado - IF #s_Etapa = #REPOSO THEN + IF #s_Etapa = #ETAPA_0_REPOSO THEN #s_TiempoEtapa.Actual := 0; #s_TiempoEtapa.Activar := FALSE; END_IF; diff --git a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7res b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7res index 8490b19..f97f45c 100644 --- a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7res +++ b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FB15049_ZC_AIRE_ESTERIL.s7res @@ -3,20 +3,36 @@ es-ES: FB15049_ZC_AIRE_ESTERIL - id: MLC_33z es-ES: Pulso 1 Segundo + - id: MLC_4GG + es-ES: Habilitar mantenimiento + - id: MLC_39V + es-ES: Alarma fallo vaor - id: MLC_Xw es-ES: Fecha y hora actual - id: MLC_4TG es-ES: Estado temperatura de esterilizacion alcanzada - id: MLC_3r4 - es-ES: SP_Tiempo de esterilizacion + es-ES: Set Point Tiempo de esterilizacion - id: MLC_3XU - es-ES: SP_Tiempo de enfriamiento + es-ES: Set Point Tiempo de enfriamiento + - id: MLC_45q + es-ES: Set Point numero maximo esterilizaciones - id: MLC_zF es-ES: SP_Dias Maximo Filtro Esteril - id: MLC_WZ es-ES: ID Proceso para trazabilidad - id: MLC_3cm es-ES: Usuario actual + - id: MLC_42q + es-ES: Minuto alarma + - id: MLC_sZ + es-ES: Segundo alarma + - id: MLC_54s + es-ES: Paro mantenimiento + - id: MLC_3Du + es-ES: Aviso dias esterilizacion + - id: MLC_52S + es-ES: Alarma dias esterilizacion - id: MLC_4jQ es-ES: Estado habilitado - id: MLC_ZU @@ -29,9 +45,17 @@ es-ES: Numerpo de dias con filtro esterilizado - id: MLC_4hW es-ES: Tiempo de etapa + - id: MLC_4vd + es-ES: Pulsador + - id: MLC_3jq + es-ES: Habilitar + - id: MLC_3im + es-ES: Deshabilitar + - id: MLC_49T + es-ES: Mantenimiento + - id: MLC_4jg + es-ES: Tiempo esterilizado - id: MLC_RL es-ES: Contraseña calculada de mantenimiento - id: MLC_3mQ es-ES: Contraseña calculada de mantenimiento - - id: MLC_ps - es-ES: Tempoeral reset contador de horas diff --git a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2010_ZC_V.s7dcl b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2010_ZC_V.s7dcl index a5e5e0c..9e17bd6 100644 --- a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2010_ZC_V.s7dcl +++ b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2010_ZC_V.s7dcl @@ -72,7 +72,7 @@ FUNCTION "FC2010_ZC_V" : Void |------|-----------| | FC | `FC8_ZC_TRAZA_REGISTRO` | | FB | - | - | DB | `DB1_SYS`, `DB2010_V` | + | DB | `DB2010_V` | | UDT | - | --- diff --git a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7dcl b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7dcl index e60bc09..81c5b78 100644 --- a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7dcl +++ b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7dcl @@ -12,6 +12,10 @@ FUNCTION "FC2041_ZC_TQ_AE" : Void Pulso1seg : Bool; Arranque : Bool; Ack : Bool; + { S7_MLC := "MLC_4jC" } + UsuarioActual : String; + { S7_MLC := "MLC_5BC" } + FechaHoraActual : DTL; END_VAR VAR_TEMP for_i : Int; @@ -300,10 +304,10 @@ FUNCTION "FC2041_ZC_TQ_AE" : Void REGION TRAZABILIDAD_MANUALIZACION IF "DB2041_TQ_AE".TQ_AE[#for_i].Estado_AutoMan AND NOT "DB2041_TQ_AE".TQ_AE[#for_i].Aux_oldAutoMan THEN - "FC8_ZC_TRZ_REGISTRO"(FechaHora := "DB1_SYS".FechaHoraActual, + "FC8_ZC_TRZ_REGISTRO"(FechaHora := #FechaHoraActual, Registrar := 1, Categoria := "TRZ_CAT_20_DISP_TQ_AE", - User := "DB1_SYS".Usuario.Actual, + User := #UsuarioActual, CodInt_1 := "TRZ_SYS_DISP_TIPO_TQ_AE", CodInt_2 := #for_i, CodInt_3 := "TRZ_SYS_DISP_ACC_MAN", @@ -314,10 +318,10 @@ FUNCTION "FC2041_ZC_TQ_AE" : Void END_IF; IF NOT "DB2041_TQ_AE".TQ_AE[#for_i].Estado_AutoMan AND "DB2041_TQ_AE".TQ_AE[#for_i].Aux_oldAutoMan THEN - "FC8_ZC_TRZ_REGISTRO"(FechaHora := "DB1_SYS".FechaHoraActual, + "FC8_ZC_TRZ_REGISTRO"(FechaHora := #FechaHoraActual, Registrar := 1, Categoria := "TRZ_CAT_20_DISP_TQ_AE", - User := "DB1_SYS".Usuario.Actual, + User := #UsuarioActual, CodInt_1 := "TRZ_SYS_DISP_TIPO_TQ_AE", CodInt_2 := #for_i, CodInt_3 := "TRZ_SYS_DISP_ACC_AUTO", @@ -328,10 +332,10 @@ FUNCTION "FC2041_ZC_TQ_AE" : Void END_IF; IF "DB2041_TQ_AE".TQ_AE[#for_i].Estado_AutoMan AND "DB2041_TQ_AE".TQ_AE[#for_i].Orden_Manual AND NOT "DB2041_TQ_AE".TQ_AE[#for_i].Aux_oldOrdenManual THEN - "FC8_ZC_TRZ_REGISTRO"(FechaHora := "DB1_SYS".FechaHoraActual, + "FC8_ZC_TRZ_REGISTRO"(FechaHora := #FechaHoraActual, Registrar := 1, Categoria := "TRZ_CAT_20_DISP_TQ_AE", - User := "DB1_SYS".Usuario.Actual, + User := #UsuarioActual, CodInt_1 := "TRZ_SYS_DISP_TIPO_TQ_AE", CodInt_2 := #for_i, CodInt_3 := "TRZ_SYS_DISP_ACC_MAN_ON", @@ -342,10 +346,10 @@ FUNCTION "FC2041_ZC_TQ_AE" : Void END_IF; IF "DB2041_TQ_AE".TQ_AE[#for_i].Estado_AutoMan AND NOT "DB2041_TQ_AE".TQ_AE[#for_i].Orden_Manual AND "DB2041_TQ_AE".TQ_AE[#for_i].Aux_oldOrdenManual THEN - "FC8_ZC_TRZ_REGISTRO"(FechaHora := "DB1_SYS".FechaHoraActual, + "FC8_ZC_TRZ_REGISTRO"(FechaHora := #FechaHoraActual, Registrar := 1, Categoria := "TRZ_CAT_20_DISP_TQ_AE", - User := "DB1_SYS".Usuario.Actual, + User := #UsuarioActual, CodInt_1 := "TRZ_SYS_DISP_TIPO_TQ_AE", CodInt_2 := #for_i, CodInt_3 := "TRZ_SYS_DISP_ACC_MAN_OFF", diff --git a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7res b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7res index cddab29..532d18b 100644 --- a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7res +++ b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/200_Dispositivos_Estandar/FC2041_ZC_TQ_AE.s7res @@ -1,3 +1,7 @@ MultiLingualTexts: - id: MLC_562 es-ES: FC2041_ZC_TQ_AE + - id: MLC_4jC + es-ES: Usuario actual + - id: MLC_5BC + es-ES: Fecha y hora actual diff --git a/PLC/Bloques de programa/ZC_Estandar_Alimentacion/Documentacion.s7dcl b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/Documentacion.s7dcl new file mode 100644 index 0000000..09defbc --- /dev/null +++ b/PLC/Bloques de programa/ZC_Estandar_Alimentacion/Documentacion.s7dcl @@ -0,0 +1,56 @@ +{ + S7_EditorMode := "SCL"; + S7_IECCheck := "TRUE"; + S7_Optimized := "TRUE"; + S7_Version := "0.1" +} +FUNCTION "Documentacion" : Void + { S7_Language := "SCL" } + NETWORK + + + REGION DESCRIPCION + (* + ###### (C)Copyright ZeusControl 2020 - 2026 + + --- + ### Información del Sistema + | Hardware Compatible | Entorno de Ingeniería | + |---------------------|-----------------------| + | PLC serie 1200/1500 | TIA Portal 18 |ASasASadsadsasd + + --- + > **Restricciones:** [!!! INDICA AQUÍ LIMITACIONES (O ESCRIBE "Ninguna") !!!] + + --- + ### Descripción Funcional + [!!! ESCRIBE AQUÍ UN RESUMEN BREVE DEL BLOQUE (1 O 2 LÍNEAS) !!!] + + [!!! EXPLICA AQUÍ LOS DETALLES TÉCNICOS. POR EJEMPLO: !!!] + A nivel secuencial, la función realiza las siguientes tareas: + + - Tarea principal 1, destacando el uso de la entrada `NombreVariable`. + - Tarea principal 2 evaluando el estado de **En Marcha**. + - Condición secundaria o sub-tarea (usando dos espacios antes del guion). + + --- + ### Dependencias Requeridas + | Tipo | Elementos | + |------|-----------| + | FC | - | + | FB | - | + | DB | - | + | UDT | - | + + --- + ### Historial de Cambios + | Versión | Fecha | Técnico | Cambios | + |----------|------------|---------|---------| + | 00.00.01 | DD.MM.YYYY | (ZC) | Primera versión. | + + *) + END_REGION DESCRIPCION + + // borrar + END_NETWORK +END_FUNCTION