JCWYJinShuDinCun.h 5.8 KB

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