TYHongMenDZJ.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #ifndef __TY_HM_DING_ZHI_JI_H__
  2. #define __TY_HM_DING_ZHI_JI_H__
  3. #if TONG_YONG_MACHINE | BRUCE_MACHINE
  4. extern void HMDZ_Action(void);
  5. extern void HMDZ_InitAction(void);
  6. #define HMDZ_DIR_P 1
  7. #define HMDZ_DIR_N 0
  8. #define HMDZ_YDIR_P 1
  9. #define HMDZ_YDIR_N 0
  10. #define HMDZ_TOTAL_ADDR 76
  11. #define HMDZ_ALARM_ADDR 100
  12. #define HMDZ_PROSPEED_ADDR 78
  13. /*
  14. * 警告类型 警告编号
  15. */
  16. #define HMDZ_NO_ALARM 0
  17. #define HMDZ_MOTOR_ORIGIN_ALARM 1
  18. #define HMDZ_WL_CHECK_ALARM 2
  19. #define HMDZ_RS_LIMIT_ALARM 3
  20. #define HMDZ_DL_LIMIT_ALARM 4
  21. #define HMDZ_DL_ORIGIN_ALARM 5
  22. #define HMDZ_QS_LIMIT_ALARM 6
  23. #define HMDZ_QS_ORIGIN_ALARM 7
  24. #define HMDZ_TS_LIMIT_ALARM 8
  25. #define HMDZ_TS_ORIGIN_ALARM 9
  26. #define HMDZ_SS_LIMIT_ALARM 10
  27. #define HMDZ_SS_ORIGIN_ALARM 11
  28. #define HMDZ_SG_LIMIT_ALARM 12
  29. #define VAVLE_ALARM_TIME 3000
  30. #define MOTOR_ALARM_TIME 5000
  31. #define HMDZ_PARAM_YL_DELAY (user_datas[0]*10)
  32. #define HMDZ_PARAM_DL_DELAY (user_datas[1]*10)
  33. #define HMDZ_PARAM_SS_DELAY (user_datas[2]*10)
  34. #define HMDZ_PARAM_SS_BACK_DELAY (user_datas[3]*10)
  35. #define HMDZ_PARAM_RS_MOTOR_DELAY (user_datas[4]*10)
  36. #define HMDZ_PARAM_RS_MOTOR_STOP_DELAY (user_datas[5]*10)
  37. #define HMDZ_PARAM_TS_DELAY (user_datas[6]*10)
  38. #define HMDZ_PARAM_QS_DELAY (user_datas[7]*10)
  39. #define HMDZ_PARAM_QS_BACK_DELAY (user_datas[8]*10)
  40. #define HMDZ_PARAM_CL_BACK_DELAY (user_datas[9]*10)
  41. #define HMDZ_PARAM_RS_MOTOR_SPEED user_datas[20]
  42. #define HMDZ_PARAM_RS_MOTOR_ACC user_datas[21]
  43. #define HMDZ_PARAM_RS_MOTOR_DEC user_datas[22]
  44. #define HMDZ_PARAM_RS_MOTOR_START_SPEED user_datas[23]
  45. #define HMDZ_PARAM_TL_MODE 0
  46. #define HMDZ_PARAM_ON_BACK_LENGTH 2000
  47. #define HMDZ_AutoDelay cDelayTime1
  48. #define HMDZ_MotorDelay cDelayTime2
  49. #define HMDZ_XiaQieDelay cDelayTime3
  50. #define HMDZ_KaDaiDelay cDelayTime4
  51. #define HMDZ_CSDelay cDelayTime5
  52. #define HMDZ_TBDelay cDelayTime6
  53. #define HMDZ_TFKDelay cDelayTime7
  54. #define HMDZ_TLDelay cDelayTime8
  55. #define HMDZ_CheckDelay cDelayTime9
  56. #define HMDZ_AlarmDelay cDelayTime10
  57. #define HMDZ_SJDelay cDelayTime11
  58. #define HMDZ_AutoStep cStepMByte
  59. #define HMDZ_MotorStep cStepMByte1
  60. #define HMDZ_XiaQieStep cStepMByte2
  61. #define HMDZ_YuanDianStep cStepMByte3
  62. #define HMDZ_TuiLianStep cStepMByte4
  63. #define HMDZ_CheckLengthStep cStepMByte5
  64. #define HMDZ_BinLianStep cStepMByte6
  65. //超声花边切输入输出
  66. #define HMDZ_START_IN X00
  67. #define HMDZ_START_IN_UP (X00 && !OLDX00)
  68. #define HMDZ_STOP_IN X01
  69. #define HMDZ_STOP_IN_UP (X01 && !OLDX01)
  70. #define HMDZ_MOTOR_ORIGIN_IN X02 // 电机原点
  71. #define HMDZ_WL_CHECK_IN X03 // 物料检测
  72. #define HMDZ_RS_LIMIT_IN X04 // 绕丝到位
  73. #define HMDZ_DL_LIMIT_IN X05 // 顶料到位
  74. #define HMDZ_DL_ORIGIN_IN X06 // 顶料退到位
  75. #define HMDZ_QS_LIMIT_IN X07 // 切丝到位
  76. #define HMDZ_QS_ORIGIN_IN X10 // 切丝退到位
  77. #define HMDZ_TS_LIMIT_IN X11 // 推丝到位
  78. #define HMDZ_TS_ORIGIN_IN X12 // 推丝退到位
  79. #define HMDZ_SS_LIMIT_IN X13 // 送丝到位
  80. #define HMDZ_SS_ORIGIN_IN X14 // 送丝退到位
  81. #define HMDZ_SG_LIMIT_IN X15 // 丝杆到位
  82. #define HMDZ_SS_VAVLE Y01 // 送丝
  83. #define HMDZ_DL_VAVLE Y02 // 顶料
  84. #define HMDZ_QS_VAVEL Y03 // 切丝
  85. #define HMDZ_TS_VAVLE Y04 // 推丝
  86. #define HMDZ_JL_VAVLE Y05 // 进料
  87. #define HMDZ_YL_VAVLE Y06 // 压料
  88. #define HMDZ_CL_VAVLE Y07 // 吹料
  89. #define HMDZ_SZ_OUT Y10 // 松轴
  90. #define HMDZ_bRunning M0000
  91. #define HMDZ_bStart M0001
  92. #define HMDZ_bStop M0002
  93. #define HMDZ_bAlarmStop M0003
  94. #define HMDZ_bClearTotal M0004
  95. #define HMDZ_bSS M0006
  96. #define HMDZ_bDL M0007
  97. #define HMDZ_bQS M0008
  98. #define HMDZ_bTS M0009
  99. #define HMDZ_bJL M0010
  100. #define HMDZ_bYL M0011
  101. #define HMDZ_bCL M0012
  102. #define HMDZ_bGoMotor M0013
  103. #define HMDZ_bBackMotor M0014
  104. #endif
  105. #endif