fix indice assi x nome/path + possibilità saltare lettura da app.config

This commit is contained in:
Samuele E. Locatelli
2018-01-18 09:52:20 +01:00
parent aa4dc1d88b
commit c3f51afb2d
2 changed files with 18 additions and 10 deletions
+16 -10
View File
@@ -1040,18 +1040,24 @@ namespace MTC_Adapter
{
// salvo!!! come path#nome
axisDict.Add(string.Format("{0}#{1}", i, axisTable[j]), currId);
// solo se HO UN NOME valido x asse...
if (axisTable[j] != null && axisTable[j] != '-' && axisTable[j] != '\0')
try
// se conf di leggere nome/path asse..
if (utils.CRB("enableAxNamePath"))
{
// solo se HO UN NOME valido x asse...
if (axisTable[j] != null && axisTable[j] != '-' && axisTable[j] != '\0')
{
// salvo (per ID) descr asse e processo corrente!
vettAxis[currId].mAxDescr.Value = axisTable[j];
vettAxis[currId].mAxMainProc.Value = i;
}
catch (Exception exc)
{
lg.Error(exc, string.Format("Eccezione in salvataggio nome/path asse num {0}", currId));
try
{
// salvo (per ID) descr asse e processo corrente!
vettAxis[currId - 1].mAxDescr.Value = axisTable[j];
vettAxis[currId - 1].mAxMainProc.Value = i;
}
catch (Exception exc)
{
lg.Error(exc, string.Format("Eccezione in salvataggio nome/path asse num {0}", currId));
}
}
}
}
}
}
+2
View File
@@ -21,6 +21,8 @@
<add key="maxAdapterLockSec" value="5"/>
<!--disabilito letture avanzate che UCCIDONO il programma (x ora SOLO allarmi CNC x FANUC-->
<add key="disableAdvRead" value="true"/>
<!--gestione x abilitare/disabilitare lettura nome asse e path di controllo (OSAI)-->
<add key="enableAxNamePath" value="true"/>
<!--AREA CONF IP FANUC-->
<!--SIMULATORE LOCALE
IP LOOPBACK: 192.168.211.5/255.255.255.0