FJDaKong.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #ifndef __FJDAKONG_H__
  2. #define __FJDAKONG_H__
  3. #if FU_JIAN_MACHINE
  4. extern void DK_InitAction(void);
  5. extern void DK_ManualAction(void);
  6. extern void DK_Action(void);
  7. #define DK_ALARM_ADDR 100
  8. #define DK_TOTAL_ADDR 0
  9. #define DK_PROSPEED_ADDR 78
  10. #define VAVLE_ALARM_TIME 3000
  11. #define GUO_LIAN_OVER_TIME 10000
  12. #define DK_DIR_N 1
  13. #define DK_DIR_P 0
  14. //故障代码列表
  15. #define DK_NO_ALARM 0
  16. #define DK_TOTAL_ALARM 1
  17. #define DK_KADAI_ALARM 2
  18. #define DK_XIACHONG_ARRIVE_ALARM 3
  19. #define DK_XM_LIMIT_ALARM 4
  20. #define DK_SM_LIMIT_ALARM 5
  21. #define DK_GUOLIAN_ALARM 6
  22. #define DK_XiaChongStep cStepMByte3
  23. #define DK_ManualStep cStepMByte2
  24. #define DK_MotorStep cStepMByte1
  25. #define DK_AutoStep cStepMByte
  26. #define DK_XiaChongDelay cDelayTime1
  27. #define DK_AutoDelay cDelayTime2
  28. #define DK_CQ_Delay cDelayTime3
  29. #define DK_MotorDelay cDelayTime6
  30. #define DK_PARAM_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
  31. #define DK_PARAM_ZIPRER_LENGTH (user_datas[4] | user_datas[5] << 16)
  32. #define DK_PARAM_XC_DELAY (user_datas[6] * 10)
  33. #define DK_PARAM_CQ_TIME (user_datas[7] * 10)
  34. #define DK_PARAM_XC_ALARM_TIME (user_datas[8] * 10)
  35. #define DK_PARAM_XC_DELAY_STOP_TIME (user_datas[9] * 10)
  36. #define DK_PARAM_HIGH_SPEED user_datas[10]
  37. #define DK_PARAM_CYCLE_DELAY (user_datas[11] * 10)
  38. #define DK_PARAM_CYCLE_PULSE user_datas[12]
  39. #define DK_PARAM_CYCLE_LENGTH user_datas[13]
  40. #define DK_PARAM_BM_LINE user_datas[14]
  41. #define DK_PARAM_BM_LENGTH user_datas[15]
  42. #define DK_PARAM_LOWSPEED_LENGTH user_datas[16]
  43. #define DK_PARAM_BACK_LENGTH user_datas[17]
  44. #define DK_PARAM_LOW_SPEED user_datas[18]
  45. #define DK_PARAM_BIAN_MA_MODE user_datas[19]
  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 DK_KaDai_IN X02
  59. #define DK_XC_ORIGIN_IN X11
  60. #define DK_XC_ORIGIN_IN_UP (X11 && !OLDX11)
  61. #define DK_MANAL_XC_IN X03
  62. #define DK_MANAL_XC_IN_UP (X03 && !OLDX03)
  63. #define DK_SC_VAVLE Y00
  64. #define DK_XC_MOTOR Y01
  65. #define DK_CQ_VAVLE Y03
  66. //M0~M4 Actioon.h全局使用
  67. #define DK_bMotor M0005
  68. #define DK_bBackMotor M0006
  69. #define DK_bManXiaChong M0008
  70. #define DK_bStart M0009
  71. #define DK_bCQ M0013
  72. #define DK_bRunning M0017
  73. #define DK_bStop M0018
  74. #define DK_bAlarmStop M0036
  75. #endif
  76. #endif