inizio aggiunta gestione info assi
This commit is contained in:
@@ -15,6 +15,7 @@ using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThAxes;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
@@ -515,7 +516,7 @@ public static class ThreadsFunctions
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(800, (int)sw.ElapsedMilliseconds));
|
||||
Thread.Sleep(CalcSleepTime(1000, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
@@ -539,11 +540,10 @@ public static class ThreadsFunctions
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
#if false
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get Data from NC
|
||||
libraryError = ncAdapter.GetAxesPositionsBySelectedProcess(out DTOAxesModel axesPositions);
|
||||
libraryError = ncAdapter.GetAxesPositions(out DTOThermoAxesMovModel axesPositions);
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
else
|
||||
@@ -552,7 +552,6 @@ public static class ThreadsFunctions
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
#endif
|
||||
|
||||
sw.Stop();
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.MaintenanceModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThAxes;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
@@ -276,6 +277,7 @@ namespace Thermo.Active.NC
|
||||
|
||||
#region Axes
|
||||
|
||||
#if false
|
||||
public CmsError GetAxesPositions(out List<DTOAxesModel> axes)
|
||||
{
|
||||
axes = new List<DTOAxesModel>();
|
||||
@@ -337,8 +339,24 @@ namespace Thermo.Active.NC
|
||||
|
||||
//numericalControl.AXES_RFollowingError(1, ref axes.followingErr);
|
||||
|
||||
return libraryError;
|
||||
}
|
||||
#endif
|
||||
public CmsError GetAxesPositions(out DTOThermoAxesMovModel axes)
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
axes = new DTOThermoAxesMovModel();
|
||||
|
||||
// leggo dal PLC in lobocco i dati...
|
||||
#if fase
|
||||
libraryError = numericalControl.AXES_RInterpPosition(processNum, ref axes.interpolated);
|
||||
if (libraryError.errorCode != 0)
|
||||
return libraryError;
|
||||
#endif
|
||||
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// dati assi da CONF
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user