COrretto gestione override (dava errore x memorie pasticciate tra dynData e overrides...)
This commit is contained in:
+18
-22
@@ -492,32 +492,28 @@ namespace IOB_WIN
|
||||
{
|
||||
Dictionary<string, string> outVal = new Dictionary<string, string>();
|
||||
inizio = DateTime.Now;
|
||||
|
||||
if (utils.CRB("enableOverrides"))
|
||||
// leggo da G0 a G30 perché DOVREBBE contenere tutto quanto mi serve: G12 FeedOver, G30 SpeedOver...
|
||||
try
|
||||
{
|
||||
// leggo da G0 a G30 perché DOVREBBE contenere tutto quanto mi serve: G12 FeedOver, G30 SpeedOver...
|
||||
try
|
||||
{
|
||||
inizio = DateTime.Now;
|
||||
int memIndex = 0;
|
||||
byte[] MemBlock = new byte[30];
|
||||
FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
inizio = DateTime.Now;
|
||||
int memIndex = 0;
|
||||
byte[] MemBlock = new byte[30];
|
||||
FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
|
||||
// SALVO! G12 e G30...
|
||||
string allG = "";
|
||||
for (int i = 0; i < MemBlock.Length; i++)
|
||||
{
|
||||
allG += string.Format("{0}:{1}#", i, MemBlock[i]);
|
||||
}
|
||||
outVal.Add("OVERRIDES", allG);
|
||||
//outVal.Add("FEED_OVER", string.Format("G10 {0}#G11 {1}#G12 {3}", MemBlock[10], MemBlock[11], MemBlock[12]));
|
||||
//outVal.Add("SPEED_OVER", string.Format("G27 {0}#G28 {1}#G29 {3}", MemBlock[27], MemBlock[28], MemBlock[29]));
|
||||
}
|
||||
catch (Exception exc)
|
||||
// SALVO! G12 e G30...
|
||||
string allG = "";
|
||||
for (int i = 0; i < MemBlock.Length; i++)
|
||||
{
|
||||
lg.Error(exc, "Errore in getOverrides");
|
||||
allG += string.Format("{0}:{1}#", i, MemBlock[i]);
|
||||
}
|
||||
outVal.Add("OVERRIDES", allG);
|
||||
//outVal.Add("FEED_OVER", string.Format("G10 {0}#G11 {1}#G12 {3}", MemBlock[10], MemBlock[11], MemBlock[12]));
|
||||
//outVal.Add("SPEED_OVER", string.Format("G27 {0}#G28 {1}#G29 {3}", MemBlock[27], MemBlock[28], MemBlock[29]));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Errore in getOverrides");
|
||||
}
|
||||
return outVal;
|
||||
}
|
||||
|
||||
+27
-24
@@ -1621,32 +1621,35 @@ namespace IOB_WIN
|
||||
/// </summary>
|
||||
public virtual void processOverride()
|
||||
{
|
||||
Dictionary<string, string> currOverride = new Dictionary<string, string>();
|
||||
if (!DemoIn)
|
||||
if (utils.CRB("enableOverrides"))
|
||||
{
|
||||
currOverride = getDynData();
|
||||
}
|
||||
else
|
||||
{
|
||||
currOverride.Add("OVERRIDES", string.Format("D-{0:HHmm}", DateTime.Now));
|
||||
}
|
||||
// verifico SE sia cambiato il programma...
|
||||
if (lastOverride != currOverride["OVERRIDES"])
|
||||
{
|
||||
// salvo!
|
||||
lastDynData = currOverride["OVERRIDES"];
|
||||
// per ogni valore del dizionario mostro ed accodo!
|
||||
string sVal = "";
|
||||
foreach (var item in currOverride)
|
||||
Dictionary<string, string> currOverride = new Dictionary<string, string>();
|
||||
if (!DemoIn)
|
||||
{
|
||||
sVal = string.Format("[OVERRIDES]{0}|{1}", item.Key, item.Value);
|
||||
displayOtherData(sVal);
|
||||
// --> accodo (valore già formattato)!
|
||||
QueueFLog.Enqueue(qEncodeFLog(item.Key, item.Value));
|
||||
// Gestione counter FLog!
|
||||
counterFLog++;
|
||||
// se supera 10k resetto...
|
||||
if (counterFLog > 9999) counterFLog = 0;
|
||||
currOverride = getOverrides();
|
||||
}
|
||||
else
|
||||
{
|
||||
currOverride.Add("OVERRIDES", string.Format("D-{0:HHmm}", DateTime.Now));
|
||||
}
|
||||
// verifico SE sia cambiato il programma...
|
||||
if (lastOverride != currOverride["OVERRIDES"])
|
||||
{
|
||||
// salvo!
|
||||
lastOverride = currOverride["OVERRIDES"];
|
||||
// per ogni valore del dizionario mostro ed accodo!
|
||||
string sVal = "";
|
||||
foreach (var item in currOverride)
|
||||
{
|
||||
sVal = string.Format("[OVERRIDES]{0}|{1}", item.Key, item.Value);
|
||||
displayOtherData(sVal);
|
||||
// --> accodo (valore già formattato)!
|
||||
QueueFLog.Enqueue(qEncodeFLog(item.Key, item.Value));
|
||||
// Gestione counter FLog!
|
||||
counterFLog++;
|
||||
// se supera 10k resetto...
|
||||
if (counterFLog > 9999) counterFLog = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=179']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=180']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.15.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.15.${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