HHJinShuDinCun.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #ifndef __HHJINSHUDINCUN_H__
  2. #define __HHJINSHUDINCUN_H__
  3. #if HAI_HUA_MACHINE
  4. extern void JSDC_InitAction(void);
  5. extern void JSDC_ManualAction(void);
  6. extern void JSDC_Action(void);
  7. extern void JSDC_DelayAction(void);
  8. extern void JSDC_ExtiActionX30(void);
  9. extern void JSDC_ExtiActionX31(void);
  10. #define SET_LEN_ADDR 6
  11. #define SET_LEN_ADDR_JY 26
  12. #define CLR_PULSE_DELAY 100
  13. #define MAXSPEED 150
  14. #define JSDC_ALARM_ADDR 100
  15. #define JSDC_TOTAL_ADDR 0
  16. #define JSDC_PROSPEED_ADDR 78
  17. //故障代码列表
  18. #define JSDC_NO_ALARM 0
  19. #define JSDC_TOTAL_ALARM 1
  20. #define JSDC_KADAI_ALARM 2
  21. #define JSDC_XIACHONG_LIMIT_ALARM 3
  22. #define JSDC_XIACHONG_ORIGIN_ALARM 4
  23. #define JSDC_START_XIACHONG_ALARM 5
  24. #define JSDC_SEBIAO_ALARM 6
  25. #define JSDC_NO_ZIPPER_ALARM 7
  26. #define JSDC_GZ_ALARM 8
  27. #define SET_ACCDEC 10
  28. #define JSDC_DIR_P 0
  29. #define JSDC_ALALRM_DELAY 100
  30. #define JSDC_XiaChongStep cStepMByte3
  31. #define JSDC_ManualStep cStepMByte2
  32. #define JSDC_MotorStep cStepMByte1
  33. #define JSDC_AutoStep cStepMByte
  34. #define JSDC_XiaChongDelay cDelayTime1
  35. #define JSDC_AutoDelay cDelayTime2
  36. #define JSDC_ChuiQiDelay cDelayTime3
  37. #define JSDC_AlarmDelay cDelayTime4
  38. #define JSDC_MotorDelay cDelayTime5
  39. #define JSDC_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
  40. #define JSDC_SET_ZIPPER_LENGTH (user_datas[6] | user_datas[7] << 16)
  41. #define JSDC_SET_ZIPPER_LENGTH_INCH (user_datas[8] | user_datas[9] << 16)
  42. #define JSDC_SET_KONGWEI_LENGTH user_datas[10]
  43. #define JSDC_SET_KONGWEI_LENGTH_INCH user_datas[11]
  44. #define JSDC_SET_ALL_LENGTH (user_datas[12] | user_datas[13] << 16)
  45. #define JSDC_SET_ALL_LENGTH_INCH (user_datas[14] | user_datas[15] << 16)
  46. #define JSDC_NOW_POS (user_datas[16] | user_datas[17] << 16)
  47. #define JSDC_PARAM_SHACHE_TIME (user_datas[18]*10)
  48. #define JSDC_PARAM_XC_ALARM_TIME (user_datas[19]*10)
  49. #define JSDC_PARAM_DAOKOU_LENGTH user_datas[20]
  50. #define JSDC_PARAM_YD_DELAY (user_datas[21]*10)
  51. #define JSDC_PARAM_LOW_SPEED user_datas[22]
  52. #define JSDC_PARAM_LOWSPEED_LENGTH user_datas[23]
  53. #define JSDC_PARAM_HIGH_SPEED user_datas[24]
  54. #define JSDC_PARAM_CHUIQI_TIME (user_datas[25]*10)
  55. #define JSDC_PARAM_CYCLE_DELAY (user_datas[26]*10)
  56. #define JSDC_PARAM_OVER_TIME (user_datas[27]*10)
  57. #define JSDC_PARAM_SHACHE_DELAY_TIME (user_datas[28]*10)
  58. #define JSDC_PARAM_GZ_DELAY (user_datas[29]*10)
  59. #define JSDC_PARAM_LENGTH_MODE user_datas[30] //数控轮方式0为带编码器,1为直接电机定长
  60. #define JSDC_SEBIAO_MODE user_datas[31] //色标模式,0为普通1为色标模式
  61. #define JSDC_DC_MODE user_datas[32] //定寸模式,0为勾针1为数控模式
  62. #define JSDC_SX_ENABLE user_datas[33] //双铣配置,0为取消1为双铣模式
  63. #define JSDC_SC_MODE user_datas[34] //刹车模式,0为延时1为长期刹车
  64. #define JSDC_GZ_RESET_MODE user_datas[35] //勾针复位模式,0为自动1为长度复位
  65. #define JSDC_SEBIAO_DELAY_LENGTH user_datas[36]//色标模式延迟下冲长度
  66. #define JSDC_GZ_RESET_LENGTH user_datas[37]//勾针复位长度
  67. #define JSDC_PARAM_CYCLE_PULSE user_datas[38]
  68. #define JSDC_PARAM_CYCLE_LENGTH user_datas[39]
  69. #define JSDC_PARAM_CYCLE_BM_LENGTH user_datas[40]
  70. #define DISPLAY_DATA0 user_datas[121]
  71. #define DISPLAY_DATA1 user_datas[122]
  72. #define DISPLAY_DATA2 user_datas[123]
  73. #define DISPLAY_DATA3 user_datas[124]
  74. #define DISPLAY_DATA4 user_datas[125]
  75. #define DISPLAY_DATA5 user_datas[126]
  76. #define DISPLAY_DATA6 user_datas[127]
  77. #define DISPLAY_DATA7 user_datas[128]
  78. #define JSDC_XC_MODE 1 //0为普通气缸上模1为刹车电机离合下冲
  79. #define START_IN X00
  80. #define START_IN_UP (X00 && !OLDX00)
  81. #define STOP_IN X01
  82. #define STOP_IN_UP (X01 && !OLDX01)
  83. #define JSDC_XC_LIMIT_IN X02
  84. #define JSDC_KaDai_IN X03
  85. #define JSDC_ManXiaChong_UP (X04 && !OLDX04)
  86. #define JSDC_DEC_IN X05
  87. #define JSDC_DEC_IN_UP (X05 && !OLDX05)
  88. #define JSDC_DEC_IN_DW (!X05 && OLDX05)
  89. #define JSDC_GUO_LIAN_IN_UP (!X06 && OLDX06)
  90. #define JSDC_GZ_IN X07
  91. #define JSDC_XC_ORIGIN_IN X11
  92. #define JSDC_XC_ORIGIN_IN_UP (X11 && !OLDX11)
  93. #define JSDC_LiHe_VAVLE Y00
  94. #define JSDC_ChuiQi_VAVLE Y01
  95. #define JSDC_XiaChong_MOTOR Y02
  96. #define JSDC_LFZ_VAVLE Y03
  97. #define JSDC_ALARM_LED Y04
  98. #define JSDC_RFZ_VAVLE Y05
  99. #define JSDC_GZ_VAVLE Y06
  100. #define JSDC_YD_VAVLE Y07
  101. #define JSDC_ShaChe_VAVLE Y10
  102. //M0~M4 Actioon.h全局使用
  103. #define JSDC_bLeftFZ M0005
  104. #define JSDC_bYD M0006
  105. #define JSDC_bRightFZ M0007
  106. #define JSDC_bGZ M0008
  107. #define JSDC_bStart M0009
  108. #define JSDC_bAdd M0010
  109. #define JSDC_bDec M0011
  110. #define JSDC_bSetCM M0016
  111. #define JSDC_bRunning M0017
  112. #define JSDC_bStop M0018
  113. #define JSDC_bMotor M0019
  114. #define JSDC_bXC M0020
  115. #define JSDC_bCQ M0021
  116. #define JSDC_bAlarmStop M0036
  117. #define JSDC_bSetInch M0039
  118. #endif
  119. #endif