Bozza prime modifiche SIEMENS da testare in prod...
This commit is contained in:
@@ -28,6 +28,12 @@ namespace IOB_UT_NEXT.Config.Base
|
||||
/// </summary>
|
||||
public string ChangeOdlMode { get; set; } = "TIME";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Periodo minimo tra richieste ODL corrente al server remoto
|
||||
/// </summary>
|
||||
public double VetoCheckOdlSec { get; set; } = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Disabilitazione gestione ODL (lettura e gestione)
|
||||
/// </summary>
|
||||
|
||||
@@ -1346,12 +1346,25 @@ namespace IOB_WIN_FORM.Iob
|
||||
/// </summary>
|
||||
protected int CurrOdl()
|
||||
{
|
||||
int answ = 0;
|
||||
string sCurrODL = utils.callUrl(urlGetCurrODL);
|
||||
int.TryParse(sCurrODL, out answ);
|
||||
return answ;
|
||||
int cODL = 0;
|
||||
// vieto controllo prima di 5 sec... da configurare?
|
||||
if (DateTime.Now.Subtract(vetoCheckOdl).TotalSeconds > IOBConfFull.Odl.VetoCheckOdlSec)
|
||||
{
|
||||
|
||||
string sCurrODL = utils.CallUrlGet(urlGetCurrODL);
|
||||
int.TryParse(sCurrODL, out cODL);
|
||||
currIdxODL = cODL;
|
||||
vetoCheckOdl = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
cODL = currIdxODL;
|
||||
}
|
||||
return cODL;
|
||||
}
|
||||
|
||||
private DateTime vetoCheckOdl = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge o aggiorna nDict ad un Dict
|
||||
/// </summary>
|
||||
|
||||
@@ -20,7 +20,6 @@ CLI_INST=SteamWareSim
|
||||
|
||||
;NB: mettere copy always ai file di conf x fare test...
|
||||
;STARTLIST=PIZ08
|
||||
;STARTLIST=3020
|
||||
;STARTLIST=1032
|
||||
;STARTLIST=1033
|
||||
;STARTLIST=1034
|
||||
@@ -36,7 +35,8 @@ CLI_INST=SteamWareSim
|
||||
;STARTLIST=GT554
|
||||
;STARTLIST=PIZ08
|
||||
;STARTLIST=iBTB1P
|
||||
STARTLIST=3010
|
||||
;STARTLIST=3010
|
||||
STARTLIST=3020
|
||||
;STARTLIST=PIZ03
|
||||
|
||||
MAXCNC=10
|
||||
|
||||
@@ -186,18 +186,18 @@
|
||||
<None Include="DATA\CONF\1037.json" />
|
||||
<None Include="DATA\CONF\1038.ini" />
|
||||
<None Include="DATA\CONF\1038.json" />
|
||||
<None Include="DATA\CONF\3010.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3010_alarm.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3010.ini" />
|
||||
<None Include="DATA\CONF\3010_alarm.json" />
|
||||
<None Include="DATA\CONF\3011.ini" />
|
||||
<None Include="DATA\CONF\3011_alarm.json" />
|
||||
<None Include="DATA\CONF\3013.ini" />
|
||||
<None Include="DATA\CONF\3017.ini" />
|
||||
<None Include="DATA\CONF\3020.ini" />
|
||||
<None Include="DATA\CONF\3020_alarm.json" />
|
||||
<None Include="DATA\CONF\3020.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3020_alarm.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\GIACO_NWSE.ini" />
|
||||
<None Include="DATA\CONF\GIACO_NWSE.json" />
|
||||
<None Include="DATA\CONF\GIACO_NWSE_alarm.json" />
|
||||
|
||||
@@ -350,6 +350,17 @@ namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
// procedo SOLO SE è enabled IOB
|
||||
if (IobOnline)
|
||||
{
|
||||
// 2026.04.24 controllo ODL solo se son passati ALMENO 10 sec
|
||||
int newIdx = CurrOdl();
|
||||
currODL = $"{currIdxODL}";
|
||||
#if DEBUG
|
||||
lgInfo($"SiemensTorri | Verifica ODL | IdxODL {currIdxODL}");
|
||||
#else
|
||||
lgDebug($"SiemensTorri | Verifica ODL | IdxODL {currIdxODL}");
|
||||
#endif
|
||||
|
||||
// 2026.04.24 tolto gestione ridondante
|
||||
#if false
|
||||
try
|
||||
{
|
||||
currODL = utils.callUrl(urlGetCurrODL);
|
||||
@@ -380,6 +391,7 @@ namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
lastWarnODL = DateTime.Now;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -387,10 +399,12 @@ namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
currODL = "";
|
||||
if (periodicLog)
|
||||
{
|
||||
lgInfo($"Fanuc | Lettura ODL non effettuata: IobOnline: {IobOnline} | currODL impostato a vuoto");
|
||||
lgInfo($"Fanuc | Lettura ODL non effettuata: IobOnline: {IobOnline} | currODL: {currODL} | currIdxODL: {currIdxODL}");
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(currODL) && currODL != "0")
|
||||
|
||||
//if (!string.IsNullOrEmpty(currODL) && currODL != "0")
|
||||
if (!string.IsNullOrEmpty(currODL) && currIdxODL > 0)
|
||||
{
|
||||
// ora processo il contapezzi...
|
||||
string retVal = "";
|
||||
@@ -415,6 +429,7 @@ namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
// registro contapezzi
|
||||
lgInfo($"Differenza Contapezzi: contapezziPLC: {contapezziPLC} | contapezziIOB: {contapezziIOB}");
|
||||
}
|
||||
|
||||
if ((contapezziPLC > contapezziIOB))
|
||||
{
|
||||
// salvo nuovo contapezzi (incremento di 1...) + richiesta refresh conteggio
|
||||
@@ -471,7 +486,7 @@ namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
// log opzionale!
|
||||
if (verboseLog)
|
||||
{
|
||||
lgInfo("Trasformazione B_input: {B_input}");
|
||||
lgInfo($"Trasformazione B_input: {B_input}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user