XDHeLian.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. #ifndef __XDHELIAN_H__
  2. #define __XDHELIAN_H__
  3. #if XI_DONG_MACHINE
  4. extern void HL_InitAction(void);
  5. extern void HL_ManualAction(void);
  6. extern void HL_Action(void);
  7. #define HL_MOTOR_DISEN 1
  8. #define HL_MOTOR_EN 0
  9. #define HL_DIR_P 0
  10. #define HL_DIR_N 1
  11. #define HL_ALARM_ADDR 100
  12. #define HL_TOTAL_ADDR 76
  13. #define HL_PROSPEED_ADDR 78
  14. #define HL_VAVLE_ALARM_TIME 3000
  15. //故障代码列表
  16. #define HL_NO_ALARM 0
  17. #define HL_KD_ALARM 1
  18. #define HL_GUOLIAN_ALARM 2
  19. #define HL_SM_LIMIT_ALARM 3
  20. #define HL_XM_LIMIT_ALARM 4
  21. #define HL_BB_LIMIT_ALARM 5
  22. #define HL_DK_LIMIT_ALARM 6
  23. #define HL_DK_ORIGIN_ALARM 7
  24. #define HL_CCX_LIMIT_ALARM 9
  25. #define HL_CCX_ORIGIN_ALARM 10
  26. #define HL_TFK_LIMIT_ALARM 11
  27. #define HL_TFK_ORIGIN_ALARM 12
  28. #define HL_JD_LIMIT_ALARM 13
  29. #define HL_HM_BACK_ALARM 14
  30. #define HL_MotorStep cStepMByte
  31. #define HL_AutoStep cStepMByte1
  32. #define HL_HLStep cStepMByte2
  33. #define HL_ManDKStep cStepMByte3
  34. #define HL_AutoDelay cDelayTime1
  35. #define HL_MotorDelay cDelayTime2
  36. #define HL_CheckDelay cDelayTime3
  37. #define HL_HLDelay cDelayTime4
  38. #define HL_PARAM_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
  39. #define HL_PARAM_MOTOR_ALARM_TIME (user_datas[4] * 10)
  40. #define HL_PARAM_HIGH_SPEED user_datas[5]
  41. #define HL_PARAM_LOW_SPEED user_datas[6]
  42. #define HL_PARAM_DELAY_STOP user_datas[7]
  43. #define HL_PARAM_CYCLE_DELAY (user_datas[8] * 10)
  44. #define HL_PARAM_DELAY_HM (user_datas[9] * 10)
  45. #define HL_PARAM_DELAY_TFK (user_datas[10] * 10)
  46. #define HL_PARAM_DELAY_JD (user_datas[11] * 10)
  47. #define HL_PARAM_DELAY_CCX (user_datas[12] * 10)
  48. #define HL_PARAM_DELAY_CHECK_CCX (user_datas[13] * 10)
  49. #define HL_PARAM_DELAY_BACK_DK_UP (user_datas[14] * 10)
  50. #define HL_PARAM_CCX_LENGTH user_datas[15]
  51. #define HL_PARAM_DELAY_TFK_BACK (user_datas[16] * 10)
  52. #define HL_PARAM_DELAY_DK (user_datas[17] * 10)
  53. #define HL_PARAM_DELAY_STOP2 user_datas[18]
  54. #define HL_PARAM_DELAY_BB_BACK (user_datas[19] * 10)
  55. #define HL_PARAM_DELAY_BB (user_datas[20] * 10)
  56. #define HL_PARAM_DELAY_HM_BACK user_datas[21]
  57. #define HL_PARAM_OFFSET_LENGTH user_datas[22]
  58. #define HL_PARAM_FILTER_TIMES user_datas[23]
  59. #define DISPLAY_DATA0 user_datas[121]
  60. #define DISPLAY_DATA1 user_datas[122]
  61. #define DISPLAY_DATA2 user_datas[123]
  62. #define DISPLAY_DATA3 user_datas[124]
  63. #define DISPLAY_DATA4 user_datas[125]
  64. #define DISPLAY_DATA5 user_datas[126]
  65. #define DISPLAY_DATA6 user_datas[127]
  66. #define DISPLAY_DATA7 user_datas[128]
  67. #define START_IN X00
  68. #define START_IN_UP (X00 && !OLDX00)
  69. #define STOP_IN X01
  70. #define STOP_IN_UP (X01 && !OLDX01)
  71. #define HL_GUO_LIAN_IN X02
  72. #define HL_GUO_LIAN_IN_UP (X02 && !OLDX02)
  73. #define HL_GUO_LIAN_IN_DW (!X02 && OLDX02)
  74. #define HL_SM_LIMIT_IN X04
  75. #define HL_XM_LIMIT_IN X05
  76. #define HL_BB_LIMIT_IN X06
  77. #define HL_DK_ORIGIN_IN X10
  78. #define HL_DK_LIMIT_IN X07
  79. #define HL_JD_LIMIT_IN X11
  80. #define HL_CCX_LIMIT_IN X12
  81. #define HL_CCX_ORIGIN_IN X13
  82. #define HL_TFK_LIMIT_IN X15
  83. #define HL_TFK_ORIGIN_IN X14
  84. #define HL_KA_DAI_IN X16
  85. #define HL_SL_UP_LIMIT X17
  86. #define HL_SL_DW_LIMIT X20
  87. #define HL_HM_VAVLE Y00
  88. #define HL_TFK_VAVLE Y01
  89. #define HL_BB_VAVLE Y02
  90. #define HL_DK_VAVLE Y03
  91. #define HL_JD_VAVLE Y04
  92. #define HL_CCX_VAVLE Y05
  93. #define HL_SZ_OUT Y06
  94. #define HL_SL_MOTOR Y11
  95. //M0~M4 Actioon.h全局使用
  96. #define HL_bHM M0005
  97. #define HL_bTFK M0006
  98. #define HL_bBB M0007
  99. #define HL_bJD M0009
  100. #define HL_bCCX M0010
  101. #define HL_bDK M0011
  102. #define HL_bSL M0014
  103. #define HL_bMotor M0015
  104. #define HL_bStart M0016
  105. #define HL_bRunning M0017
  106. #define HL_bStop M0018
  107. #define HL_bAlarmStop M0019
  108. #define HL_bSingStart M0020
  109. #define HL_bAdd M0021
  110. #define HL_bSetWorkData M0022
  111. #define HL_bDec M0023
  112. #define HL_bDW M0024
  113. #define HL_bZCX M0025
  114. #define HL_bHL M0026
  115. #endif
  116. #endif