Siemens: correzione gestione contapezzi limitato in delta troppo elevato all'avvio...
This commit is contained in:
@@ -169,10 +169,16 @@
|
||||
<None Include="DATA\CONF\EV101.json" />
|
||||
<None Include="DATA\CONF\EV102.ini" />
|
||||
<None Include="DATA\CONF\EV102.json" />
|
||||
<None Include="DATA\CONF\EV103.ini" />
|
||||
<None Include="DATA\CONF\EV103.json" />
|
||||
<None Include="DATA\CONF\EV105.ini" />
|
||||
<None Include="DATA\CONF\EV105.json" />
|
||||
<None Include="DATA\CONF\EV106.ini" />
|
||||
<None Include="DATA\CONF\EV106.json" />
|
||||
<None Include="DATA\CONF\EV107.ini" />
|
||||
<None Include="DATA\CONF\EV107.json" />
|
||||
<None Include="DATA\CONF\EV108.ini" />
|
||||
<None Include="DATA\CONF\EV108.json" />
|
||||
<None Include="DATA\CONF\EV109.ini" />
|
||||
<None Include="DATA\CONF\EV109.json" />
|
||||
<None Include="DATA\CONF\EV110.ini" />
|
||||
|
||||
@@ -3627,6 +3627,11 @@ namespace IOB_WIN_FORM.Iob
|
||||
/// </summary>
|
||||
protected DateTime adpStartRun;
|
||||
|
||||
/// <summary>
|
||||
/// DataOra avvio Programma x check avvio
|
||||
/// </summary>
|
||||
protected DateTime prgStarted = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Vettore 32 BIT valori in ingresso al filtro
|
||||
/// </summary>
|
||||
|
||||
@@ -32,8 +32,9 @@ CLI_INST=SteamWareSim
|
||||
;STARTLIST=VL22,VL23,VL24,VL25
|
||||
;STARTLIST=VL20,VL21,VL26
|
||||
;STARTLIST=VL26
|
||||
STARTLIST=PIZ08
|
||||
;STARTLIST=PIZ08
|
||||
;STARTLIST=VL25
|
||||
STARTLIST=GT554
|
||||
|
||||
|
||||
MAXCNC=10
|
||||
@@ -192,7 +192,9 @@
|
||||
<None Include="DATA\CONF\GIACO_NWSE.json" />
|
||||
<None Include="DATA\CONF\GIACO_NWSE_alarm.json" />
|
||||
<None Include="DATA\CONF\GT507.ini" />
|
||||
<None Include="DATA\CONF\GT554.ini" />
|
||||
<None Include="DATA\CONF\GT554.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\GT557.ini" />
|
||||
<None Include="DATA\CONF\GT693.ini" />
|
||||
<None Include="DATA\CONF\GT693.json" />
|
||||
|
||||
@@ -350,11 +350,13 @@ namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
// proseguo SOLO SE ho un pzCount > 0...
|
||||
if (pzCountAll >= 0)
|
||||
{
|
||||
// 2025.02.26 aggiunto controllo che non sia appena avviato IOB
|
||||
bool isJustStarted = DateTime.Now.Subtract(prgStarted).TotalMinutes < 3;
|
||||
// verifico il NUOVO contapezzi PRIMA di accettare ogni incremento...
|
||||
int deltaPzCount = pzCountAll - contapezziPLC;
|
||||
double maxDelta = DateTime.Now.Subtract(plcLastPzRead).TotalMinutes / (plcAvgTc / 60);
|
||||
// se incremento superiore del doppio atteso --> segnalo errore e NON accetto
|
||||
if (deltaPzCount > maxDelta * (maxPzDeltaPerc / 100))
|
||||
// se incremento superiore del doppio atteso e NON parto da zero pezzi = appena avviato --> segnalo errore e NON accetto
|
||||
if (deltaPzCount > maxDelta * (maxPzDeltaPerc / 100) && !isJustStarted)
|
||||
{
|
||||
lgError($"[DELTA CHECK]: intremento contapezziPLC troppo elevato: lettura {pzCountAll} | contapezzi attuale: {contapezziPLC} | ultima lettura PLC: {plcLastPzRead} | TCiclo medio: {plcAvgTc}s | incremento accettato ");
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using IOB_UT_NEXT.Config;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
{
|
||||
@@ -197,7 +198,15 @@ namespace IOB_WIN_SIEMENS.IobSiemens
|
||||
{
|
||||
try
|
||||
{
|
||||
currODL = utils.callUrl(urlGetCurrODL);
|
||||
currODL = utils.callUrlNow(urlGetCurrODL);
|
||||
#if false
|
||||
// se nullo riprovo...
|
||||
if (string.IsNullOrEmpty(currODL))
|
||||
{
|
||||
Task.Delay(1000);
|
||||
currODL = utils.callUrl(urlGetCurrODL);
|
||||
}
|
||||
#endif
|
||||
// solo SE HO un ODL...
|
||||
if (string.IsNullOrWhiteSpace(currODL) || currODL == "0")
|
||||
{
|
||||
|
||||
@@ -46,7 +46,8 @@ REM ROBOCOPY %2 \\10.51.90.6\Steamware\IOB-WIN-SIEMENS-DEB /MIR
|
||||
REM ROBOCOPY %2 Z:\IOB-WIN-SIEMENS-DEB /MIR
|
||||
REM ROBOCOPY %2 \\10.51.90.9\Steamware\IOB-WIN-SIEMENS-DEB /MIR
|
||||
REM ROBOCOPY %2 \\10.51.90.10\Steamware\IOB-WIN-SIEMENS-DEB /MIR
|
||||
ROBOCOPY %2 \\10.51.90.11\Steamware\IOB-WIN-SIEMENS-DEB /MIR
|
||||
REM ROBOCOPY %2 \\10.51.90.11\Steamware\IOB-WIN-SIEMENS-DEB /MIR
|
||||
ROBOCOPY %2 \\10.51.90.13\Steamware\IOB-WIN-SIEMENS-DEB /MIR
|
||||
|
||||
goto END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user