aggiunti contatori numCambiUt x UnOp
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<DataItem category="SAMPLE" id="ACC_TIME" name="Tempo macchina ON" type="ACCUMULATED_TIME"/>
|
||||
<DataItem category="SAMPLE" id="ACC_TIME_WORK" name="Tempo macchina in RUN" type="ACCUMULATED_TIME"/>
|
||||
<DataItem category="SAMPLE" id="CLOCK" type="CLOCK_TIME"/>
|
||||
<DataItem category="SAMPLE" id="POWER" type="WATTAGE"/>
|
||||
<DataItem category="SAMPLE" id="POWER" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="OperatorId" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="FUNCT_MODE" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="USER_ACTION" type="MESSAGE"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<DataItem category="SAMPLE" id="ACC_TIME" name="Tempo macchina ON" type="ACCUMULATED_TIME"/>
|
||||
<DataItem category="SAMPLE" id="ACC_TIME_WORK" name="Tempo macchina in RUN" type="ACCUMULATED_TIME"/>
|
||||
<DataItem category="SAMPLE" id="CLOCK" type="CLOCK_TIME"/>
|
||||
<DataItem category="SAMPLE" id="POWER" type="WATTAGE"/>
|
||||
<DataItem category="SAMPLE" id="POWER" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="OperatorId" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="FUNCT_MODE" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="USER_ACTION" type="MESSAGE"/>
|
||||
|
||||
@@ -165,6 +165,7 @@ namespace MTC_Adapter
|
||||
istGiriElettrom[i] = (uint)ncDevice.PLC_MemoryAreaEOK[4 + i];
|
||||
}
|
||||
needSave = procGiriTotUnOp(needSave);
|
||||
needSave = procNumCU(needSave);
|
||||
|
||||
// spostamento totale assi!
|
||||
for (int i = 0; i < 3; i++)
|
||||
|
||||
@@ -813,6 +813,19 @@ namespace MTC_Adapter
|
||||
istGiriElettrom[numero - 1] = BitConverter.ToUInt32(tabDatiMtz, shift * i);
|
||||
}
|
||||
}
|
||||
else if (maintData[i].varName.EndsWith("_NumCambiUT"))
|
||||
{
|
||||
try
|
||||
{
|
||||
numero = Convert.ToInt32(maintData[i].varName.Replace("UnOp_", "").Replace("_NumCambiUT", ""));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (numero > 0)
|
||||
{
|
||||
istNumCambiUt[numero - 1] = BitConverter.ToUInt32(tabDatiMtz, shift * i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (maintData[i].varName.StartsWith("VacPump_"))
|
||||
{
|
||||
@@ -870,6 +883,7 @@ namespace MTC_Adapter
|
||||
needSave = procPartId(needSave);
|
||||
needSave = procPzProd(needSave);
|
||||
needSave = procGiriTotUnOp(needSave);
|
||||
needSave = procNumCU(needSave);
|
||||
needSave = procMovTotAssi(needSave);
|
||||
needSave = procNumInvAssi(needSave);
|
||||
needSave = procVacPump(needSave);
|
||||
@@ -1267,7 +1281,7 @@ namespace MTC_Adapter
|
||||
vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActK.Value = "0"; // è 5 assi...nullo...
|
||||
|
||||
|
||||
//vettPath[i].mPathCurrProg.Value = string.Format("{0}-{1}-{2}", allDynData.prgmnum, allDynData.prgnum, allDynData.seqnum);
|
||||
//vettPath[i].mPathCurrProgRowNum.Value = PtData.ProgrRow;
|
||||
//vettPath[i].mPathActiveAxes.Value = PtData.ActiveAxes;
|
||||
|
||||
@@ -614,6 +614,10 @@ namespace MTC_Adapter
|
||||
/// Vettore ATTUALE dei contatori del tempo cumulato lavoro degli assi (h)
|
||||
/// </summary>
|
||||
public double[] contAxisAccumTime;
|
||||
/// <summary>
|
||||
/// Vettore ATTUALE dei contatori del numero cambi utensili x UnOp
|
||||
/// </summary>
|
||||
public uint[] currNumCambiUt;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -660,6 +664,12 @@ namespace MTC_Adapter
|
||||
/// Vettore ISTANTANEO dei contatori del tempo cumulato lavoro degli assi (h)
|
||||
/// </summary>
|
||||
public double[] istAxisAccumTime;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del numero cambi utensili x UnOp
|
||||
/// </summary>
|
||||
public uint[] istNumCambiUt;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// data-ora ultimo controllo movimento assi
|
||||
/// </summary>
|
||||
@@ -1241,16 +1251,22 @@ namespace MTC_Adapter
|
||||
contOreMaccLav = currAdpConf.ContOreMaccLav;
|
||||
contGiriElettrom = new uint[currAdpConf.nUnOp];
|
||||
istGiriElettrom = new uint[currAdpConf.nUnOp];
|
||||
currNumCambiUt= new uint[currAdpConf.nUnOp];
|
||||
istNumCambiUt= new uint[currAdpConf.nUnOp];
|
||||
for (int i = 0; i < currAdpConf.nUnOp; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
List<DataRefItem<string, string>> listaDR = currAdpConf.UnOp[i].dataRefList;
|
||||
// punto all'item
|
||||
DataRefItem<string, string> riContRpm = listaDR.Find(x => x.Key == string.Format("UnOp_{0:00}_AccTime", i + 1));
|
||||
DataRefItem<string, string> riContNumCU = listaDR.Find(x => x.Key == string.Format("UnOp_{0:00}_NumCU", i + 1));
|
||||
// recupero valore giri...
|
||||
UInt32 contTotGiri = Convert.ToUInt32(riContRpm.Value);
|
||||
// recupero valore num cambi ut...
|
||||
UInt32 contNumCU = Convert.ToUInt32(riContNumCU.Value);
|
||||
// salvo valore letto
|
||||
contGiriElettrom[i] = contTotGiri;
|
||||
currNumCambiUt[i] = contNumCU;
|
||||
}
|
||||
// imposto num assi...
|
||||
contDistMovAssi = new uint[currAdpConf.nAxis];
|
||||
@@ -2222,6 +2238,33 @@ namespace MTC_Adapter
|
||||
return needSave;
|
||||
}
|
||||
/// <summary>
|
||||
/// Processing delle variabili sul numero cambi utensile (totali)
|
||||
/// </summary>
|
||||
/// <param name="needSave"></param>
|
||||
/// <returns></returns>
|
||||
public bool procNumCU(bool needSave)
|
||||
{
|
||||
for (int i = 0; i < currAdpConf.nUnOp; i++)
|
||||
{
|
||||
// controllo valore riferimento...
|
||||
if (istNumCambiUt[i] > currNumCambiUt[i])
|
||||
{
|
||||
uint delta = istNumCambiUt[i] - currNumCambiUt[i];
|
||||
uint contatore = updateUnOpRefListByIncr(i, delta, "UnOp_{0:00}_NumCU");
|
||||
|
||||
// passo valore num CU all'adapter
|
||||
vettUnOp[i].mUnOpNumCU.Value = contatore;
|
||||
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currNumCambiUt[i] = istNumCambiUt[i];
|
||||
}
|
||||
|
||||
return needSave;
|
||||
}
|
||||
/// <summary>
|
||||
/// Processing delle variabili sul totale m percorsi dagli assi
|
||||
/// </summary>
|
||||
/// <param name="needSave"></param>
|
||||
|
||||
@@ -48,18 +48,18 @@
|
||||
<add key="autoStartOnLoad" value="true" />
|
||||
<add key="openDumpOnStart" value="true" />
|
||||
|
||||
<add key="XmlHistFilePath" value="c:\IOT\log"/>
|
||||
<add key="XmlHistFilePath" value="c:\IOT\log" />
|
||||
|
||||
<add key="testCharSep" value="|" />
|
||||
|
||||
<!--percorso file scambio dati "lenti" e conf MaintData memory area -->
|
||||
<add key="GeneralStatusFilePath" value="CmsGeneralStatus.txt" />
|
||||
<add key="CmsMaintDataConfFilePath" value="CmsMaintDataConf.txt" />
|
||||
<add key="ScmProdFile" value="SCM_prodFile.pro"/>
|
||||
<add key="ScmProdFile" value="SCM_prodFile.pro" />
|
||||
|
||||
<add key="fattdecimale" value="1000"/>
|
||||
<add key="fattdecimale" value="1000" />
|
||||
|
||||
<add key="fattConvDistAssi" value="1000"/>
|
||||
<add key="fattConvDistAssi" value="1000" />
|
||||
|
||||
|
||||
<add key="D1_NAME" value="CMS-ARES-SIM" />
|
||||
|
||||
@@ -23,4 +23,4 @@
|
||||
022|SlittaTastatore_Count |COUNT
|
||||
023|SlittaMagazzino_01_Count |COUNT
|
||||
024|ProtMagazzino_01_Count |COUNT
|
||||
025|CambiUT_Count |COUNT
|
||||
025|UnOp_01_NumCambiUT |COUNT
|
||||
Reference in New Issue
Block a user