From 882cdc0ba95f555eeeaa8dc3b66ccffd52bcb2d0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 18 Mar 2025 17:54:04 +0100 Subject: [PATCH] Altra correzione pzcount fanuc missing con fluxlog vuoto --> ND --- IOB-WIN-FANUC/DATA/CONF/3025.ini | 2 +- IOB-WIN-FANUC/Iob/Fanuc.cs | 9 +++++++++ IOB-WIN-FORM/Iob/Generic.cs | 17 +++++++++-------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/IOB-WIN-FANUC/DATA/CONF/3025.ini b/IOB-WIN-FANUC/DATA/CONF/3025.ini index 0a4d3cdb..5b7a6673 100644 --- a/IOB-WIN-FANUC/DATA/CONF/3025.ini +++ b/IOB-WIN-FANUC/DATA/CONF/3025.ini @@ -53,7 +53,7 @@ PAR_SIZE=3 [BLINK] ;MAX_COUNTER_BLINK = 30 -MAX_COUNTER_BLINK = 60 +MAX_COUNTER_BLINK = 15 ;bit0 = 0 ;bit1 = 1 ;bit2 = 0 diff --git a/IOB-WIN-FANUC/Iob/Fanuc.cs b/IOB-WIN-FANUC/Iob/Fanuc.cs index 67159590..e782937f 100644 --- a/IOB-WIN-FANUC/Iob/Fanuc.cs +++ b/IOB-WIN-FANUC/Iob/Fanuc.cs @@ -2105,6 +2105,15 @@ namespace IOB_WIN_FANUC.Iob { memName = "PzCntFree"; } + else if (memMap.mMapWrite.ContainsKey("ContatoreParziale")) + { + memName = "ContatoreParziale"; + } + } + // se non trovato... leggo da OPT_PAR + if (string.IsNullOrEmpty(memName)) + { + memName = "PZCOUNT_MODE"; } return memName; } diff --git a/IOB-WIN-FORM/Iob/Generic.cs b/IOB-WIN-FORM/Iob/Generic.cs index 6ffece8f..3a38da8f 100644 --- a/IOB-WIN-FORM/Iob/Generic.cs +++ b/IOB-WIN-FORM/Iob/Generic.cs @@ -2230,7 +2230,7 @@ namespace IOB_WIN_FORM.Iob foreach (var item in currAlarms) { // verifico NON sia un ND... - if (item.Key == "ND") + if (item.Key == "ND" || string.IsNullOrEmpty(item.Key)) { // log anomalia... lgTrace($"Errore in predisposizione FL Allarmi CNC: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}"); @@ -2247,7 +2247,7 @@ namespace IOB_WIN_FORM.Iob foreach (var item in currAlarms.Where(X => X.Key != "CNC_ALARM")) { // verifico NON sia un ND... - if (item.Key == "ND") + if (item.Key == "ND" || string.IsNullOrEmpty(item.Key)) { // log anomalia... lgTrace($"Errore in predisposizione FL Allarmi NON CNC: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}"); @@ -2364,7 +2364,7 @@ namespace IOB_WIN_FORM.Iob if (sendDynDataRec || item.Key != "DYNDATA") { // verifico NON sia un ND... - if (item.Key == "ND") + if (item.Key == "ND" || string.IsNullOrEmpty(item.Key)) { // log anomalia... lgTrace($"Errore in processDynData.01: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}"); @@ -2388,8 +2388,9 @@ namespace IOB_WIN_FORM.Iob { // controllo se vietato dynData if (sendDynDataRec || item.Key != "DYNDATA") - { // verifico NON sia un ND... - if (item.Key == "ND") + { + // verifico NON sia un ND... + if (item.Key == "ND" || string.IsNullOrEmpty(item.Key)) { // log anomalia... lgTrace($"Errore in processDynData.02: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}"); @@ -2508,7 +2509,7 @@ namespace IOB_WIN_FORM.Iob foreach (var item in currOverride) { // verifico NON sia un ND... - if (item.Key == "ND") + if (item.Key == "ND" || string.IsNullOrEmpty(item.Key)) { // log anomalia... lgTrace($"Errore in processOverride: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}"); @@ -8225,9 +8226,9 @@ namespace IOB_WIN_FORM.Iob // per ogni valore del dizionario mostro ed accodo! string sVal = ""; foreach (var item in currSysInfo) - { + { // verifico NON sia un ND... - if (item.Key == "ND") + if (item.Key == "ND" || string.IsNullOrEmpty(item.Key)) { // log anomalia... lgTrace($"Errore in processSysInfo: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}");