JHJiaoYaDinCun.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. #ifndef __JHJIAOYADINCUN_H__
  2. #define __JHJIAOYADINCUN_H__
  3. #if JIN_HONG_MACHINE==1
  4. #define JHJY_DIR_P 1
  5. #define JHJY_DIR_N 0
  6. #define JYDC_DC_GD_MODE 0
  7. #define JYDC_DC_SB_MODE 1
  8. #define JYDC_DC_BMQ_MODE 2
  9. #define JYDC_DC_GZ_MODE 3
  10. extern void JYDC_InitAction(void);
  11. extern void JYDC_ManualAction(void);
  12. extern void JYDC_Action(void);
  13. extern void JYDC_ExtiActionX30(unsigned char up_down);
  14. extern void JYDC_ExtiActionX31(void);
  15. #define SET_LEN_ADDR 6
  16. #define SET_LEN_ADDR_JY 4 //对就齿数地址 32位
  17. #define CUR_LEN_ADDR_JY 8
  18. #define CLR_PULSE_DELAY 100
  19. #define MAXSPEED 150
  20. #define JYDC_ALARM_ADDR 100
  21. #define JYDC_TOTAL_ADDR 0
  22. #define JYDC_PROSPEED_ADDR 78
  23. //故障代码列表
  24. #define JYDC_NO_ALARM 0
  25. #define JYDC_TOTAL_ALARM 1
  26. #define JYDC_KADAI_ALARM 2
  27. #define JYDC_XIACHONG_ARRIVE_ALARM 3
  28. #define JYDC_COUNT_ALARM 4
  29. #define JYDC_START_XIACHONG_ALARM 5
  30. #define JYDC_SEBIAO_ALARM 6
  31. #define NO_TOOTHCOUT_TIME 10*user_datas[81] //多久没感应到数齿信号异常
  32. #define SET_ACCDEC 10
  33. #define JYDC_cXiaChongStep cStepMByte11
  34. #define JYDC_ManualStep cStepMByte2
  35. #define JYDC_cMotorStep cStepMByte1
  36. #define JYDC_cAutoStep cStepMByte
  37. #define JYDC_cGZDW_CNT cCharBuff4
  38. #define JYDC_cCSStopStep cStepMByte5//按齿数暂停
  39. //32位无符号
  40. #define JYDC_cAutoDelay cDelayTime2
  41. #define JYDC_ChuiQiDelay cDelayTime3
  42. #define JYDC_XiChiChuiQiDelay cDelayTime4
  43. #define JYDC_cMotorDelay cDelayTime5
  44. #define JYDC_CURJY_SET cDelayTime6
  45. #define JYDC_ShuChiStopDelay cDelayTime8
  46. #define JYDC_XiaChongDelay cDelayTime11
  47. #define JYDC_CRUKONGWEILENGTH cUDword32Buff6
  48. //32位有符号变量;
  49. #define JYDC_CURENCODELENGTH cDword32Buff1
  50. #define JYDC_LENGTHCMP cDword32Buff2
  51. #define JYDC_dwEncPos cDword32Buff3
  52. #define JYDC_ENCODEPULSE cDword32Buff4
  53. //
  54. #define SET_ZIPPER_LENGTH (user_datas[6] | user_datas[7] << 16)
  55. #define JYDC_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
  56. #define JYDC_PARAM_REVICHISHU (user_datas[4] | user_datas[5] << 16)//user_datas[26] 变为32位
  57. #define JYDC_PARAM_CHUIQI_TIME user_datas[30]
  58. // #define CUR_LEN_JY ( user_datas[8] | user_datas[9]<<16)//user_datas[8]变为32位
  59. #define JYDC_PARAM_SET_SPEED user_datas[11]
  60. #define JYDC_PARAM_LOW_SPEED user_datas[25]
  61. #define JYDC_PARAM_KONG_WEI_LENGTH user_datas[27] //除齿长度
  62. #define JYDC_PARAM_LOW_LENGTH user_datas[29]
  63. #define JYDC_PARAM_XC_ALARM_TIME (10*user_datas[16])//JYDC_Param->XC_AlarmTime //下冲最长时间
  64. #define JYDC_PARAM_SHACHE_DELAY_TIME (10 * user_datas[13])//JYDC_Param->ShaCheDelayTime //下冲最长时间
  65. #define JYDC_PARAM_SHACHE_TIME 300//(user_datas[38]*10) //JYDC_Param->ShaCheTime //刹车时间
  66. #define CUIQI_TIME user_datas[30]//JYDC_Param->CuiQiTime //吹气时间
  67. #define XIACONG_DELAY_TIME (10*user_datas[17])//JYDC_Param->XC_DelayTime //下冲最长时间
  68. #define SET_ZIPPER_LENGTH_INCH (user_datas[31] | user_datas[32] << 16)
  69. #define JYDC_PARAM_CYCLE_DELAY (10*user_datas[33])
  70. #define JYDC_COUNT_DIR user_datas[34] // 数齿信号方向
  71. #define JYDC_DC_MODE 0//user_datas[35]//色标模式,0为普通1为色标模式
  72. #define JYDC_SEBIAO_DELAY user_datas[36]//色标模式延迟下冲齿数
  73. #define JYDC_XICHI_MOTOR_MODE user_datas[37]//0为自动的时候不用铣齿电机,1为使用
  74. #define JYDC_FZ_MODE user_datas[39]//1为有反转
  75. #define JYDC_HLEVEL_TIME user_datas[40]//高电平检测时间
  76. #define JYDC_LLEVEL_TIME user_datas[41]//低电平检测时间
  77. #define JYDC_FILTER 10
  78. //#define JYDC_CYCLE_PULSE 3200//user_datas[39]
  79. //#define JYDC_CYCLE_LENGTH 2510//user_datas[39]
  80. #define JYDC_CYCLE_PULSE user_datas[42]
  81. #define JYDC_CYCLE_LENGTH user_datas[43]
  82. #define DISPLAY_DATA0 user_datas[121]
  83. #define DISPLAY_DATA1 user_datas[122]
  84. #define DISPLAY_DATA2 user_datas[123]
  85. #define DISPLAY_DATA3 user_datas[124]
  86. #define DISPLAY_DATA4 user_datas[125]
  87. #define DISPLAY_DATA5 user_datas[126]
  88. #define DISPLAY_DATA6 user_datas[127]
  89. #define DISPLAY_DATA7 user_datas[128]
  90. #define MODE_SELECT user_datas[51]
  91. #define JY_JIZHUN_CISHU user_datas[23] //基准齿数
  92. #define JY_JIZHUN_LEN user_datas[24] //基准长度
  93. #define SET_DAOKOU_JY user_datas[28] //机械模具刀口
  94. //3#
  95. #define JY_JIZHUN_CISHU1 user_datas[52] //基准齿数
  96. #define JY_JIZHUN_LEN1 user_datas[53] //基准长度
  97. #define SET_DAOKOU_JY1 user_datas[54] //机械模具刀口
  98. //5#
  99. #define JY_JIZHUN_CISHU2 user_datas[55] //基准齿数
  100. #define JY_JIZHUN_LEN2 user_datas[56] //基准长度
  101. #define SET_DAOKOU_JY2 user_datas[57] //机械模具刀口
  102. //8#
  103. #define JY_JIZHUN_CISHU3 user_datas[58] //基准齿数
  104. #define JY_JIZHUN_LEN3 user_datas[59] //基准长度
  105. #define SET_DAOKOU_JY3 user_datas[60] //机械模具刀口
  106. //特殊刀模
  107. #define JY_JIZHUN_CISHU4 user_datas[61] //基准齿数
  108. #define JY_JIZHUN_LEN4 user_datas[62] //基准长度
  109. #define SET_DAOKOU_JY4 user_datas[63] //机械模具刀口
  110. #define SET_STOP_PLUS user_datas[87] //停止脉冲数
  111. #define JYDC_START_IN M0384
  112. #define JYDC_START_IN_UP (M0384 && !OLDM384)
  113. #define JYDC_STOP_IN M0385
  114. #define JYDC_STOP_IN_UP (M0385 && !OLDM385)
  115. #define JYDC_STOP_IN_DW (!M0385 && OLDM385)
  116. #define JYDC_ManXiaChong_UP (M0386 && !OLDM386)
  117. #define JYDC_XiaChong_IN M0387
  118. #define JYDC_XiaChong_IN_UP (M0387 && !OLDM387)
  119. #define JYDC_XiaChong_IN_DW (!M0387 && OLDM387)
  120. #define JYDC_KaDai_IN M0388
  121. #define JYDC_ChuDai_IN_UP (M0394 && !OLDM394)
  122. #define JYDC_ChuDai_IN_DW (!M0394 && OLDM394)
  123. #define JYDC_ChuDai_IN (M0394)
  124. #define JYDC_ShaChe_VAVLE M0352
  125. #define JYDC_ChuiQi_VAVLE M0353
  126. #define JYDC_SuoChi_VAVLE M0354
  127. #define ALARM_LED M0356
  128. #define JYDC_XiaChong_MOTOR M0359
  129. #define JYDC_XiChi_MOTOR M0360
  130. #define JYDC_XiChiChuiQi_VAVLE M0363
  131. //M0~M4 Actioon.h全局使用
  132. #define JYDC_bManSuoChi M0005
  133. #define JYDC_bTest M0006
  134. #define JYDC_bManChuiQi M0007
  135. #define JYDC_bManXiaChong M0008
  136. #define JYDC_bStart M0009
  137. #define JYDC_bAddTooth M0010
  138. #define JYDC_bDecTooth M0011
  139. #define JYDC_bChangeLength M0016
  140. #define JYDC_bRunning M0017
  141. #define JYDC_bStop M0018
  142. #define JYDC_bSingleOrGroup M0019
  143. #define JYDC_bManXiChiMotor M0020
  144. #define JYDC_bSingleONE M0021
  145. #define JYDC_Check_HL M0022//检测高低电平
  146. #define JYDC_Check_HERRO M0023//检测高电平丢脉冲
  147. #define JYDC_Check_LERRO M0024//检测低电平丢脉冲
  148. #define JYDC_bAlarmStop M0036
  149. #define JYDC_bSetInch M0039
  150. #define JYDC_bSetTooth M0040
  151. #define JYDC_bManMotor M0041 //手动拖带
  152. #define JYDC_bManGuaChiMotor M0042
  153. #endif
  154. #endif