eliminati commenti + conf iniziale BIGLIA x test
This commit is contained in:
@@ -25,7 +25,7 @@ CMDREBO=/sendReboot.aspx?idxMacchina=
|
||||
AREAG_SIZE=48
|
||||
AREAX_SIZE=0
|
||||
AREAY_SIZE=12
|
||||
; Red: Y3.2 | Yellow: !Y8.0 | Green Y4.5 | All DoorsClosed: Y4.0 (X5.1) | ..........WrkZone Y8.7
|
||||
; Red: Y3.2 | Yellow: !Y8.0 | Green Y4.5
|
||||
;BIT0=CONN
|
||||
BIT1=Y4.5
|
||||
BIT2=PZCOUNT
|
||||
|
||||
@@ -338,54 +338,6 @@ namespace IOB_WIN
|
||||
}
|
||||
}
|
||||
}
|
||||
// commento vecchia gestione TORNOS/CMZ...
|
||||
#if false
|
||||
// leggo SEMAFORI, leggo da Y8 ...leggo 3 bit in Y8..Y10 HARD CODED, rendere parametrico!!!
|
||||
byte[] MemBlock = new byte[4];
|
||||
|
||||
// da rivedere: cambio come leggo i dati hard coded in base al modello, RENDERE CMQ PARAMETRICO!!!
|
||||
if (currIobConf.vendor == "TORNOS" && currIobConf.model == "DT26")
|
||||
{
|
||||
MemBlock = new byte[4];
|
||||
// Red: Y8.4 | Yellow: Y8.5 | Green Y8.6 | WrkZone Y8.7 | All DoorsClosed: Y10.5
|
||||
int memIndex = 8;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.Y, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, 0, RawInput, 0, 4);
|
||||
// ora mi leggo 2 byte in area X... HARD CODED, rendere parametrico...
|
||||
MemBlock = new byte[2];
|
||||
// GESTIONE memoria endcycle
|
||||
// la variabile X7.0 (da 1 a 0) oppure la X7.1 (da 0 a 1) indica il CONTAPEZZI --> copio 2 byte!
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.X, 6, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-X", MemBlock.Length), stopwatch.ElapsedTicks);
|
||||
// riporto!
|
||||
Buffer.BlockCopy(MemBlock, 0, RawInput, 4, 2);
|
||||
// log
|
||||
if (verboseLog) lg.Info(string.Format("RawInput: {0}", utils.binaryForm((int)RawInput[0])));
|
||||
}
|
||||
else if (currIobConf.vendor == "CMZ" && currIobConf.model == "TA20")// caso CMZ
|
||||
{
|
||||
// appunti conf CMZ TA20
|
||||
// Red: Y3.7 | Yellow: Y3.6 | Green Y3.5 | All DoorsClosed: Y4.0 (X5.1) | ..........WrkZone Y8.7
|
||||
|
||||
// parto da indice zero... e leggo quanti conf da file ini...
|
||||
int memIndex = 0;
|
||||
stopwatch.Restart();
|
||||
FanucMemRW(R, FANUC.MemType.Y, memIndex, ref MemBlockY);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-Y", MemBlockY.Length), stopwatch.ElapsedTicks);
|
||||
// log
|
||||
if (verboseLog)
|
||||
{
|
||||
for (int i = 0; i < MemBlockY.Length; i++)
|
||||
{
|
||||
lg.Info(string.Format("MemBlockY{0}: {1}", i, utils.binaryForm((int)MemBlockY[i])));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
stopwatch.Stop();
|
||||
// salvo il solo BYTE dell'input decifrando il semaforo...
|
||||
decodeToBitmap();
|
||||
@@ -509,178 +461,6 @@ namespace IOB_WIN
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if false
|
||||
// leggo i byte interessati...
|
||||
int byteSem = RawInput[0];
|
||||
int byteCount = RawInput[5];
|
||||
if (verboseLog) lg.Info(string.Format("PrimoByte: {0}", byteSem));
|
||||
|
||||
|
||||
|
||||
// da rivedere: cambio come leggo i dati hard coded in base al modello, RENDERE CMQ PARAMETRICO!!!
|
||||
if (currIobConf.vendor == "TORNOS" && currIobConf.model == "DT26")
|
||||
{
|
||||
// B1: verde! Y8.6
|
||||
if ((byteSem & 64) > 0)
|
||||
{
|
||||
B_input += 1 << 1;
|
||||
}
|
||||
// B2: contapezzi da area X
|
||||
if ((byteCount & 2) > 0)
|
||||
{
|
||||
B_input += 1 << 2;
|
||||
}
|
||||
// B3: Rosso! Y8.4
|
||||
if ((byteSem & 16) > 0)
|
||||
{
|
||||
B_input += 1 << 3;
|
||||
}
|
||||
// B4: giallo! Y8.5
|
||||
if ((byteSem & 32) > 0)
|
||||
{
|
||||
B_input += 1 << 4;
|
||||
}
|
||||
}
|
||||
else if (currIobConf.vendor == "CMZ" && currIobConf.model == "TA20")// caso CMZ
|
||||
{
|
||||
// decodifico impiegando dictionary... cercando il TIPO di memoria & co...
|
||||
string bKey = "";
|
||||
string bVal = "";
|
||||
char area;
|
||||
string memArea = "";
|
||||
string[] memIdx;
|
||||
int bitNum = 0;
|
||||
int byteNum = 0;
|
||||
int byte2check = 0;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
bKey = string.Format("BIT{0}", i);
|
||||
// cerco se ci sia in LUT
|
||||
if (signLUT.ContainsKey(bKey))
|
||||
{
|
||||
// recupero nome variabile...
|
||||
bVal = signLUT[bKey];
|
||||
// se l'area è PZCOUNT... processo PUNTUALMENTE il CONTAPEZZI...
|
||||
if (bVal == "PZCOUNT")
|
||||
{
|
||||
// controllo se è passato intervallo minimo pre invio
|
||||
if (DateTime.Now >= lastPzCountSend.AddMilliseconds(pzCountDelay))
|
||||
{
|
||||
// resetto timer...
|
||||
lastPzCountSend = DateTime.Now;
|
||||
if (utils.CRB("enableContapezzi"))
|
||||
{
|
||||
try
|
||||
{
|
||||
// verifico quale modalità sia richiesta: STD (6711) oppure BIT (Custom, con indicazione area)
|
||||
if (currIobConf.optPar.Count > 0 && currIobConf.optPar["PZCOUNT_MODE"] != "")
|
||||
{
|
||||
if (currIobConf.optPar["PZCOUNT_MODE"] == "STD")
|
||||
{
|
||||
object output = new object();
|
||||
// processo parametro contapezzi (lavorati) !!!FARE!!! sposatre su ciclo + HF
|
||||
stopwatch.Restart();
|
||||
FANUC_ref.F_RW_Param_Integer(false, 6711, 3, ref output);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PAR", 4), stopwatch.ElapsedTicks);
|
||||
// salvo ultimo conteggio rilevato
|
||||
Int32.TryParse(output.ToString(), out lastCount);
|
||||
|
||||
// 6711: pezzi lavorati
|
||||
// 6712: pezzi lavorati totali
|
||||
// 6713: pezzi richiesti
|
||||
|
||||
// output!
|
||||
stopwatch.Stop();
|
||||
}
|
||||
else if (currIobConf.optPar["PZCOUNT_MODE"] == "BIT")
|
||||
{
|
||||
// posizioni DWord
|
||||
//1602:543809: NUM PEZZI x ciclo (6408..6411)
|
||||
//1603:5300: NUM PEZZI RICHIESTI (6412..6415)
|
||||
//1604:5007: NUM PEZZI FATTI (6416..6419)
|
||||
//1605:543809: NUM PEZZI TOTALI (6420..6423)
|
||||
|
||||
//[OPTPAR]
|
||||
//ENDCYCLE_MADDR=X7.1
|
||||
//PZ_CAD_MADDR=1602
|
||||
//PZ_REQ_MADDR=1603
|
||||
//PZ_DONE_MADDR=1604
|
||||
//PZ_GTOT_MADDR=1605
|
||||
|
||||
// LEGGO le memorie DW dei vari contatori
|
||||
|
||||
// salvo in area locale e confronto con precedenti, dove cambiato INVIO come dato aggiuntivo
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Errore in contapezzi FANUC");
|
||||
connectionOk = false;
|
||||
}
|
||||
}
|
||||
|
||||
// verifico se variato contapezzi in area STD PAR6711... e se passato ritardo minimo...
|
||||
if (lastCount > contapezzi)
|
||||
{
|
||||
// salvo nuovo contapezzi (incremento di 1...)
|
||||
contapezzi++;
|
||||
// salvo in semaforo!
|
||||
B_input += 1 << 2;
|
||||
// registro contapezzi
|
||||
lg.Info(string.Format("Contapezzi FANUC: {0} | Contapezzi interno {1}", lastCount, contapezzi));
|
||||
}
|
||||
else if (contapezzi > lastCount) // in questo caso resetto
|
||||
{
|
||||
contapezzi = lastCount;
|
||||
}
|
||||
// invio a server contapezzi (aggiornato)
|
||||
utils.callUrl(urlSetPzCount + contapezzi.ToString());
|
||||
}
|
||||
}
|
||||
else // area "normale" byte.bit
|
||||
{
|
||||
area = bVal[0];
|
||||
// altrimenti decodifico area...
|
||||
memArea = bVal.Substring(1, bVal.Length - 1);
|
||||
memIdx = memArea.Split('.');
|
||||
// calcolo bit e byte number...
|
||||
int.TryParse(memIdx[0], out byteNum);
|
||||
if (memIdx.Length > 1)
|
||||
{
|
||||
int.TryParse(memIdx[1], out bitNum);
|
||||
}
|
||||
// in base al nome cerco in una delle aree.. e prendo solo solo quel bit di quel byte...
|
||||
switch (area)
|
||||
{
|
||||
case 'G':
|
||||
byte2check = MemBlockG[byteNum];
|
||||
break;
|
||||
case 'X':
|
||||
byte2check = MemBlockX[byteNum];
|
||||
break;
|
||||
case 'Y':
|
||||
byte2check = MemBlockY[byteNum];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// controllo se il bit sia attivo...
|
||||
if ((byte2check & (1 << bitNum)) == (1 << bitNum))
|
||||
{
|
||||
B_input += 1 << i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// log opzionale!
|
||||
if (verboseLog) lg.Info(string.Format("Trasformazione B_input: {0}", B_input));
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.11.* → v.1.17.*</b>
|
||||
<b>v.1.11.* → v.1.18.*</b>
|
||||
<ul>
|
||||
<li>Inserimento controller SIEMENS con S7+ library</li>
|
||||
<li>Inserimento nuove letture FANUC x programmi</li>
|
||||
@@ -29,6 +29,8 @@
|
||||
<li>ottimizzazione fasi di restart in caso di assenza del server (evita reinvii inutili e migliora tempo ripartenza invio)</li>
|
||||
<li>review procedure controllo connessione x FANUC (es Tornos II)</li>
|
||||
<li>non richeide più privilegi admin x fare update</li>
|
||||
<li> gestione segnali inverted</li>
|
||||
<li>completata gestione configurabilità parametrica segnali (Tornos, CMZ, Biglia)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Vendored
+3
-3
@@ -14,9 +14,9 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=232']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.17.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.17.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
withEnv(['NEXT_BUILD_NUMBER=233']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.18.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.18.${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