Start method S7Net axes mgmt

This commit is contained in:
Samuele Locatelli
2020-09-21 07:41:33 +02:00
parent 3174ea1411
commit f3f05bfee9
3 changed files with 105 additions and 1 deletions
+62
View File
@@ -98,8 +98,70 @@ namespace CMS_CORE_Library.Models
return base.GetHashCode();
}
}
/// <summary>
/// Single AXIS RealTime (positions / movement) Data
/// </summary>
public class AxisRT
{
public short Id { get; set; } = 0;
public double Position { get; set; } = 0;
public double Speed { get; set; } = 0;
public double Load { get; set; } = 0;
public override bool Equals(object obj)
{
// Object is not a GaugeModel instance
if (!(obj is AxisRT item))
return false;
if (Id != item.Id)
return false;
if (Position != item.Position)
return false;
if (Speed != item.Speed)
return false;
if (Load != item.Load)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
/// <summary>
/// Single AXIS Info Data
/// </summary>
public class AxisInfo
{
public short Id { get; set; } = 0;
public int errorCode { get; set; } = 0;
public int movPhase { get; set; } = 0;
public int statusCode { get; set; } = 0;
public override bool Equals(object obj)
{
// Object is not a GaugeModel instance
if (!(obj is AxisInfo item))
return false;
if (Id != item.Id)
return false;
if (errorCode != item.errorCode)
return false;
if (movPhase != item.movPhase)
return false;
if (statusCode != item.statusCode)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
public class ModuleBlock
{
public short Id { get; set; } = 0;