GLJiaoYaDinCun.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. //32位有符号变量;
  53. #define JYDC_CURENCODELENGTH cDword32Buff1
  54. #define JYDC_LENGTHCMP cDword32Buff2
  55. #define JYDC_dwEncPos cDword32Buff3
  56. #define JYDC_ENCODEPULSE cDword32Buff4
  57. //
  58. #define SET_ZIPPER_LENGTH (user_datas[6] | user_datas[7] << 16)
  59. #define JYDC_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
  60. #define JYDC_PARAM_REVICHISHU (user_datas[4] | user_datas[5] << 16)//user_datas[26] 变为32位
  61. #define JYDC_PARAM_CHUIQI_TIME user_datas[30]
  62. // #define CUR_LEN_JY ( user_datas[8] | user_datas[9]<<16)//user_datas[8]变为32位
  63. #define JYDC_PARAM_SET_SPEED user_datas[11]
  64. #define JYDC_PARAM_LOW_SPEED user_datas[25]
  65. //#define JYDC_PARAM_REVICHISHU user_datas[26]
  66. #define JYDC_PARAM_KONG_WEI_LENGTH user_datas[27] //除齿长度
  67. #define JYDC_PARAM_LOW_LENGTH user_datas[29]
  68. #define JYDC_PARAM_XC_ALARM_TIME (10*user_datas[16])//JYDC_Param->XC_AlarmTime //下冲最长时间
  69. #define JYDC_PARAM_SHACHE_DELAY_TIME (10 * user_datas[13])//JYDC_Param->ShaCheDelayTime //下冲最长时间
  70. #define JYDC_PARAM_SHACHE_TIME (user_datas[38]*10) //JYDC_Param->ShaCheTime //刹车时间
  71. #define CUIQI_TIME user_datas[30]//JYDC_Param->CuiQiTime //吹气时间
  72. #define XIACONG_DELAY_TIME (10*user_datas[17])//JYDC_Param->XC_DelayTime //下冲最长时间
  73. #define SET_ZIPPER_LENGTH_INCH (user_datas[31] | user_datas[32] << 16)
  74. #define JYDC_PARAM_CYCLE_DELAY (10*user_datas[33])
  75. #define JYDC_COUNT_DIR user_datas[34] // 数齿信号方向
  76. #define JYDC_DC_MODE 0//user_datas[35]//色标模式,0为普通1为色标模式
  77. #define JYDC_SEBIAO_DELAY user_datas[36]//色标模式延迟下冲齿数
  78. #define JYDC_XICHI_MOTOR_MODE user_datas[86]//0为自动的时候不用铣齿电机,1为使用
  79. #define JYDC_FZ_MODE user_datas[39]//1为有反转
  80. #define JYDC_HLEVEL_TIME user_datas[40]//高电平检测时间
  81. #define JYDC_LLEVEL_TIME user_datas[41]//低电平检测时间
  82. #define JYDC_FILTER 10
  83. #define JYDC_CYCLE_PULSE 3200//user_datas[39]
  84. #define JYDC_CYCLE_LENGTH 2990//user_datas[39]
  85. //#define JYDC_CYCLE_PULSE user_datas[42]
  86. //#define JYDC_CYCLE_LENGTH user_datas[43]
  87. #define DISPLAY_DATA0 user_datas[121]
  88. #define DISPLAY_DATA1 user_datas[122]
  89. #define DISPLAY_DATA2 user_datas[123]
  90. #define DISPLAY_DATA3 user_datas[124]
  91. #define DISPLAY_DATA4 user_datas[125]
  92. #define DISPLAY_DATA5 user_datas[126]
  93. #define DISPLAY_DATA6 user_datas[127]
  94. #define DISPLAY_DATA7 user_datas[128]
  95. #define MODE_SELECT user_datas[51]
  96. #define JY_JIZHUN_CISHU user_datas[23] //基准齿数
  97. #define JY_JIZHUN_LEN user_datas[24] //基准长度
  98. #define SET_DAOKOU_JY user_datas[28] //机械模具刀口
  99. //3#
  100. #define JY_JIZHUN_CISHU1 user_datas[52] //基准齿数
  101. #define JY_JIZHUN_LEN1 user_datas[53] //基准长度
  102. #define SET_DAOKOU_JY1 user_datas[54] //机械模具刀口
  103. //5#
  104. #define JY_JIZHUN_CISHU2 user_datas[55] //基准齿数
  105. #define JY_JIZHUN_LEN2 user_datas[56] //基准长度
  106. #define SET_DAOKOU_JY2 user_datas[57] //机械模具刀口
  107. //8#
  108. #define JY_JIZHUN_CISHU3 user_datas[58] //基准齿数
  109. #define JY_JIZHUN_LEN3 user_datas[59] //基准长度
  110. #define SET_DAOKOU_JY3 user_datas[60] //机械模具刀口
  111. //特殊刀模
  112. #define JY_JIZHUN_CISHU4 user_datas[61] //基准齿数
  113. #define JY_JIZHUN_LEN4 user_datas[62] //基准长度
  114. #define SET_DAOKOU_JY4 user_datas[63] //机械模具刀口
  115. #define SET_STOP_PLUS user_datas[87] //停止脉冲数
  116. #define JYDC_START_IN M0384//x00
  117. #define JYDC_START_IN_UP (M0384 && !OLDM384)
  118. #define JYDC_STOP_IN M0385//x01
  119. #define JYDC_STOP_IN_UP (M0385 && !OLDM385)
  120. #define JYDC_STOP_IN_DW (!M0385 && OLDM385)
  121. #define JYDC_ManXiaChong_UP (M0386 && !OLDM386)//x02
  122. #define JYDC_KaDai_IN M0387//x03
  123. #define JYDC_Wait_IN (M0394)//X12
  124. #define JYDC_Wait_IN_UP (M0394 && !OLDM394)
  125. #define JYDC_Wait_IN_DW (!M0394 && OLDM394)
  126. #define JYDC_XiaChong_IN M0396//x14
  127. #define JYDC_XiaChong_IN_UP (M0396 && !OLDM396)
  128. #define JYDC_XiaChong_IN_DW (!M0396 && OLDM396)
  129. #define JYDC_ShaChe_VAVLE M0352//Y00
  130. #define JYDC_ChuiQi_VAVLE M0353//Y01
  131. #define JYDC_SuoChi_VAVLE M0354//Y02
  132. #define JYDC_XiaChong_MOTOR M0356//Y04
  133. #define JYDC_XiChi_MOTOR M0357//Y05
  134. #define JYDC_XiChiChuiQi_VAVLE M0363
  135. //M0~M4 Actioon.h全局使用
  136. #define JYDC_bManSuoChi M0005
  137. #define JYDC_bTest M0006
  138. #define JYDC_bManChuiQi M0007
  139. #define JYDC_bManXiaChong M0008
  140. #define JYDC_bStart M0009
  141. #define JYDC_bAddTooth M0010
  142. #define JYDC_bDecTooth M0011
  143. #define JYDC_bChangeLength M0016
  144. #define JYDC_bRunning M0017
  145. #define JYDC_bStop M0018
  146. #define JYDC_bSingleOrGroup M0019
  147. #define JYDC_bManXiChiMotor M0029
  148. #define JYDC_bSingleONE M0030
  149. #define JYDC_bAlarmStop M0036
  150. #define JYDC_bSetInch M0039
  151. #define JYDC_bSetTooth M0040
  152. #define JYDC_bManMotor M0041 //手动拖带
  153. #define JYDC_bManGuaChiMotor M0042
  154. #define JYDC_Check_HL M0047//检测高低电平
  155. #define JYDC_Check_HERRO M0048//检测高电平丢脉冲
  156. #define JYDC_Check_LERRO M0049//检测低电平丢脉冲
  157. #endif
  158. #endif