correzione x inizializzare matrici prima di lettura tipo REF (restavano valide da path 1 a 2)
This commit is contained in:
@@ -1007,6 +1007,8 @@ namespace MTC_Adapter
|
||||
// verifico quanti path ho... e recupero le info sugli assi (se id > 0 è PRESENTE...)
|
||||
for (short i = 1; i <= currAdpConf.nPath; i++)
|
||||
{
|
||||
axisTable = new char[currAdpConf.nAxis];
|
||||
axisIdTable = new short[currAdpConf.nAxis];
|
||||
// chiamo lettura tab assi
|
||||
OSAI_ref.O_GetAxisTab(i, ref axisTable, ref axisIdTable);
|
||||
//...e popolo i dati...
|
||||
@@ -1034,6 +1036,8 @@ namespace MTC_Adapter
|
||||
// ora processo i dati PER PATH delle posizioni assi...
|
||||
for (short i = 1; i <= currAdpConf.nPath; i++)
|
||||
{
|
||||
tmpPosAssiTgt = new CMSCncLib.OPENcontrol.GETINTDATA[currAdpConf.nAxis];
|
||||
tmpPosAssi = new CMSCncLib.OPENcontrol.GETINTDATA[currAdpConf.nAxis];
|
||||
OSAI_ref.getAllAxisPos(1, i, ref tmpPosAssiTgt);
|
||||
OSAI_ref.getAllAxisPos(2, i, ref tmpPosAssi);
|
||||
// decodifico e salvo in posizione corretta...
|
||||
@@ -1088,9 +1092,17 @@ namespace MTC_Adapter
|
||||
axName = Convert.ToChar(posAssiTgt[i].AxisName);
|
||||
}
|
||||
|
||||
newPos = posAssi[i].position;
|
||||
newPosTgt = posAssiTgt[i].position;
|
||||
|
||||
// controllo nome asse: se vuoto NON PROCESSARE
|
||||
if (axName != '\0' && axName != '-')
|
||||
{
|
||||
newPos = posAssi[i].position;
|
||||
newPosTgt = posAssiTgt[i].position;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPos = 0;
|
||||
newPosTgt = 0;
|
||||
}
|
||||
// popolo valori... LOAD gestito da vettore letto con area memoria AnalogData.map
|
||||
vettAxis[i].mAxLoad.Value = Convert.ToUInt32(istLoadAssi[i].vcMedian);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user