GLJiaoYaDinCun.h 7.7 KB

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