Start method S7Net axes mgmt
This commit is contained in:
@@ -527,7 +527,8 @@ namespace CMS_CORE_Library.Models
|
||||
public enum AXIS_TYPE
|
||||
{
|
||||
LINEAR = 0,
|
||||
ROTATING = 1
|
||||
ROTATING = 1,
|
||||
NA
|
||||
}
|
||||
|
||||
public enum SIEMENS_TDI_ACTION
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user