Merge branch 'develop'
This commit is contained in:
Binary file not shown.
+27
-6
@@ -449,6 +449,10 @@ namespace IOB_WIN
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Data/ora ultima volta che IOB è stato dichairato online
|
||||
/// </summary>
|
||||
public DateTime lastIobOnline = DateTime.Now.AddHours(-1);
|
||||
/// <summary>
|
||||
/// Dizionario di VC da trattare come TimeSeries (con conf decodificata + processing successivo...)
|
||||
/// </summary>
|
||||
protected Dictionary<string, VCData> TSVC_Data = new Dictionary<string, VCData>();
|
||||
@@ -978,7 +982,7 @@ namespace IOB_WIN
|
||||
{
|
||||
// NON AGGIORNO
|
||||
contapezzi = lastCountCNC;
|
||||
lgInfo(string.Format("Errore lettura ODL: {0} - uso lastCountCNC --> {1}", lastIdxODL, contapezzi));
|
||||
lgInfo($"Errore lettura ODL (vuoto) resta tutto invariato contapezzi: {contapezzi} | lastCountCNC {lastCountCNC}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2759,6 +2763,7 @@ namespace IOB_WIN
|
||||
{
|
||||
// non controllo x meno...
|
||||
dtVetoCheckIOB = DateTime.Now.AddMilliseconds(baseUtils.nextPauseSendMSec * 5);
|
||||
lastIobOnline = DateTime.Now;
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -3143,9 +3148,7 @@ namespace IOB_WIN
|
||||
/// - invio in blocco pezzi
|
||||
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
|
||||
/// </summary>
|
||||
/// <param name="contapezzi"></param>
|
||||
/// <param name="lastCountCNC"></param>
|
||||
public void trySendPzCountBlock(ref int contapezzi, int lastCountCNC)
|
||||
public void trySendPzCountBlock()
|
||||
{
|
||||
// in primis HA SENSO procedere SOLO SE server MP è Online...
|
||||
if (MPOnline)
|
||||
@@ -3155,10 +3158,12 @@ namespace IOB_WIN
|
||||
{
|
||||
int numIncr = 0;
|
||||
int qtyAdded = 0;
|
||||
int delta = lastCountCNC - contapezzi;
|
||||
// verifico se la funzione SIA abilitata
|
||||
if (enableSendPzCountBlock)
|
||||
{
|
||||
// rileggo qta da server...
|
||||
pzCntReload(true);
|
||||
int delta = lastCountCNC - contapezzi;
|
||||
// se è abilitata verifico differenza: se ho DELTA > minSendPzCountBlock --> invio un blocco <= maxSendPzCountBlock
|
||||
if (delta > minSendPzCountBlock)
|
||||
{
|
||||
@@ -3175,8 +3180,12 @@ namespace IOB_WIN
|
||||
int.TryParse(resp, out qtyAdded);
|
||||
if (qtyAdded > 0)
|
||||
{
|
||||
// rileggo qta da server...
|
||||
pzCntReload(true);
|
||||
#if false
|
||||
// incremento il contapezzi della quantità restituita e confermata
|
||||
contapezzi += qtyAdded;
|
||||
contapezzi += qtyAdded;
|
||||
#endif
|
||||
lgInfo($"Inviato incremento contapezzi: send {numIncr} | resp {qtyAdded}");
|
||||
}
|
||||
}
|
||||
@@ -3974,6 +3983,12 @@ namespace IOB_WIN
|
||||
if (answ.Contains("OK"))
|
||||
{
|
||||
currDispData.semOut = Semaforo.SV;
|
||||
// se oltre 1 min NON era online --> check pezzi!
|
||||
if (DateTime.Now.Subtract(lastIobOnline).TotalMinutes > 1)
|
||||
{
|
||||
pzCntReload(true);
|
||||
}
|
||||
lastIobOnline = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4040,6 +4055,12 @@ namespace IOB_WIN
|
||||
string answ = callUrl(lastUrl, false);
|
||||
// loggo!
|
||||
lgInfo(string.Format("[SEND] {0} -> {1}", queueVal, answ));
|
||||
// se oltre 1 min NON era online --> check pezzi!
|
||||
if (DateTime.Now.Subtract(lastIobOnline).TotalMinutes > 1)
|
||||
{
|
||||
pzCntReload(true);
|
||||
}
|
||||
lastIobOnline = DateTime.Now;
|
||||
// se "OK" verde, altrimenti errore --> ROSSO
|
||||
if (answ == "OK")
|
||||
{
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace IOB_WIN
|
||||
// verifico se variato contapezzi... e se passato ritardo minimo...
|
||||
if ((lastCountCNC - contapezzi) > minSendPzCountBlock)
|
||||
{
|
||||
trySendPzCountBlock(ref contapezzi, lastCountCNC);
|
||||
trySendPzCountBlock();
|
||||
// salvo nuovo contapezzi (incremento di 1...)
|
||||
contapezzi++;
|
||||
// salvo in semaforo!
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace IOB_WIN
|
||||
// invio SOLO SE sono OLTRE i numSim pz e li invio TUTTI in blocco
|
||||
if ((lastCountCNC - contapezzi) > minSendPzCountBlock)
|
||||
{
|
||||
trySendPzCountBlock(ref contapezzi, lastCountCNC);
|
||||
trySendPzCountBlock();
|
||||
lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
|
||||
}
|
||||
}
|
||||
@@ -325,9 +325,9 @@ namespace IOB_WIN
|
||||
}
|
||||
else if (bit2.wait <= 0)
|
||||
{
|
||||
// salvo nuovo contapezziPLC (incremento RAND 0..3)
|
||||
// salvo nuovo contapezziPLC (incremento RAND 0..5)
|
||||
var rand = new Random();
|
||||
int delta = rand.Next(0, 3);
|
||||
int delta = rand.Next(1, 5);
|
||||
if (!isMulti)
|
||||
{
|
||||
lastCountCNC += delta;
|
||||
@@ -344,8 +344,12 @@ namespace IOB_WIN
|
||||
// se NON Multi fa contapezzi...
|
||||
else
|
||||
{
|
||||
// segnalo BIT (1 pz)
|
||||
B_input += (1 << 2);
|
||||
// SE NON SONO GIA' OLTRE il contapezzi
|
||||
if (contapezzi < lastCountCNC)
|
||||
{
|
||||
// segnalo BIT (1 pz)
|
||||
B_input += (1 << 2);
|
||||
}
|
||||
}
|
||||
// decremento duration
|
||||
bit2.duration--;
|
||||
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=608']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=609']) {
|
||||
// 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'
|
||||
|
||||
Reference in New Issue
Block a user