From 04d94b572ce6c5d2ee83f190878cb2c92fe8e862 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sun, 20 Sep 2020 12:14:17 +0200 Subject: [PATCH] Ok signal-r x NOMI ASSI e tipo (da conf) --- Thermo.Active.NC/NcAdapter.cs | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 2d453007..a6808709 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -339,30 +339,23 @@ namespace Thermo.Active.NC return libraryError; } - + /// + /// dati assi da CONF + /// + /// + /// public CmsError ReadAxisData(out List axesNames) { + CmsError libraryError = NO_ERROR; axesNames = new List(); - List plcAxes = new List(); - // 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; }