update note readme + rimesso codice NON semplificato x errori build successiva

This commit is contained in:
Samuele E. Locatelli
2018-01-17 11:26:15 +01:00
parent e247b297ee
commit 34dc5585aa
4 changed files with 28 additions and 21 deletions
+20 -20
View File
@@ -558,31 +558,25 @@ namespace MTC_Adapter
dataRefList = baseElem.dataRefList;
try
{
mAxType = new Event(dataRefList[0].Key)
{
Value = dataRefList[0].Value
};
mAxType = new Event(dataRefList[0].Key);
mAxType.Value = dataRefList[0].Value;
}
catch
{
mAxType = new Event(string.Format("{0}_Type", ident))
{
Value = "LINEAR"
};
mAxType = new Event(string.Format("{0}_Type", ident));
mAxType.Value = "LINEAR";
}
try
{
mAxGrp = new Event(dataRefList[1].Key)
{
Value = dataRefList[1].Value
};
mAxGrp = new Event(dataRefList[1].Key);
mAxGrp.Value = dataRefList[1].Value;
}
catch
{
mAxGrp = new Event(string.Format("{0}_Grp", ident))
{
Value = "00"
};
mAxGrp = new Event(string.Format("{0}_Grp", ident));
mAxGrp.Value = "00";
}
// valori standard
mAxDescr = new Event(string.Format("{0}_Descr", ident));
@@ -1675,7 +1669,8 @@ namespace MTC_Adapter
}
catch
{ }
Math.DivRem(BitNum, 8, out int resto);
int resto = 0;
Math.DivRem(BitNum, 8, out resto);
string memAddr = string.Format("{0}.{1}", ByteNum + shift * memSize, resto);
return new otherData(valori[0], memAddr, valori[1].Trim(), valori[2].Trim());
}
@@ -1699,7 +1694,8 @@ namespace MTC_Adapter
}
catch
{ }
Math.DivRem(numRiga, 8 * memSize, out int resto);
int resto = 0;
Math.DivRem(numRiga, 8 * memSize, out resto);
string memAddr = string.Format("{0}{1}.{2}", memPre, baseAddr + shift, resto);
return new otherData(valori[0], memAddr, valori[1].Trim(), valori[2].Trim());
}
@@ -2140,7 +2136,10 @@ namespace MTC_Adapter
tryConnect();
}
}
eh_refreshed?.Invoke(this, new EventArgs());
if (eh_refreshed != null)
{
eh_refreshed(this, new EventArgs());
}
}
public void resetDebugConsole()
@@ -2550,7 +2549,8 @@ namespace MTC_Adapter
// 2016.10.18 aggiungo scrittura del bit di "watchdog" al primo bit della DW2... come resto tra secondi / 2
if (utils.CRB("sendWatchDog"))
{
Math.DivRem(DateTime.Now.Second / utils.CRI("cycleWatchDog"), 2, out int resto);
int resto = 0;
Math.DivRem(DateTime.Now.Second / utils.CRI("cycleWatchDog"), 2, out resto);
setFlag = resto != 0;
// se watchdog è cambiato lo invio, altrimenti lascio come è...
if (setFlag != lastWatchDog)
+2 -1
View File
@@ -837,7 +837,8 @@ namespace MTC_Adapter
{
int memIndex = 5000 + 1 * j / 2; // dovrebeb leggere correttamente solo 1 byte...
byte[] byteMtrx = new byte[1];
Math.DivRem(j, 2, out int resto);
int resto = 0;
Math.DivRem(j, 2, out resto);
inizio = DateTime.Now;
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, resto, ref byteMtrx);
int8Mem = byteMtrx[0];
+6
View File
@@ -108,6 +108,12 @@ Vanno verificati i seguenti punti secondo la regola generale che quanto viene ra
- attenzione a `Sistems`: non inserire più oggetti (pompe, lubro, cooler) di quanti gestiti dal CN (e configurati nell'adapter)
- attenzione a `Sensoristica`: non inserire più variabili (tipicamente analogiche) (pompe, lubro, cooler) di quante gestite dal CN (e configurate nell'adapter)
- se si sono definiti oggetti ad esempio tramite variabili status, valori analogici, contatori nelle rispettive aree di memoria, è buona norma riorganizzarli come oggetti unici (che contengono tali variabili raggruppate)
- in data 2018.01.17 è stata aggiunta la possibilità (per OSAI) a livello di AGENT di ricevere la descrizione dell'asse (dinamica) e il processo di appartenenza (che sinora erano ignorate/cablate).
```XML
<DataItem category="EVENT" id="Axis_01_Descr" type="MESSAGE" name="Denominazione asse (dinamica)"/>
<DataItem category="EVENT" id="Axis_01_MainProc" type="MESSAGE" name="[#] Processo di appartenenza"/>
```
## Configurazione ADAPTERS
BIN
View File
Binary file not shown.