diff --git a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini
index 525743fd..ef9caf4f 100644
--- a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini
+++ b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini
@@ -58,5 +58,6 @@ CLI_INST=SteamWareSim
;STARTLIST=SIMUL_02
;NB: mettere copy always ai file di conf x fare test...
STARTLIST=SIMUL_01
+;STARTLIST=PING
MAXCNC=10
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/PING.ini b/IOB-WIN-NEXT/DATA/CONF/PING.ini
index 73cfa8b0..da24ac99 100644
--- a/IOB-WIN-NEXT/DATA/CONF/PING.ini
+++ b/IOB-WIN-NEXT/DATA/CONF/PING.ini
@@ -2,13 +2,15 @@
[IOB]
CNCTYPE=PingWatchdog
PING_MS_TIMEOUT=500
+IOB_NAME=SIMUL_09
[MACHINE]
VENDOR=STEAMWARE
MODEL=WATCHDOG
[CNC]
-IP=10.74.83.112
+;IP=10.74.83.112
+IP=10.74.82.253
PORT=0000
[SERVER]
diff --git a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
index 72f709eb..659029f5 100644
--- a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
+++ b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
@@ -552,7 +552,9 @@
-
+
+ Always
+
diff --git a/IOB-WIN-NEXT/IobNet/Ping.cs b/IOB-WIN-NEXT/IobNet/Ping.cs
index 519606c9..3770b279 100644
--- a/IOB-WIN-NEXT/IobNet/Ping.cs
+++ b/IOB-WIN-NEXT/IobNet/Ping.cs
@@ -21,6 +21,9 @@ namespace IOB_WIN_NEXT.IobNet
lastPzCountSend = adesso;
lastWarnODL = adesso;
vetoCheckStatus = adesso;
+ // 2023.09.05 imposto anche primo ping e check disconnected...
+ lastPING = adesso;
+ lastDisconnCheck = adesso;
var POWEROFF_TIMEOUT_SEC = getOptPar("POWEROFF_TIMEOUT_SEC");
if (!string.IsNullOrEmpty(POWEROFF_TIMEOUT_SEC))
{
@@ -29,6 +32,19 @@ namespace IOB_WIN_NEXT.IobNet
lgDebug($"L'adapter effettuera' PING di controllo all'indirizzo {cIobConf.cncPingAddr} per forzare stato poweroff dopo {PoweroffTimeoutSec} sec");
}
+ public override void startAdapter(bool resetQueue)
+ {
+ base.startAdapter(resetQueue);
+ // 2023.09.05 imposto anche primo ping e check disconnected...
+ DateTime adesso = DateTime.Now;
+ lastWatchDog = adesso;
+ lastPING = adesso;
+ lastReadPLC = adesso;
+ lastDisconnCheck = adesso;
+ // faccio un primo check
+ tryConnect();
+ }
+
#endregion Public Constructors
#region Public Methods