diff --git a/IOB-WIN-NEXT/IobGeneric.cs b/IOB-WIN-NEXT/IobGeneric.cs index ffd308d1..5f6ad9c3 100644 --- a/IOB-WIN-NEXT/IobGeneric.cs +++ b/IOB-WIN-NEXT/IobGeneric.cs @@ -62,10 +62,20 @@ namespace IOB_WIN_NEXT protected int B_previous; /// - /// NUm errori check alive + /// Num errori check alive /// protected int currAliveErrors = 0; + /// + /// Variabile numero errori vari (in lettura) --> se supera soglia maxErroriCheck --> disconnette + /// + protected int numErroriCheck = 0; + + /// + /// Soglia massima errori priam di disconnesisone automatica + /// + protected int maxErroriCheck = 100; + /// /// Dizionario valori impostati x produzione /// @@ -81,6 +91,11 @@ namespace IOB_WIN_NEXT /// protected int currSendErrors = 0; + /// + /// Periodo wathdog di default (2 sec se non specificato) + /// + protected int watchDogPeriod = 2; + /// /// Array dei contatori x segnali blinking /// @@ -1694,10 +1709,6 @@ namespace IOB_WIN_NEXT // mostro update... string newString = string.Format("{0:X}", B_input); currDispData.newInData = newString; -#if false - // salvo coda debug... - QueueDebug.Enqueue(B_input); -#endif } /// @@ -1781,6 +1792,22 @@ namespace IOB_WIN_NEXT int.TryParse(s_maxPingRetry, out numRetry); maxPingRetry = numRetry; } + + string s_maxErrCheck = getOptPar("MAX_ERR_CHECK"); + if (!string.IsNullOrEmpty(s_maxErrCheck)) + { + int numErr = 50; + int.TryParse(s_maxErrCheck, out numErr); + maxErroriCheck = numErr; + } + + string s_watchDogPer = getOptPar("WATCHDOG_PERIOD"); + if (!string.IsNullOrEmpty(s_watchDogPer)) + { + int numPer = 3; + int.TryParse(s_watchDogPer, out numPer); + watchDogPeriod = numPer; + } } ///