Ok signal-r x NOMI ASSI e tipo (da conf)

This commit is contained in:
Samuele Locatelli
2020-09-20 12:14:17 +02:00
parent 134981c2d7
commit 04d94b572c
+12 -19
View File
@@ -339,30 +339,23 @@ namespace Thermo.Active.NC
return libraryError;
}
/// <summary>
/// dati assi da CONF
/// </summary>
/// <param name="axesNames"></param>
/// <returns></returns>
public CmsError ReadAxisData(out List<DTOAxisNameModel> axesNames)
{
CmsError libraryError = NO_ERROR;
axesNames = new List<DTOAxisNameModel>();
List<AxisModel> plcAxes = new List<AxisModel>();
// Read selected process
ushort selectedProcess = 0;
CmsError libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (libraryError.IsError())
return libraryError;
if (selectedProcess != 0)
axesNames = AxesConfig.Select(x => new DTOAxisNameModel()
{
// Read axes names
libraryError = numericalControl.AXES_RAxesNames(selectedProcess, ref plcAxes);
axesNames = plcAxes.Select(x => new DTOAxisNameModel()
{
Id = x.Id,
Name = x.Name,
IsSelectable = x.IsSelectable,
Type = x.Type.ToString()
}).ToList();
}
Id = x.Id,
Name = x.Name,
IsSelectable = x.IsSelectable,
Type = x.Type.ToString()
}).ToList();
return libraryError;
}