MotionAxisParam.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. 
  2. namespace SKMC.Api.Motion.Model
  3. {
  4. public class AxisHomeParam
  5. {
  6. // 回零模式
  7. public short HomeMod { get; set; }
  8. // 回零低速
  9. public int LowVel { get; set; }
  10. // 回零高速
  11. public int HighVel { get; set; }
  12. //
  13. public int StopVel { get; set; }
  14. // 加速度
  15. public int Acc { get; set; }
  16. // 减速度
  17. public int Dec { get; set; }
  18. public double Overtime { get; set; }
  19. public double Offset { get; set; }
  20. public AxisHomeParam() { }
  21. public AxisHomeParam(AxisMoveParma moveParam)
  22. {
  23. LowVel = moveParam.MaxVel / 10;
  24. HighVel = moveParam.MaxVel / 2;
  25. Acc = moveParam.Acc;
  26. Dec = moveParam.Dec;
  27. }
  28. public AxisHomeParam(AxisMoveParma moveParam, short homeMod)
  29. {
  30. HomeMod = homeMod;
  31. LowVel = moveParam.MaxVel / 10;
  32. HighVel = moveParam.MaxVel / 2;
  33. Acc = moveParam.Acc;
  34. Dec = moveParam.Dec;
  35. }
  36. }
  37. public class AxisMoveParma
  38. {
  39. public int MinVel { get; set; }
  40. public int MaxVel { get; set; }
  41. public int StopVel { get; set; }
  42. public int Acc { get; set; }
  43. public int Dec { get; set; }
  44. // 加速时间
  45. public double Tacc { get; set; }
  46. // 减速时间
  47. public double Tdec { get; set; }
  48. // S型Radio
  49. public double Radio { get; set; }
  50. // 目标位置
  51. public double Pos { get; set; }
  52. // 设置连续运行时的最后速度
  53. public double FinalVel { get; set; }
  54. public override string ToString()
  55. {
  56. return $"vel: {MaxVel}, acc: {Acc}, dec: {Dec}, radio: {Radio}";
  57. }
  58. }
  59. }