JCWYDaKong.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #ifndef __JCWYDAKONG_H__
  2. #define __JCWYDAKONG_H__
  3. #if JIA_CHENG_WEI_YE_MACHINE
  4. extern void DK_InitAction(void);
  5. extern void DK_ManualAction(void);
  6. extern void DK_Action(void);
  7. extern void DK_DelayAction(void);
  8. extern void DK_ExtiActionX30(void);
  9. extern void DK_ExtiActionX31(void);
  10. #define DK_ALARM_ADDR 100
  11. #define DK_TOTAL_ADDR 0
  12. #define DK_PROSPEED_ADDR 78
  13. #define VAVLE_ALARM_TIME 3000
  14. #define GUO_LIAN_OVER_TIME 10000
  15. #define DK_DIR_P 0
  16. //故障代码列表
  17. #define DK_NO_ALARM 0
  18. #define DK_TOTAL_ALARM 1
  19. #define DK_KADAI_ALARM 2
  20. #define DK_XIACHONG_ARRIVE_ALARM 3
  21. #define DK_XM_LIMIT_ALARM 4
  22. #define DK_SM_LIMIT_ALARM 5
  23. #define DK_GUOLIAN_ALARM 6
  24. #define DK_XiaChongStep cStepMByte3
  25. #define DK_ManualStep cStepMByte2
  26. #define DK_MotorStep cStepMByte1
  27. #define DK_AutoStep cStepMByte
  28. #define DK_XiaChongDelay cDelayTime1
  29. #define DK_AutoDelay cDelayTime2
  30. #define DK_XMCQ_Delay cDelayTime3
  31. #define DK_FLCQ_Delay cDelayTime4
  32. #define DK_CS_Delay cDelayTime5
  33. #define DK_MotorDelay cDelayTime6
  34. #define DK_PARAM_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
  35. #define DK_PARAM_DELAY_CS (user_datas[6] * 10)
  36. #define DK_PARAM_CS_TIME (user_datas[7] * 10)
  37. #define DK_PARAM_COLD_TIME (user_datas[8] * 10)
  38. #define DK_PARAM_XMCQ_TIME (user_datas[9] * 10)
  39. #define DK_PARAM_DELAY_BACK_GZ_TIME (user_datas[10] * 10)
  40. #define DK_PARAM_FLCQ_TIME (user_datas[11] * 10)
  41. #define DK_PARAM_DELAY_GZ (user_datas[12] * 10)
  42. #define DK_PARAM_HIGH_SPEED user_datas[13]
  43. #define DK_PARAM_LOW_SPEED user_datas[14]
  44. #define DK_PARAM_XC_DELAY 0
  45. #define DK_PARAM_CYCLE_DELAY 0
  46. #define DK_PARAM_LOWSPEED_LENGTH user_datas[17]
  47. #define DISPLAY_DATA0 user_datas[121]
  48. #define DISPLAY_DATA1 user_datas[122]
  49. #define DISPLAY_DATA2 user_datas[123]
  50. #define DISPLAY_DATA3 user_datas[124]
  51. #define DISPLAY_DATA4 user_datas[125]
  52. #define DISPLAY_DATA5 user_datas[126]
  53. #define DISPLAY_DATA6 user_datas[127]
  54. #define DISPLAY_DATA7 user_datas[128]
  55. #define START_IN X00
  56. #define START_IN_UP (X00 && !OLDX00)
  57. #define STOP_IN X01
  58. #define STOP_IN_UP (X01 && !OLDX01)
  59. #define DK_KaDai_IN X02
  60. #define DK_CD_UP_LIMIT_IN X03
  61. #define DK_CD_DOWN_LIMIT_IN X04
  62. #define DK_GUO_LIAN_IN X05
  63. #define DK_GUO_LIAN_IN_UP (X05 && !OLDX05)
  64. #define DK_GUO_LIAN_IN_DW (!X05 && OLDX05)
  65. #define DK_GZ_IN X06
  66. #define DK_GZ_UP_LIMIT_IN X07
  67. #define DK_GZ_DOWN_LIMIT_IN X10
  68. #define DK_XM_LIMIT_IN X11
  69. #define DK_SM_LIMIT_IN X12
  70. #define DK_GZ_VAVLE Y00
  71. #define DK_YD_VAVLE Y01
  72. #define DK_XM_VAVLE Y02
  73. #define DK_XMCQ_VAVLE Y03
  74. #define DK_SM_VAVLE Y04
  75. #define DK_FLCQ_VAVLE Y05
  76. #define DK_CS_OUT Y06
  77. #define DK_CD_MOTOR Y07
  78. //M0~M4 Actioon.h全局使用
  79. #define DK_bMotor M0005
  80. #define DK_bGouZhen M0006
  81. #define DK_bYaDai M0007
  82. #define DK_bManXiaChong M0008
  83. #define DK_bStart M0009
  84. #define DK_bSM M0010
  85. #define DK_bXM M0011
  86. #define DK_bCS M0012
  87. #define DK_bXMCQ M0013
  88. #define DK_bFLCQ M0014
  89. #define DK_bChuDai M0015
  90. #define DK_bRunning M0017
  91. #define DK_bStop M0018
  92. #define DK_bAlarmStop M0036
  93. #endif
  94. #endif