diff --git a/IOB-WIN-NEXT/DATA/CONF/IMI_RIMOR_SAB_01.json b/IOB-WIN-NEXT/DATA/CONF/IMI_RIMOR_SAB_01.json index bb11ecf6..cb263e2d 100644 --- a/IOB-WIN-NEXT/DATA/CONF/IMI_RIMOR_SAB_01.json +++ b/IOB-WIN-NEXT/DATA/CONF/IMI_RIMOR_SAB_01.json @@ -10,9 +10,37 @@ } }, "mMapRead": { + "StatoLavorazione": { + "name": "01) StatoLavorazione", + "description": "Stato Lavorazione", + "memAddr": "421004", + "tipoMem": "Int", + "index": 21004, + "size": 1, + "func": "MAX", + "period": 90, + "factor": 1, + "minVal": 0, + "maxVal": 999999, + "unit": "#" + }, + "DurataLavorazione": { + "name": "02) DurataLavorazione", + "description": "Durata Lavorazione", + "memAddr": "421002", + "tipoMem": "Int", + "index": 21002, + "size": 1, + "func": "MAX", + "period": 90, + "factor": 1, + "minVal": 0, + "maxVal": 999999, + "unit": "h/m" + }, "OreFunzFiltro1": { "name": "OreFunzFiltro1", - "description": "Ore funzionamento filtro 1", + "description": "03) Filtro 1 Ore funzionamento", "memAddr": "420201", "tipoMem": "Int", "index": 20201, @@ -26,7 +54,7 @@ }, "MinFunzFiltro1": { "name": "MinFunzFiltro1", - "description": "Minuti funzionamento filtro 1", + "description": "04) Filtro 1 Minuti funzionamento", "memAddr": "420205", "tipoMem": "Int", "index": 20205, @@ -40,7 +68,7 @@ }, "OreFunzFiltroPar1": { "name": "OreFunzFiltroPar1", - "description": "Ore funzionamento filtro 1 (contatore parziale azzerabile)", + "description": "Filtro 1 (c) Ore funzionamento (contatore parziale azzerabile)", "memAddr": "420203", "tipoMem": "Int", "index": 20203, @@ -54,7 +82,7 @@ }, "MinFunzFiltroPar1": { "name": "MinFunzFiltroPar1", - "description": "Minuti funzionamento filtro 1 (contatore parziale azzerabile)", + "description": "Filtro 1 (d) Minuti funzionamento (contatore parziale azzerabile)", "memAddr": "420206", "tipoMem": "Int", "index": 20206, @@ -68,7 +96,7 @@ }, "OreFunzFiltro2": { "name": "OreFunzFiltro2", - "description": "Ore funzionamento filtro 2", + "description": "Filtro 2 (a) Ore funzionamento ", "memAddr": "420301", "tipoMem": "Int", "index": 20301, @@ -82,7 +110,7 @@ }, "MinFunzFiltro2": { "name": "MinFunzFiltro2", - "description": "Minuti funzionamento filtro 2", + "description": "Filtro 2 (b) Minuti funzionamento", "memAddr": "420305", "tipoMem": "Int", "index": 20305, @@ -96,7 +124,7 @@ }, "OreFunzFiltroPar2": { "name": "OreFunzFiltroPar2", - "description": "Ore funzionamento filtro 1 (contatore parziale azzerabile)", + "description": "Filtro 2 (c) Ore funzionamento (contatore parziale azzerabile)", "memAddr": "420303", "tipoMem": "Int", "index": 20303, @@ -110,7 +138,7 @@ }, "MinFunzFiltroPar2": { "name": "MinFunzFiltroPar2", - "description": "Minuti funzionamento filtro 1 (contatore parziale azzerabile)", + "description": "Filtro 2 (d) Minuti funzionamento (contatore parziale azzerabile)", "memAddr": "420306", "tipoMem": "Int", "index": 20306, @@ -124,7 +152,7 @@ }, "OreFunzAspiratore": { "name": "OreFunzAspiratore", - "description": "Ore funzionamento Aspiratore", + "description": "Aspiratore (a) Ore funzionamento", "memAddr": "420401", "tipoMem": "Int", "index": 20401, @@ -138,7 +166,7 @@ }, "MinFunzAspiratore": { "name": "MinFunzAspiratore", - "description": "Minuti funzionamento Aspiratore", + "description": "Aspiratore (b) Minuti funzionamento", "memAddr": "420405", "tipoMem": "Int", "index": 20405, @@ -152,7 +180,7 @@ }, "OreFunzAspiratorePar": { "name": "OreFunzAspiratorePar", - "description": "Ore funzionamento Aspiratore (contatore parziale azzerabile)", + "description": "Aspiratore (c) Ore funzionamento (contatore parziale azzerabile)", "memAddr": "420403", "tipoMem": "Int", "index": 20403, @@ -166,7 +194,7 @@ }, "MinFunzAspiratorePar": { "name": "MinFunzAspiratorePar", - "description": "Minuti funzionamento Aspiratore (contatore parziale azzerabile)", + "description": "Aspiratore (d) Minuti funzionamento (contatore parziale azzerabile)", "memAddr": "420406", "tipoMem": "Int", "index": 20406, @@ -177,38 +205,11 @@ "minVal": 0, "maxVal": 999999, "unit": "m" - }, - "DurataLavorazione": { - "name": "DurataLavorazione", - "description": "Durata Lavorazione", - "memAddr": "421002", - "tipoMem": "Int", - "index": 21002, - "size": 1, - "func": "MAX", - "period": 90, - "factor": 1, - "minVal": 0, - "maxVal": 999999, - "unit": "h/m" - }, - "StatoLavorazione": { - "name": "StatoLavorazione", - "description": "Stato Lavorazione", - "memAddr": "421004", - "tipoMem": "Int", - "index": 21004, - "size": 1, - "func": "MAX", - "period": 90, - "factor": 1, - "minVal": 0, - "maxVal": 999999, - "unit": "#" } }, "optMemPar": { - "AlarmIntCond": "421004|0=1", + "EndOrdIntCond": "421004|0=1", + //"AlarmIntCond": "421004|0=1", "ManualIntCond": "421004|0=3", //"EStopBitCond": "100040.0=1", "WorkIntCond": "421004|0=2,4" diff --git a/IOB-WIN-NEXT/IobModbusTCPRimor.cs b/IOB-WIN-NEXT/IobModbusTCPRimor.cs index cbaa9e9e..ed9e499f 100644 --- a/IOB-WIN-NEXT/IobModbusTCPRimor.cs +++ b/IOB-WIN-NEXT/IobModbusTCPRimor.cs @@ -130,6 +130,26 @@ namespace IOB_WIN_NEXT } } + /// + /// Restituisce status di END ORDINE (chiusura ODL se aperto) HARD coded + /// + protected bool EndOrderState + { + get + { + bool answ = false; + if (memMap.optMemPar.ContainsKey("EndOrdBitCond")) + { + answ = testDisInBitCondition("EndOrdBitCond"); + } + else if (memMap.optMemPar.ContainsKey("EndOrdIntCond")) + { + answ = testIntCondition("EndOrdIntCond"); + } + return answ; + } + } + #endregion Protected Properties #region Protected Methods @@ -186,6 +206,16 @@ namespace IOB_WIN_NEXT { byteSignals += (1 << 1); } + + // controllo SE avesse ODL attivo am foss ein condizione end ordine --> mando chiusura ODL + if (currIdxODL > 0) + { + if (EndOrderState) + { + // invio chiusura ODL + tryAskCloseODL(); + } + } } else {