JCWYTieBuJi.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #ifndef __JCWYTIEBUJI_H__
  2. #define __JCWYTIEBUJI_H__
  3. #if JIA_CHENG_WEI_YE_MACHINE
  4. extern void TBJ_InitAction(void);
  5. extern void TBJ_ManualAction(void);
  6. extern void TBJ_Action(void);
  7. extern void TBJ_DelayAction(void);
  8. #define TBJ_ALARM_ADDR 100
  9. #define TBJ_TOTAL_ADDR 0
  10. #define TBJ_PROSPEED_ADDR 78
  11. #define VAVLE_ALARM_TIME 3000
  12. #define GUO_LIAN_OVER_TIME 10000
  13. #define TBJ_DIR_P 0
  14. //故障代码列表
  15. #define TBJ_NO_ALARM 0
  16. #define TBJ_TOTAL_ALARM 1
  17. #define TBJ_KADAI_ALARM 2
  18. #define TBJ_XIACHONG_ARRIVE_ALARM 3
  19. #define TBJ_HM_LIMIT_ALARM 4
  20. #define TBJ_SM_LIMIT_ALARM 5
  21. #define TBJ_GUOLIAN_ALARM 6
  22. #define TBJ_SongJiaoStep cStepMByte4
  23. #define TBJ_HeMoStep cStepMByte3
  24. #define TBJ_ManualStep cStepMByte2
  25. #define TBJ_MotorStep cStepMByte1
  26. #define TBJ_AutoStep cStepMByte
  27. #define TBJ_HeMoDelay cDelayTime1
  28. #define TBJ_AutoDelay cDelayTime2
  29. #define TBJ_CQ_Delay cDelayTime3
  30. #define TBJ_SJ_Delay cDelayTime4
  31. #define TBJ_CS_Delay cDelayTime5
  32. #define TBJ_MotorDelay cDelayTime6
  33. #define TBJ_PARAM_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
  34. #define TBJ_PARAM_DELAY_CS (user_datas[6] * 10)
  35. #define TBJ_PARAM_CS_TIME (user_datas[7] * 10)
  36. #define TBJ_PARAM_COLD_TIME (user_datas[8] * 10)
  37. #define TBJ_PARAM_XMCQ_TIME (user_datas[9] * 10)
  38. #define TBJ_PARAM_DELAY_BACK_GZ_TIME (user_datas[10] * 10)
  39. #define TBJ_PARAM_CQ_TIME (user_datas[11] * 10)
  40. #define TBJ_PARAM_DELAY_GZ (user_datas[12] * 10)
  41. #define TBJ_PARAM_HIGH_SPEED user_datas[13]
  42. #define TBJ_PARAM_LOW_SPEED user_datas[14]
  43. #define TBJ_PARAM_HM_DELAY (0 * 10)
  44. #define TBJ_PARAM_CYCLE_DELAY (0 * 10)
  45. #define TBJ_PARAM_LOWSPEED_LENGTH user_datas[17]
  46. #define DISPLAY_DATA0 user_datas[121]
  47. #define DISPLAY_DATA1 user_datas[122]
  48. #define DISPLAY_DATA2 user_datas[123]
  49. #define DISPLAY_DATA3 user_datas[124]
  50. #define DISPLAY_DATA4 user_datas[125]
  51. #define DISPLAY_DATA5 user_datas[126]
  52. #define DISPLAY_DATA6 user_datas[127]
  53. #define DISPLAY_DATA7 user_datas[128]
  54. #define START_IN X00
  55. #define START_IN_UP (X00 && !OLDX00)
  56. #define STOP_IN X01
  57. #define STOP_IN_UP (X01 && !OLDX01)
  58. #define TBJ_KaDai_IN X02
  59. #define TBJ_GUO_LIAN_IN X03
  60. #define TBJ_GUO_LIAN_IN_UP (X03 && !OLDX03)
  61. #define TBJ_GUO_LIAN_IN_DW (!X03 && OLDX03)
  62. #define TBJ_GZ_IN X04
  63. #define TBJ_QD_LIMIT_IN X05
  64. #define TBJ_SJ_LIMIT_IN X06
  65. #define TBJ_SJ_ORIGIN_IN X07
  66. #define TBJ_SM_LIMIT_IN X10
  67. #define TBJ_XM_LIMIT_IN X11
  68. #define TBJ_QJ_IN X12
  69. #define TBJ_GZ_VAVLE Y02
  70. #define TBJ_QDB_VAVLE Y03
  71. #define TBJ_JJ_VAVLE Y04
  72. #define TBJ_SJ_VAVLE Y05
  73. #define TBJ_SM_VAVLE Y06
  74. #define TBJ_XM_VAVLE Y07
  75. #define TBJ_CQ_VAVLE Y10
  76. #define TBJ_CS_OUT Y11
  77. #define TBJ_FJ_VAVLE Y12
  78. //M0~M4 Actioon.h全局使用
  79. #define TBJ_bMotor M0005
  80. #define TBJ_bGouZhen M0006
  81. #define TBJ_bQianDao M0007
  82. #define TBJ_bJiaJiao M0008
  83. #define TBJ_bStart M0009
  84. #define TBJ_bSongJiao M0010
  85. #define TBJ_bHeMo M0011
  86. #define TBJ_bCS M0012
  87. #define TBJ_bChuiQi M0013
  88. #define TBJ_bRunning M0017
  89. #define TBJ_bStop M0018
  90. #define TBJ_bSM M0019
  91. #define TBJ_bXM M0020
  92. #define TBJ_bFenJiao M0021
  93. #define TBJ_bAlarmStop M0036
  94. #endif
  95. #endif