Cedax:
- test lettura parametri dosaggio - ok lettura - fix lettura interi singoli da LUT
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
"Stag_Prod1": {
|
||||
"name": "Stag_Prod1",
|
||||
"description": "Totale Prodotto 1 Stagione",
|
||||
"memAddr": "40003",
|
||||
"memAddr": "41003",
|
||||
"tipoMem": "HLPInt",
|
||||
"index": 1003,
|
||||
"size": 2,
|
||||
@@ -33,7 +33,7 @@
|
||||
"Stag_Prod2": {
|
||||
"name": "Stag_Prod2",
|
||||
"description": "Totale Prodotto 2 Stagione",
|
||||
"memAddr": "40005",
|
||||
"memAddr": "41005",
|
||||
"tipoMem": "HLPInt",
|
||||
"index": 1005,
|
||||
"size": 2,
|
||||
@@ -47,7 +47,7 @@
|
||||
"Stag_Prod3": {
|
||||
"name": "Stag_Prod3",
|
||||
"description": "Totale Prodotto 3 Stagione",
|
||||
"memAddr": "40007",
|
||||
"memAddr": "41007",
|
||||
"tipoMem": "HLPInt",
|
||||
"index": 1007,
|
||||
"size": 2,
|
||||
@@ -61,7 +61,7 @@
|
||||
"Stag_Prod4": {
|
||||
"name": "Stag_Prod4",
|
||||
"description": "Totale Prodotto 4 Stagione",
|
||||
"memAddr": "40009",
|
||||
"memAddr": "41009",
|
||||
"tipoMem": "HLPInt",
|
||||
"index": 1009,
|
||||
"size": 2,
|
||||
@@ -89,7 +89,7 @@
|
||||
"Giorno_Prod1": {
|
||||
"name": "Giorno_Prod1",
|
||||
"description": "Totale Prodotto 1 Giorno",
|
||||
"memAddr": "40013",
|
||||
"memAddr": "41013",
|
||||
"tipoMem": "HLPInt",
|
||||
"index": 1013,
|
||||
"size": 2,
|
||||
@@ -103,7 +103,7 @@
|
||||
"Giorno_Prod2": {
|
||||
"name": "Giorno_Prod2",
|
||||
"description": "Totale Prodotto 2 Giorno",
|
||||
"memAddr": "40015",
|
||||
"memAddr": "41015",
|
||||
"tipoMem": "HLPInt",
|
||||
"index": 1015,
|
||||
"size": 2,
|
||||
@@ -131,9 +131,9 @@
|
||||
"Giorno_Prod4": {
|
||||
"name": "Giorno_Prod4",
|
||||
"description": "Totale Prodotto 4 Giorno",
|
||||
"memAddr": "41021",
|
||||
"memAddr": "41019",
|
||||
"tipoMem": "HLPInt",
|
||||
"index": 1021,
|
||||
"index": 1019,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 90,
|
||||
@@ -145,9 +145,9 @@
|
||||
"Dose_Staz_1": {
|
||||
"name": "Dose_Staz_1",
|
||||
"description": "Dose Stazione 1",
|
||||
"memAddr": "41024",
|
||||
"memAddr": "40024",
|
||||
"tipoMem": "Int",
|
||||
"index": 1024,
|
||||
"index": 24,
|
||||
"size": 1,
|
||||
"func": "MEDIAN",
|
||||
"period": 90,
|
||||
@@ -159,9 +159,9 @@
|
||||
"Dose_Staz_2": {
|
||||
"name": "Dose_Staz_2",
|
||||
"description": "Dose Stazione 1",
|
||||
"memAddr": "41025",
|
||||
"memAddr": "40025",
|
||||
"tipoMem": "Int",
|
||||
"index": 1025,
|
||||
"index": 25,
|
||||
"size": 1,
|
||||
"func": "MEDIAN",
|
||||
"period": 90,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"ReadBlocks": {
|
||||
"40999": 30
|
||||
"40016": 16,
|
||||
"40999": 32
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,6 @@ CLI_INST=SteamWareSim
|
||||
;STARTLIST=GIACO_ICOEL_002
|
||||
;STARTLIST=GIACO_CENTERFRIGO
|
||||
;STARTLIST=GIACO_NWSE
|
||||
STARTLIST=GIACO_ICOEL_002
|
||||
STARTLIST=GIACO_CEDAX_001
|
||||
|
||||
MAXCNC=10
|
||||
@@ -255,7 +255,7 @@ namespace IOB_WIN_NEXT
|
||||
var currState = currAlarmsState(item);
|
||||
// calcolo vettore stringa degli allarmi...
|
||||
bankVal = getAlarmState(item, currState);
|
||||
bankVal = string.IsNullOrEmpty(bankVal) ? "OK":bankVal;
|
||||
bankVal = string.IsNullOrEmpty(bankVal) ? "OK" : bankVal;
|
||||
saveAlarmString(ref outVal, bankVal, item.description);
|
||||
}
|
||||
}
|
||||
@@ -1293,15 +1293,32 @@ namespace IOB_WIN_NEXT
|
||||
if (useLUT)
|
||||
{
|
||||
int lutAddress = 40000 + item.Value.index + deltaBase;
|
||||
if (HoldingRegisterLUT.ContainsKey(lutAddress))
|
||||
// se size = 1 --> devo cambiare modo recupero
|
||||
if (item.Value.size == 1)
|
||||
{
|
||||
try
|
||||
if (item.Value.index % 2 == 0)
|
||||
{
|
||||
listInt = HoldingRegisterLUT[lutAddress];
|
||||
//Array.Copy(HoldingRegisterLUT[lutAddress], listInt, 1);
|
||||
Array.Copy(HoldingRegisterLUT[lutAddress], 0, listInt, 0, 1);
|
||||
}
|
||||
catch (Exception exc)
|
||||
else
|
||||
{
|
||||
lgError($"Errore in lettura da HoldingRegisterLUT per indirizzo {lutAddress} | item {item.Key}{Environment.NewLine}{exc}");
|
||||
lutAddress--;
|
||||
Array.Copy(HoldingRegisterLUT[lutAddress], 1,listInt, 0, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (HoldingRegisterLUT.ContainsKey(lutAddress))
|
||||
{
|
||||
try
|
||||
{
|
||||
listInt = HoldingRegisterLUT[lutAddress];
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError($"Errore in lettura da HoldingRegisterLUT per indirizzo {lutAddress} | item {item.Key}{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user