- correzione parametri init da OPT-PAR
- aggiunta gestione min refresh forzato (default 15 sec)
This commit is contained in:
Samuele Locatelli
2026-03-05 08:42:21 +01:00
parent dcaafbf10e
commit 237b3fa94c
14 changed files with 632 additions and 52 deletions
+5
View File
@@ -87,6 +87,11 @@ namespace IOB_UT_NEXT.Config.Base
/// </summary>
public bool EnabProgName { get; set; } = false;
/// <summary>
/// Tempo minimo di refresh ammesso (es: per current da MTConnect)
/// </summary>
public int MinRefreshPeriodSec { get; set; } = 20;
/// <summary>
/// Tempo minimo ammissibile di risposta (es x errori ModBus che risponde troppo in fretta) in millisec
/// </summary>
+2
View File
@@ -263,6 +263,7 @@ namespace IOB_UT_NEXT.Config
ExeModeCheckBypass = bool.Parse(fIni.ReadString("OPTPAR", "EXEMODE_CHECK_BYPASS", "false")),
Model = fIni.ReadString("MACHINE", "MODEL", "ND"),
MinRespTimeMs = fIni.ReadInteger("OPTPAR", "MIN_RESP_TIME_MS", 5),
MinRefreshPeriodSec = fIni.ReadInteger("OPTPAR", "MIN_REF_PERIOD_SEC", 15),
MultiIobListRaw = fIni.ReadString("OPTPAR", "IOB_MULTI_CNAME", ""),
NumArtMode = fIni.ReadString("OPTPAR", "SET_NUM_ART", ""),
NumOdlMode = fIni.ReadString("OPTPAR", "SET_NUM_COM", ""),
@@ -292,6 +293,7 @@ namespace IOB_UT_NEXT.Config
exclOptPar.Add("IOB_MULTI_CNAME");
exclOptPar.Add("MAX_TRY_PING");
exclOptPar.Add("MIN_RESP_TIME_MS");
exclOptPar.Add("MIN_REF_PERIOD_SEC");
exclOptPar.Add("NO_PING");
exclOptPar.Add("POWEROFF_TIMEOUT_SEC");
exclOptPar.Add("PZCAD_MODE");
+45 -32
View File
@@ -1,53 +1,66 @@
{
"keyPartCount": "m30c1",
"keyPartReq": "lpremain",
"keyPartCount": "GD179N_p1_58",
"keyPartReq": "GD179N_p1_x58",
"keyPartId": "",
"keyProgName": "ncprog",
"keyRunMode": "mode",
"pingAsPowerOn": true,
"keyProgName": "GD179N_p1_52",
"keyRunMode": "GD179N_p1_49",
"pingAsPowerOn": false,
"condPowerOn": {
"keyName": "avail",
"keyName": "GD179N_dtop_2",
"targetValue": "AVAILABLE"
},
"condWork": [
{
"keyName": "rstat",
"keyName": "GD179N_p1_48",
"targetValue": "ACTIVE"
}
],
"fluxLogVeto": [
"tooltype",
"E_workmaterial",
"E_toolclearance",
"E_edgemeasure",
"E_cintpos",
"E_toolid",
"E_approxdiam",
"E_diamwear",
"E_toolmaterial",
"E_lengthwear",
"E_actualdiam",
"E_flutes",
"E_probetype",
"E_approxlength"
"E_GD179N_p1_50",
"E_GD179N_p1_51",
"E_GD179N_p1_53",
"E_GD179N_p1_54",
"E_GD179N_p1_56",
"E_GD179N_p1_57",
"E_GD179N_p1_63",
"E_GD179N_p1_64",
"E_GD179N_p1_65",
"E_GD179N_p1_66",
"E_GD179N_p1_67",
"E_GD179N_p1_68",
"E_GD179N_p1_69",
"E_GD179N_p1_x57",
"S_GD179N_p1_70",
"S_GD179N_p1_71",
"S_GD179N_p1_72"
],
"fluxLogVetoContains": [
"E_macrorange"
"S_GD179N_Z_",
"S_GD179N_Y_",
"S_GD179N_X_",
"S_GD179N_C_",
"S_GD179N_B_",
"S_GD179N_A_",
"C_GD179N_A_",
"C_GD179N_B_",
"C_GD179N_C_",
"C_GD179N_X_",
"C_GD179N_Y_",
"C_GD179N_Z_"
],
"itemTranslation": {
"avail": "Machine Available",
"rstat": "Execution Mode",
"mode": "Controller Mode",
"ncprog": "Program Name",
"m30c1": "Contapezzi",
"lpremain": "Qta Richiesta",
"fdovrd": "PATH FEED OVERRIDE",
"rovrd": "PATH RAPID OVERRIDE"
"GD179N_dtop_2": "Machine Available",
"E_GD179N_p1_48": "Execution Mode",
"E_GD179N_p1_49": "Controller Mode",
"E_GD179N_p1_52": "Program Name",
"E_GD179N_p1_58": "Contapezzi",
"E_GD179N_p1_x58": "Qta Richiesta",
"E_GD179N_p1_61": "PATH FEED OVERRIDE",
"E_GD179N_p1_62": "PATH RAPID OVERRIDE"
},
"paramsEndThresh": {
"PosAct": 50,
"PosTgt": 50,
"InvDDone": 50,
"runtime": 5
"InvDDone": 50
}
}
+76
View File
@@ -0,0 +1,76 @@
;Configurazione IOB-WIN
[IOB]
;Centro di lavoro HAAS MTConnect
CNCTYPE=MTConnect
PING_MS_TIMEOUT=500
[MACHINE]
VENDOR=HAAS
MODEL=UMC-500
[CNC]
IP=192.168.14.46
;IP=192.168.0.32
PORT=8082
GETPRGNAME=true
[SERVER]
MPIP=http://192.168.1.64
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=DB9999.DBB0
ADDR_WRITE=DB9999.DBB0
SIZE_READ=0
SIZE_WRITE=0
;BIT0=CONN
;BIT1=DB60.DBB1
;BIT2=PZCOUNT.STD.DB700.DBW22
;BIT3=DB60.DBB3
;BIT4=DB60.DBB4
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
PZCOUNT_MODE=MTC
DISABLE_PZCOUNT=FALSE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
ENABLE_DYN_DATA=FALSE
FORCE_DYN_DATA=TRUE
ENABLE_DATA_FILTER=TRUE
ENABLE_MTC_RESTART=TRUE
DISABLE_SEND_WDST=TRUE
; conf parametri memoria READ/WRITE
MTC_PARAM_CONF=LVF652.json
[BRANCH]
NAME=master
; Tags manuali
[TAGS]
Customer=LVF
HostOS=WIN
HostName=Server-MAPO-IOB
HostAddr=192.168.1.208
+53
View File
@@ -0,0 +1,53 @@
{
"keyPartCount": "m30c1",
"keyPartReq": "lpremain",
"keyPartId": "",
"keyProgName": "ncprog",
"keyRunMode": "mode",
"pingAsPowerOn": true,
"condPowerOn": {
"keyName": "avail",
"targetValue": "AVAILABLE"
},
"condWork": [
{
"keyName": "rstat",
"targetValue": "ACTIVE"
}
],
"fluxLogVeto": [
"tooltype",
"E_addresscodes",
"E_workmaterial",
"E_toolclearance",
"E_edgemeasure",
"E_cintpos",
"E_toolid",
"E_approxdiam",
"E_diamwear",
"E_toolmaterial",
"E_lengthwear",
"E_actualdiam",
"E_flutes",
"E_probetype",
"E_approxlength"
],
"fluxLogVetoContains": [
"E_macrorange"
],
"itemTranslation": {
"avail": "Machine Available",
"rstat": "Execution Mode",
"mode": "Controller Mode",
"ncprog": "Program Name",
"m30c1": "Contapezzi",
"lpremain": "Qta Richiesta",
"fdovrd": "PATH FEED OVERRIDE",
"rovrd": "PATH RAPID OVERRIDE"
},
"paramsEndThresh": {
"PosAct": 50,
"PosTgt": 50,
"InvDDone": 50
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ CLI_INST=SteamWareSim
;STARTLIST=3024
;STARTLIST=SIMUL_01
;STARTLIST=FOV062
STARTLIST=LVF651
STARTLIST=LVF652
MAXCNC=10
+75
View File
@@ -0,0 +1,75 @@
;Configurazione IOB-WIN
[IOB]
;Centro di lavoro HAAS MTConnect
CNCTYPE=MTConnect
PING_MS_TIMEOUT=500
[MACHINE]
VENDOR=HAAS
MODEL=UMC-500
[CNC]
IP=192.168.14.39
PORT=8082
GETPRGNAME=true
[SERVER]
MPIP=http://192.168.1.64
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=DB9999.DBB0
ADDR_WRITE=DB9999.DBB0
SIZE_READ=0
SIZE_WRITE=0
;BIT0=CONN
;BIT1=DB60.DBB1
;BIT2=PZCOUNT.STD.DB700.DBW22
;BIT3=DB60.DBB3
;BIT4=DB60.DBB4
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
PZCOUNT_MODE=MTC
DISABLE_PZCOUNT=FALSE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
ENABLE_DYN_DATA=FALSE
FORCE_DYN_DATA=TRUE
ENABLE_DATA_FILTER=TRUE
ENABLE_MTC_RESTART=TRUE
DISABLE_SEND_WDST=TRUE
; conf parametri memoria READ/WRITE
MTC_PARAM_CONF=i658F.json
[BRANCH]
NAME=master
; Tags manuali
[TAGS]
Customer=LVF
HostOS=WIN
HostName=Server-MAPO-IOB
HostAddr=192.168.1.208
+57
View File
@@ -0,0 +1,57 @@
{
"keyPartCount": "m30c1",
"keyPartReq": "lpremain",
"keyPartId": "",
"keyProgName": "ncprog",
"keyRunMode": "mode",
"pingAsPowerOn": true,
"condPowerOn": {
"keyName": "avail",
"targetValue": "AVAILABLE"
},
"condWork": [
{
"keyName": "rstat",
"targetValue": "ACTIVE"
}
],
"fluxLogVeto": [
"tooltype",
"E_workmaterial",
"E_toolclearance",
"E_edgemeasure",
"E_cintpos",
"E_toolid",
"E_approxdiam",
"E_diamwear",
"E_toolmaterial",
"E_lengthwear",
"E_actualdiam",
"E_flutes",
"E_probetype",
"E_approxlength",
"E_macrorange1",
"E_macrorange2",
"E_macrorange3",
"E_macrorange4",
"E_macrorange5",
"E_macrorange6",
"E_maxfeedaccel"
],
"itemTranslation": {
"avail": "Machine Available",
"rstat": "Execution Mode",
"mode": "Controller Mode",
"ncprog": "Program Name",
"m30c1": "Contapezzi",
"lpremain": "Qta Richiesta",
"fdovrd": "PATH FEED OVERRIDE",
"rovrd": "PATH RAPID OVERRIDE"
},
"paramsEndThresh": {
"machineruntime": 300,
"PosAct": 50,
"PosTgt": 50,
"InvDDone": 50
}
}
+76
View File
@@ -0,0 +1,76 @@
;Configurazione IOB-WIN
[IOB]
;Centro di lavoro HAAS MTConnect
CNCTYPE=MTConnect
PING_MS_TIMEOUT=500
[MACHINE]
VENDOR=HAAS
MODEL=VF-1
[CNC]
IP=192.168.14.41
;IP=192.168.1.49
PORT=8082
GETPRGNAME=true
[SERVER]
MPIP=http://192.168.1.64
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=DB9999.DBB0
ADDR_WRITE=DB9999.DBB0
SIZE_READ=0
SIZE_WRITE=0
;BIT0=CONN
;BIT1=DB60.DBB1
;BIT2=PZCOUNT.STD.DB700.DBW22
;BIT3=DB60.DBB3
;BIT4=DB60.DBB4
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
PZCOUNT_MODE=MTC
DISABLE_PZCOUNT=FALSE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
ENABLE_DYN_DATA=FALSE
FORCE_DYN_DATA=TRUE
ENABLE_DATA_FILTER=TRUE
ENABLE_MTC_RESTART=TRUE
DISABLE_SEND_WDST=TRUE
; conf parametri memoria READ/WRITE
MTC_PARAM_CONF=iOKU1F.json
[BRANCH]
NAME=master
; Tags manuali
[TAGS]
Customer=LVF
HostOS=WIN
HostName=Server-MAPO-IOB
HostAddr=192.168.1.208
+52
View File
@@ -0,0 +1,52 @@
{
"keyPartCount": "m30c1",
"keyPartReq": "lpremain",
"keyPartId": "",
"keyProgName": "ncprog",
"keyRunMode": "mode",
"pingAsPowerOn": true,
"condPowerOn": {
"keyName": "avail",
"targetValue": "AVAILABLE"
},
"condWork": [
{
"keyName": "rstat",
"targetValue": "ACTIVE"
}
],
"fluxLogVeto": [
"S_xyzact",
"S_cyremtim",
"E_addresscodes",
"E_gcodes",
"E_L2p2block",
"E_L2p2line"
],
"itemTranslation": {
"avail": "Machine Available",
"rstat": "Execution Mode",
"mode": "Controller Mode",
"ncprog": "Program Name",
"m30c1": "Contapezzi",
"lpremain": "Qta Richiesta",
"fdovrd": "PATH FEED OVERRIDE",
"rovrd": "PATH RAPID OVERRIDE"
},
"paramsEndThresh": {
"L2p2SpindleRunTime": 1800,
"S_L2p2TotalSpindleRunTime": 1800,
"S_L2p2CuttingTime": 1800,
"S_L2p2TotalCuttingTime": 1800,
"S_L2Z2actw": 1200,
"S_L2Z2actm": 1200,
"S_L2X2load": 1200,
"S_L2X2actw": 1200,
"S_L2X2actm": 1200,
"S_L2Z1actm": 1200,
"S_L2S2SurfaceSpeedA": 1200,
"PosAct": 50,
"PosTgt": 50,
"InvDDone": 50
}
}
+75
View File
@@ -0,0 +1,75 @@
;Configurazione IOB-WIN
[IOB]
;Centro di lavoro Okuma MTConnect
CNCTYPE=MTConnect
PING_MS_TIMEOUT=500
[MACHINE]
VENDOR=Okuma
MODEL=Lathe 2SP-35HG
[CNC]
IP=192.168.14.51
;IP=192.168.0.47
PORT=5000
GETPRGNAME=true
[SERVER]
MPIP=http://192.168.1.64
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=DB9999.DBB0
ADDR_WRITE=DB9999.DBB0
SIZE_READ=0
SIZE_WRITE=0
;BIT0=CONN
;BIT1=DB60.DBB1
;BIT2=PZCOUNT.STD.DB700.DBW22
;BIT3=DB60.DBB3
;BIT4=DB60.DBB4
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
PZCOUNT_MODE=MTC
DISABLE_PZCOUNT=FALSE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
ENABLE_DYN_DATA=FALSE
FORCE_DYN_DATA=TRUE
ENABLE_DATA_FILTER=TRUE
ENABLE_MTC_RESTART=TRUE
; conf parametri memoria READ/WRITE
MTC_PARAM_CONF=iOKU1T.json
[BRANCH]
NAME=master
; Tags manuali
[TAGS]
Customer=LVF
HostOS=WIN
HostName=Server-MAPO-IOB
HostAddr=192.168.1.208
+78
View File
@@ -0,0 +1,78 @@
{
"keyEStop": "L2estop",
"keyPartCount": "L2p2partcount",
"keyPartReq": "",
"keyPartId": "",
"keyProgName": "L2p2program",
"keyRunMode": "L2p2mode",
"pingAsPowerOn": true,
"condPowerOn": {
"keyName": "L2avail",
"targetValue": "AVAILABLE"
},
"condWork": [
{
"keyName": "L2p2execution",
"targetValue": "ACTIVE"
}
],
"fluxLogVeto": [
"L2p1BlockNumber",
"L2p2BlockNumber",
"L2p1block",
"L2p1line",
"L2S1ChuckState",
"L2p1LPathPos",
"L2p1CommonVariable"
],
"itemTranslation": {
"L2avail": "Machine Available",
"L2p2execution": "Execution Mode",
"L2p2mode": "Controller Mode",
"L2p2program": "Program Name",
"L2p2partcount": "Contapezzi",
"L2estop": "Emergenza",
"p2Fovr": "PATH FEED OVERRIDE",
"rovrd": "PATH RAPID OVERRIDE",
"L2S1speed": "Spindle C1 Actual SPEED",
"L2S1load": "Spindle C1 LOAD",
"L2S1ovr": "Spindle C1 OVERRIDE",
"L2S2speed": "Spindle C2 Actual SPEED",
"L2S2load": "Spindle C2 LOAD",
"L2S2ovr": "Spindle C2 OVERRIDE",
"L2p1OperatingTime": "OPERATING TIME",
"L2p1RunningTime": "RUNNING TIME"
},
"paramsEndThresh": {
"PosAct": 50,
"PosTgt": 50,
"InvDDone": 50,
"L2Z1actw": 30,
"L2Z1actm": 10,
"L2X1actw": 50,
"L2Z1load": 10,
"L2X1actm": 100,
"L2S1speed": 100,
"L2S1load": 10,
"L2X1load": 10,
"L2S1ovr": 10,
"L2S2speed": 100,
"L2S2load": 10,
"L2Z2load": 5,
"L2S2ovr": 10,
"L2S1cmd": 100,
"L2p1OperatingTime": 1800,
"L2p1RunningTime": 1800,
"L2p1TotalRunningTime": 1800,
"L2p1TotalOperatingTime": 1800,
"L2p2OperatingTime": 1800,
"L2p2RunningTime": 1800,
"L2p2TotalRunningTime": 1800,
"L2p2TotalOperatingTime": 60,
"L2p1SpindleRunTime": 1800,
"L2p1TotalSpindleRunTime": 1800,
"L2p1TotalCuttingTime": 1800,
"L2p1CuttingTime": 1800,
"L2S1SurfaceSpeedA": 3600
}
}
+12 -8
View File
@@ -295,12 +295,12 @@
</Compile>
<None Include="DATA\CONF\3024.ini" />
<None Include="DATA\CONF\3024.json" />
<None Include="DATA\CONF\FOV062.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\FOV062.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\FOV062.ini" />
<None Include="DATA\CONF\FOV062.json" />
<None Include="DATA\CONF\iOKU1T.ini" />
<None Include="DATA\CONF\iOKU1T.json" />
<None Include="DATA\CONF\iOKU1F.ini" />
<None Include="DATA\CONF\iOKU1F.json" />
<None Include="DATA\CONF\LVF573.ini" />
<None Include="DATA\CONF\LVF573.json" />
<None Include="DATA\CONF\GT576.ini" />
@@ -311,12 +311,16 @@
<None Include="DATA\CONF\GT593.json" />
<None Include="DATA\CONF\GT594.ini" />
<None Include="DATA\CONF\GT594.json" />
<None Include="DATA\CONF\LVF651.ini">
<None Include="DATA\CONF\i658F.ini" />
<None Include="DATA\CONF\i658F.json" />
<None Include="DATA\CONF\LVF652.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\LVF651.json">
<None Include="DATA\CONF\LVF652.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\LVF651.ini" />
<None Include="DATA\CONF\LVF651.json" />
<None Include="DATA\CONF\GT652.ini" />
<None Include="DATA\CONF\GT652.json" />
<None Include="DATA\CONF\IMI_50.ini" />
+25 -11
View File
@@ -32,13 +32,14 @@ namespace IOB_WIN_MTC.Iob
/// <param name="IobConfFull">Configurazione (v 4.x)</param>
public MTConn(AdapterFormNext caller, IobConfTree IobConfFull) : base(caller, IobConfFull)
{
// gestione invio ritardato contapezzi
// gestione parametri da nuova IobConfFull
enableDataFilter = IobConfFull.FluxLog.EnableFilt;
MaxSecReload = IobConfFull.FluxLog.MaxSecReload;
readErrorMax = IobConfFull.Device.ReadErrorMax;
readErrorSleepTime = IobConfFull.Device.ReadErrorSleepTime;
enableCliRestart = IobConfFull.Device.Connect.EnableRestart;
// gestione data filtering...
if (!string.IsNullOrEmpty(getOptPar("ENABLE_DATA_FILTER")))
{
bool.TryParse(getOptPar("ENABLE_DATA_FILTER"), out enableDataFilter);
}
// gestione data unavailable = poweroff...
if (!string.IsNullOrEmpty(getOptPar("UNAVAIL_POWEROFF")))
{
@@ -52,16 +53,20 @@ namespace IOB_WIN_MTC.Iob
// gestione override contapezzi
// gestione restart OpcUa client...
if (!string.IsNullOrEmpty(getOptPar("ENABLE_CLI_RESTART")))
// vecchia gestione custom OPT_PAR
#if false
// gestione data filtering...
if (!string.IsNullOrEmpty(getOptPar("ENABLE_DATA_FILTER")))
{
bool.TryParse(getOptPar("ENABLE_CLI_RESTART"), out enableCliRestart);
}
bool.TryParse(getOptPar("ENABLE_DATA_FILTER"), out enableDataFilter);
}
// init MaxSecReload
if (!string.IsNullOrEmpty(getOptPar("MAX_ELAPSED_TIME_SEC")))
{
int.TryParse(getOptPar("MAX_ELAPSED_TIME_SEC"), out MaxSecReload);
}
// init gestione reset errori lettura
if (!string.IsNullOrEmpty(getOptPar("READ_ERROR_MAX")))
{
@@ -71,6 +76,13 @@ namespace IOB_WIN_MTC.Iob
{
int.TryParse(getOptPar("READ_ERROR_SLEEP_TIME"), out readErrorSleepTime);
}
// gestione restart OpcUa client...
if (!string.IsNullOrEmpty(getOptPar("ENABLE_CLI_RESTART")))
{
bool.TryParse(getOptPar("ENABLE_CLI_RESTART"), out enableCliRestart);
}
#endif
// init datetime counters
DateTime adesso = DateTime.Now;
@@ -1655,6 +1667,8 @@ namespace IOB_WIN_MTC.Iob
lgInfo("CURRENT received");
queueInEnabCurr = true;
connectionOk = true;
// se lastcurrent > MinRefreshPeriodSec sec --> forzo send...
bool forceSend = DateTime.Now.Subtract(lastCurrent).TotalSeconds > IOBConfFull.Device.MinRefreshPeriodSec;
lastCurrent = DateTime.Now;
if (document != null)
{
@@ -1662,7 +1676,7 @@ namespace IOB_WIN_MTC.Iob
{
lgInfo($"CurrentSuccessful: trovati {document.Streams.Count()} streams");
}
checkAndSend(document, true);
checkAndSend(document, forceSend);
}
else
{