diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs
index 81e14e38..fe4017f2 100644
--- a/IOB-WIN/IobGeneric.cs
+++ b/IOB-WIN/IobGeneric.cs
@@ -3187,9 +3187,13 @@ namespace IOB_WIN
contapezzi += qtyAdded;
#endif
lgInfo($"Inviato incremento contapezzi: send {numIncr} | resp {qtyAdded}");
+ // invio conferma contapezzi..
+ string retVal = utils.callUrl($"{urlSetPzCount}{contapezzi}");
}
}
currDispData.newUrlCallData = lastUrl;
+ currDispData.counter = contapezzi;
+ currDispData.semOut = Semaforo.SV;
raiseRefresh(currDispData);
}
}
diff --git a/IOB-WIN/IobSimula.cs b/IOB-WIN/IobSimula.cs
index d27fd014..080ecd06 100644
--- a/IOB-WIN/IobSimula.cs
+++ b/IOB-WIN/IobSimula.cs
@@ -74,6 +74,10 @@ namespace IOB_WIN
///
protected int minDurataODL = 480;
///
+ /// variabile di appoggio x stato segnale contapezzo
+ ///
+ protected bool sigPzCount = false;
+ ///
/// estende l'init della classe base...
///
///
@@ -274,11 +278,33 @@ namespace IOB_WIN
// SE IOB online...
if (IobOnline)
{
- // invio SOLO SE sono OLTRE i numSim pz e li invio TUTTI in blocco
- if ((lastCountCNC - contapezzi) > minSendPzCountBlock)
+ // se il contapezzi è OLTRE il valore inviato....
+ if (lastCountCNC > contapezzi)
{
- trySendPzCountBlock();
- lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
+ // invio SOLO SE sono OLTRE i numSim pz e li invio TUTTI in blocco
+ if ((lastCountCNC - contapezzi) > minSendPzCountBlock)
+ {
+ trySendPzCountBlock();
+ lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
+ sigPzCount = false;
+ }
+ // altrimenti invio 1 segnale
+ else
+ {
+ // se NON STAVA inviando di già...
+ if (!sigPzCount)
+ {
+ // segnalo BIT (1 pz)
+ B_input += (1 << 2);
+ sigPzCount = true;
+ contapezzi++;
+ }
+ else
+ {
+ sigPzCount = false;
+ }
+ }
+
}
}
}
@@ -327,7 +353,7 @@ namespace IOB_WIN
{
// salvo nuovo contapezziPLC (incremento RAND 0..5)
var rand = new Random();
- int delta = rand.Next(1, 5);
+ int delta = rand.Next(1, 10);
if (!isMulti)
{
lastCountCNC += delta;
@@ -415,6 +441,12 @@ namespace IOB_WIN
B_input += (1 << 7);
}
}
+
+ // init obj display
+ newDisplayData currDispData = new newDisplayData();
+ currDispData.counter = contapezzi;
+ currDispData.semOut = Semaforo.SV;
+ raiseRefresh(currDispData);
}
}
diff --git a/Jenkinsfile b/Jenkinsfile
index dcfd3945..92e959f9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -16,7 +16,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=609']) {
+ withEnv(['NEXT_BUILD_NUMBER=610']) {
// env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO-IOB-WIN'