Aggiunti overrides (lasciato disattivato...)

This commit is contained in:
Samuele E. Locatelli
2017-11-16 18:34:11 +01:00
parent 4e7f711db4
commit cacc60c91f
5 changed files with 96 additions and 16 deletions
+1
View File
@@ -9,6 +9,7 @@
<add key="enableTest" value="true" />
<add key="enableContapezzi" value="true" />
<add key="enableMode" value="true" />
<add key="enableOverrides" value="false" />
<add key="doMemDump" value="false" />
<add key="doSampleMemory" value="false" />
<add key="basePrgMemPath" value="CNCMEMUSERPATH1" />
+37 -5
View File
@@ -458,12 +458,12 @@ namespace IOB_WIN
//string numAlarm = answ.alarm.ToString();
// preparo i singoli valori dell'array...
//outVal.Add("DYNDATA", string.Format("{0}#{1}#{2}", actf, acts, numAlarm));
outVal.Add("DYNDATA", string.Format("FEED {0} | SPEED_RPM {1}", actf, acts));
outVal.Add("DYNDATA", string.Format("FEED {0}#SPEED_RPM {1}", actf, acts));
if (utils.CRB("SendFeedSpeed"))
{
outVal.Add("FEED", actf);
outVal.Add("SPEED_RPM", acts);
//outVal.Add("NUM_ALARM", numAlarm);
//outVal.Add("NUM_ALARM", numAlarm);
}
if (utils.CRB("SendAxPos"))
{
@@ -484,10 +484,42 @@ namespace IOB_WIN
}
return outVal;
}
public override void processOverride()
/// <summary>
/// Recupero dati override
/// </summary>
/// <returns></returns>
public override Dictionary<string, string> getOverrides()
{
base.processOverride();
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
{
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)
{
lg.Error(exc, "Errore in getOverrides");
}
}
return outVal;
}
/// <summary>
+44 -2
View File
@@ -152,6 +152,10 @@ namespace IOB_WIN
/// Ultimo DynData letto
/// </summary>
public string lastDynData { get; set; }
/// <summary>
/// Ultimo Override set letto
/// </summary>
public string lastOverride { get; set; }
/// <summary>
/// Array dei contatori x segnali blinking
@@ -1497,6 +1501,15 @@ namespace IOB_WIN
return outVal;
}
/// <summary>
/// Restituisce info OVERRIDES
/// </summary>
/// <returns></returns>
public virtual Dictionary<string, string> getOverrides()
{
Dictionary<string, string> outVal = new Dictionary<string, string>();
return outVal;
}
/// <summary>
/// Restituisce programma in esecuzione
/// </summary>
public virtual string getPrgName()
@@ -1580,7 +1593,7 @@ namespace IOB_WIN
}
else
{
currDynData.Add("DYN-DEMO", string.Format("D-{0:HHmm}", DateTime.Now));
currDynData.Add("DYNDATA", string.Format("D-{0:HHmm}", DateTime.Now));
}
// verifico SE sia cambiato il programma...
if (lastDynData != currDynData["DYNDATA"])
@@ -1607,7 +1620,36 @@ namespace IOB_WIN
/// Effettua processing del recupero delle OVERRIDE (spindle, feedrate, rapid)
/// </summary>
public virtual void processOverride()
{ }
{
Dictionary<string, string> currOverride = new Dictionary<string, string>();
if (!DemoIn)
{
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)
{
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;
}
}
}
/// <summary>
/// metodo dummy x salvataggio aree memoria conf x CN
/// </summary>
+13 -8
View File
@@ -12,23 +12,28 @@ OK - salvataggio su file dello storico eventi rilevati
OK - gestione dei segnali ballerini (BITMASK!)
OK - gestione contapezzi CUSTOM
- fare gestione configurabile lettura FANUC
- togliere dati G43
OK - gestione dati G43
- togliere dati F (E0 | 90)
- fare integrazione ALTRI varori FANUC, tra cui
- allarmi
- load/speed
- nuovo metodo chiamata x MP/IO (che dovrà avere nuovo comando x accettare queste chiamate e salvare su tabella SENZA processing, come eventi o come extra... evento NOTA?)
OK - load/speed
- override
OK - nuovo metodo chiamata x MP/IO (che dovrà avere nuovo comando x accettare queste chiamate e salvare su tabella SENZA processing, come eventi o come extra... evento NOTA?)
- verificare segnali: (vedi doc gsheet)
- F001.0: ALARM_PRESENT
- F001.7: CN_READY / POWER_ON
- STL000.5: AUTO (vers 1)
- STL000.7: AUTO (vers 2)
- Cambiare ordine valutazione eventi frequenza VLF-->VHF
- Azzerare I contatori quanto si arriva al più lento (quando si azzera lui ripartono comunque tutti...) -> in questo modo scatta un contatore QUANDO GENERAL_COUNTER MOD periodo_Ccntatore == 0
- rendere parametrica l'assegnazione delel funzioni al diverso ambito frequenza tra i 5 (VHF, HF, NF, LF, VLF)
- procedura x gestione dati REALTIME (da NON salvare su db ma al limite su REDIS, simil EQN con 2 tab x eliminare dati scaduti)
FINIRE SISTEMAZIONE JETCO:
- install servers
- install DB
- conf acquisitore togliendo parti abbozzate x contapezzi/fineciclo
OK FINIRE SISTEMAZIONE JETCO:
OK - install servers
OK - install DB
OK - conf acquisitore togliendo parti abbozzate x contapezzi/fineciclo
OK - part program name MAIN con nuova funzione
CREARE NUOVO SW (o configurazione? o ramo alternativo a develop?) x mapping INIZIALE della macchina... ad esempio
Vendored
+1 -1
View File
@@ -14,7 +14,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=176']) {
withEnv(['NEXT_BUILD_NUMBER=177']) {
// 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'