aggiunta gestione chiusura ODL x RIMOR

This commit is contained in:
Samuele Locatelli
2023-03-16 10:00:26 +01:00
parent 9e76475908
commit e12de0f60e
2 changed files with 72 additions and 41 deletions
+42 -41
View File
@@ -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"
+30
View File
@@ -130,6 +130,26 @@ namespace IOB_WIN_NEXT
}
}
/// <summary>
/// Restituisce status di END ORDINE (chiusura ODL se aperto) HARD coded
/// </summary>
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
{