ZhenYuChuantou_HeLian.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. #if ZHEN_YU_MACHINE == 1
  2. extern void YWXChuanTou_HeLian_InitAction(void);
  3. extern void YWXChuanTou_HeLian_Action(void);
  4. extern void YWXChuanTou_HeLian_SetAlarmCode(unsigned alarm_code);
  5. extern void ExtiAcitionX02(void);
  6. #define DIR_P 1
  7. #define DIR_N 0
  8. #define MOTOR_EN 0
  9. #define MOTOR_DISEN 1
  10. #define MOTOR_ALARM 0
  11. #define MOTOR_NOALARM 1
  12. #define CTHL_VAVLE_ERROR_TIME 3000
  13. #define CTHL_MOTOR_ALARM_TIME 5000
  14. //故障代码列表
  15. #define CTHL_NO_ALARM 0
  16. #define CTHL_WLZDTJ_ALARM 1 //无拉链自动停机
  17. #define CTHL_TLiao_Limit_ALARM 3 //给拉头到位异常*
  18. #define CTHL_HSLiao_Limit_ALARM 5 //横送料到位异常
  19. #define CTHL_HSLiao_Origin_ALARM 6 //横送料原位异常*
  20. #define CTHL_JLT_MZ_ALARM 7 //夹拉头到位信号、拉头检测异常*
  21. #define CTHL_CTXM_Limit_ALARM 8 //下模到位异常*
  22. #define CTHL_CTXM_Origin_ALARM 9 //下模原位异常*
  23. #define CTHL_JLT_Limit_ALARM 20 //夹拉头到位异常*
  24. #define CTHL_XCJC_Origin_ALARM 21 //插销钩针原位异常 *
  25. #define CTHL_FZYL_Limit_ALARM 22 //右压轮到位异常
  26. #define CTHL_JCXBD_Limit_ALARM 23 //插销布带夹到位异常
  27. #define CTHL_CXHT_Limit_ALARM 25 //插销回退到位异常
  28. #define CTHL_CXBB_Limit_ALARM 26 //插销摆臂到位异常
  29. #define CTHL_FK_Check_ALARM 27 //方块光纤检测异常
  30. #define CTHL_CXGY_Check_ALARM 28 //插销到位感应检测异常
  31. #define CTHL_SM_Limit_ALARM 29 //上摸到位异常
  32. #define CTHL_SERVO_CONFIG_ALARM 30 //是否配置转矩限制失败
  33. #define CTHL_MSLENGTH_OUT_ALARM 31 //穿链慢速超出拉链长度
  34. #define CTHL_FZMOTOR_ALARM 32 //反转电机卡滞
  35. #define CTHL_SYHL_ERRO_ALARM 33 //剩余合练长度设置错误
  36. #define CTHL_TXM_Limit_ALARM 13 //侧推布带到位异常
  37. #define CTHL_JXM_Limit_ALARM 10 //夹斜码要输出才能推斜码
  38. #define CTHL_XCDW_Limit_ALARM 11 //拉头缺料感应异常
  39. #define CTHL_QMDW_Limit_ALARM 12 //前码定位感应异常
  40. #define CTHL_XCBI_Limit_ALARM 14 //小插摆臂到位异常
  41. #define CTHL_SafeDoor_ALARM 15 //
  42. #define CTHL_SF_ALR_ALARM 16 //伺服报警异常
  43. #define CTHL_FXDW_ALARM 17 //方块定位(X04)异常
  44. #define CTHL_ZLT_ALARM 18 //装拉头异常*
  45. #define CTHL_CRFK_ALARM 19 //穿入长度异常超出预设长度
  46. #define CTHL_AutoStep cStepMByte
  47. #define CTHL_ZhuangLiaoStep cStepMByte1
  48. #define CTHL_TLiaoStep cStepMByte2
  49. #define CTHL_TD_MotorStep cStepMByte3 //拖带电机
  50. #define CTHL_JiaLianStep cStepMByte4
  51. #define CTHL_ZhenDongStep cStepMByte6
  52. #define CTHL_SongLiaoStep cStepMByte7
  53. #define CTHL_FZ_MotorStep cStepMByte8 //穿链
  54. #define CTHL_AutoStep1 cStepMByte9
  55. #define CTHL_ZhuangLiaoDelay cDelayTime2
  56. #define CTHL_TLiao_Delay cDelayTime3
  57. #define CTHL_TD_MotorDelay cDelayTime4
  58. #define CTHL_AutoDelay cDelayTime5
  59. #define CTHL_TestDelay cDelayTime6
  60. #define CTHL_FZ_MotorDelay cDelayTime7
  61. #define CTHL_TouchDelay cDelayTime8
  62. #define CTHL_AutoDelay1 cDelayTime9
  63. #define CTHL_ZDP_Delay cDelayTime10
  64. #define CTHL_MOTORZ_Delay cDelayTime11
  65. #define CTHL_bSFBBAOJIN_Delay cDelayTime12
  66. //32位无符号变量
  67. #define CTHL_LianLengthCheckFirst cUDword32Buff1
  68. #define CTHL_LianLengthCheck cUDword32Buff2
  69. #define CTHL_LianLengthXFZCheckFirst cUDword32Buff3
  70. #define CTHL_LianLengthXFZCheck cUDword32Buff4
  71. #define CTHL_LianLengthYFZCheckFirst cUDword32Buff5
  72. #define CTHL_LianLengthYFZCheck cUDword32Buff6
  73. #define CTHL_LianLengthGLCheckFirst cUDword32Buff13
  74. #define CTHL_LianLengthGLCheck cUDword32Buff14
  75. #define CTHL_GLGY_FKDW_Length cUDword32Buff7//过链感应与方块钩针的距离
  76. #define CTHL_FKGY_FKDW_Length cUDword32Buff8//过链感应与方块钩针的距离
  77. #define CTHL_FKGY_Length cUDword32Buff9//方块感应长度,X轴
  78. #define CTHL_FKGY_STOP_Length cUDword32Buff10//方块感应减停长度
  79. #define CTHL_DataBuff cUDword32Buff11
  80. #define CTHL_CXCD cUDword32Buff12 //穿插销长度
  81. //32位有符号变量
  82. #define CTHL_XSavePosBuff cDword32Buff1
  83. #define CTHL_X_CXPosBuff cDword32Buff2
  84. #define CTHL_YSavePosBuff cDword32Buff3
  85. #define CTHL_YsaveFZPosBuff cDword32Buff5
  86. #define CTHL_LENTH cDword32Buff6
  87. #define CTHL_XSavePosBuff1 cDword32Buff7
  88. #define CTHL_XSavePosBuff2 cDword32Buff8
  89. #define CTHL_XSavePosBuff3 cDword32Buff9//感应到第一个方块插销位置
  90. #define CTHL_HL_LENTH cDword32Buff10
  91. //
  92. #define XY_CTHL_CheckInX02PosBuff cDword32Buff4//?
  93. //16位变量
  94. #define CTHL_RunStepSave cUShort16Buff1
  95. #define CTHL_Test cUShort16Buff2
  96. //8位变量
  97. #define CTHL_TryCnt cCharBuff1
  98. #define CTHL_cZipCnt cCharBuff2
  99. #define CTHL_stop cCharBuff3
  100. #define CTHL_AUTO_start cCharBuff4
  101. #define CTHL_wltzi cCharBuff6
  102. #define cStopMode cCharBuff7
  103. #define cTDAUTO cCharBuff8
  104. #define cDELAYONE cCharBuff9
  105. #define cHELIANMG cCharBuff11
  106. #define cBAOjin cCharBuff12
  107. //位标志位
  108. #define bTuiLaTouOkFlg bBitFlag0
  109. #define bZhuangLiaoOkFlg bBitFlag1
  110. #define bXiaoMOUpFlg bBitFlag2
  111. #define bCL_EN_FLG bBitFlag4
  112. #define bCL_OK_FLG bBitFlag5
  113. #define bCheckEN_FLG bBitFlag6
  114. #define bSingOneFlg bBitFlag7
  115. #define bCxcAuto bBitFlag8
  116. #define bDanBuAuto bBitFlag9
  117. #define bFZ_LengthOK bBitFlag10
  118. #define bFKCheck_Flag bBitFlag11
  119. #define CTHL_ZhouWanone bBitFlag12
  120. #define CTHL_ZhouWantwo bBitFlag13
  121. #define CTHL_GF_Change bBitFlag14
  122. #define CTHL_SD bBitFlag15 //松一次带
  123. #define CTHL_TOTAL_ADDR 76
  124. #define CTHL_SPEED_ADDR 78
  125. #define CTHL_ALARM_ADDR 100
  126. #define CTHL_TRUST_ALARM_ADDR 102
  127. //104、105地址 作产量锁
  128. #define CTHL_PARAM_TDCYCLE_PULSE user_datas[0]//0 转一圈脉冲数
  129. #define CTHL_PARAM_TDCYCLE_LENGTH user_datas[1]//整数 转一圈拖带多长
  130. #define CTHL_PARAM_FZCYCLE_LENGTH user_datas[2]//0 转一圈脉冲数
  131. #define CTHL_PARAM_FZLDCYCLE_LENGTH user_datas[3]//整数 转一圈拖带多长
  132. //#define CTHL_PARAM_TD_RunSpeed user_datas[4]//整数 拖带电机拖带速度
  133. #define CTHL_PARAM_FKDW_Speed user_datas[5]//整数 方块定位速度(低速度)
  134. #define CTHL_PARAM_FZDS_Speed user_datas[6]//整数 反转低速
  135. #define CTHL_PARAM_FZJSDS_LENGTH user_datas[34] //穿入方块低速长度
  136. //#define CTHL_PARAM_FKDW_Length user_datas[8]//0.01 方块定位长度
  137. //给拉头
  138. #define CTHL_PARAM_TLiao_FORWARDDELAY (10*user_datas[12])//延时推给拉头阀*
  139. #define CTHL_PARAM_TLiao_BACKDELAY (10*user_datas[13])//延时回退给拉头阀*
  140. //装拉头
  141. #define CTHL_PARAM_HSLiao_FORWARDDELAY (10*user_datas[14])//0.01延时横送
  142. #define CTHL_PARAM_HSLiao_BACKDELAY (10*user_datas[15])//延时横送回退
  143. #define CTHL_PARAM_JLiaoCH_DELAY (10*user_datas[18]) //夹拉头检测延时
  144. #define CTHL_PARAM_MaGou_DELAY (10*user_datas[19]) //夹到位后延时码钩
  145. // 保护长度
  146. #define CTHL_PARAM_first_CL_MAX_Length (10*user_datas[7])//第一条拉链最长度
  147. #define CTHL_PARAM_WLCDSHEZHI_LENTH user_datas[16] //拉带报警长度
  148. #define CTHL_PARAM_CXDW_Length user_datas[17] //小插定位长度
  149. //固定尺寸长度
  150. //
  151. #define CTHL_PARAM_FMOTOR_BILI 0.95// (user_datas[20]/100) //0.01 副电机指数
  152. //
  153. #define CTHL_PARAM_HLDW_LENGTH user_datas[23] //合练定位长度
  154. #define CTHL_PARAM_SMG_LENGTH user_datas[24] //松码钩后输出合链长度
  155. #define CTHL_PARAM_ZDP_Start_TIME (10*user_datas[25]) //0.01振动盘启动延时
  156. #define CTHL_PARAM_ZDP_Stop_TIME (10*user_datas[26]) //0.01振动盘延时停止
  157. #define CTHL_PARAM_HELIAN_LENGTH user_datas[27] //剩余合链长度
  158. //#define CTHL_PARAM_FDGN_LENGTH user_datas[28] //第一个方块屏蔽长度
  159. //#define CTHL_PARAM_FKJC_DELAY (user_datas[29]*10) //延时输出方块检测
  160. #define CTHL_PARAM_XCCR_SPEED user_datas[31] //小插插入速度
  161. #define CTHL_PARAM_ZDP_AUTO user_datas[32] //振动盘控制
  162. //#define CTHL_PARAM_GFJSZ_LENGTH user_datas[37] //倒带长度
  163. #define CTHL_PARAM_XMDD_LENGTH user_datas[38] //斜码松带反转
  164. #define CTHL_PARAM_DBSF_MODE user_datas[39] // DB伺服报警切换 1外部接口
  165. //穿链参数
  166. #define CTHL_PARAM_JXM_SPEED user_datas[41] //穿拉头速度
  167. #define CTHL_PARAM_FZ_Speed (user_datas[51]) //走链速度
  168. #define CTHL_PARAM_XMCR_SLOW_LENGTH user_datas[56]//穿链长度
  169. #define CTHL_PARAM_SMXJ_LENGTH user_datas[43]//上摸下降长度
  170. #define CTHL_PARAM_TJXM_LENGTH user_datas[44]//退夹斜码长度
  171. #define CTHL_PARAM_FZFirst_SPEED user_datas[152]//前两条反转速度
  172. #define CTHL_PARAM_TXM_DELAY (user_datas[42]*10) //侧推布带到位延时
  173. #define CTHL_PARAM_FKDW_OUT_DELAY (user_datas[52]*10) //方块定位阀延时动作
  174. //插销参数
  175. #define CTHL_PARAM_HLT_SPEED_Speed user_datas[11]//穿插销的速度
  176. #define CTHL_PARAM_CRFZ_LENGTH (user_datas[58]) //穿插销后退长度
  177. #define CTHL_PARAM_XCCR_LENGTH user_datas[33] //小插插入长度
  178. #define CTHL_PARAM_XCIN_DELAY (user_datas[35]*10) //小插定位下降后,延时松上模
  179. #define CTHL_PARAM_CXBB_DELAY (user_datas[36]*10) //插销摆臂
  180. #define CTHL_PARAM_YSCX_DELAY user_datas[22]*10 //延时插销时间
  181. #define CTHL_PARAM_JBD_DELAY (user_datas[30]*10) //夹布带延时
  182. #define CTHL_PARAM_XCLD_DELAY (10*user_datas[21]) //延时合链
  183. #define CTHL_PARAM_FZXZ_LENGTH user_datas[46]//反转修正长度
  184. #define CTHL_PARAM_FZJS_LENGTH user_datas[38] //反转入方块减速长度
  185. #define CTHL_PARAM_FZSTOP_LENGTH user_datas[9] //反转入方块停机长度
  186. #define CTHL_PARAM_FZSJ_LENGTH user_datas[45]//反转松紧调整
  187. //合链参数
  188. #define CTHL_PARAM_TD_RunSpeed (user_datas[50])//整数 拖带电机拖带速度
  189. #define CTHL_PARAM_TuiXiaMo_DELAY (10*user_datas[53]) //延时退上模
  190. //拖带设置
  191. #define CTHL_PARAM_CLsudu_SPEED (user_datas[62]) //长链拖带快速速度
  192. #define CTHL_PARAM_First_SPEED user_datas[150] //前两拖带条速度
  193. #define CTHL_PARAM_XMUP_LENGTH user_datas[40] // 下模上升位置
  194. //方块定位
  195. #define CTHL_PARAM_FKDWMAN_Speed user_datas[10] //感应到方块后慢速
  196. #define CTHL_PARAM_TDDW_LENGTH user_datas[8] //感应到方块后定位距离
  197. #define CTHL_PARAM_GJSY_LENGTH user_datas[28] //方块过链感减速位置
  198. #define CTHL_PARAM_FKDW_DW_LENGTH user_datas[54] //方块定位下降位置
  199. //伺服参数 180~190
  200. #define SERVO_PARAM_TRARR_LIMITMAX user_datas[180]//伺服扭矩最大限制
  201. #define SERVO_PARAM_TRARR_LIMITMIN user_datas[181]//伺服扭矩最小限制
  202. #define SERVO_PARAM_SPEED_DIFFER user_datas[182]//速度差值
  203. #define SERVO_PARAM_ENCODE user_datas[190]//转换后的值
  204. #define SERVO_PARAM_ALARM user_datas[192]//转换后的值
  205. #define CTHL_PARAM_FZCXC_LENGTH user_datas[47]//穿小插反转距离
  206. #define CTHL_PARAM_XMZM_MODE user_datas[48]//斜码直码切换
  207. #define CTHL_PARAM_YSXC_DELAY (user_datas[49]*10)//延时顶链
  208. #define CTHL_PARAM_TDDW_FIRST_LENGTH user_datas[63] //感应到方块后定位距离
  209. #define CTHL_PARAM_FKDW_DW_FIRST_LENGTH user_datas[55] //方块定位下降位置
  210. #define CTHL_PARAM_CYCLE_TIME (user_datas[57]) //循环时间
  211. #define CTHL_PARAM_ZLT_TIME (user_datas[61]) //装拉头时间
  212. #define CTHL_PARAM_CL_TIME (user_datas[66]) //穿链时间
  213. #define CTHL_PARAM_TD_TIME (user_datas[65]) //拉带时间
  214. #define CTHL_PARAM_HeLianSY_LENGTH (user_datas[60]) //最后一条合链剩余长度
  215. //速度页面调试参数
  216. #define CTHL_PARAM_Stop_length user_datas[151] //前两条定位长度
  217. #define CTHL_PARAM_GFJ_LENGTH user_datas[153] //前两条反转定位长度
  218. /*
  219. #define CTHL_FK_Check M0384 //X00过链感应
  220. #define CTHL_FK_Check_UP (M0384 && !OLDM384)
  221. #define CTHL_FK_Check_DW (!M0384 && OLDM384)
  222. #define CTHL_TFK_Limit_IN M0385 //X01推前码到位
  223. #define CTHL_FKGY_IN M0386 //X02方块感应
  224. #define CTHL_FKGY_IN_UP (M0386 && !OLDM386)
  225. #define CTHL_FKGY_IN_DW (!M0386 && OLDM386)
  226. #define CTHL_TXC_Limit_IN M0387 //X03推小插到位
  227. #define CTHL_FKDW_IN M0388 //X04方块定位感应
  228. #define CTHL_FKDW_IN_UP (M0388 && !OLDM388)
  229. #define CTHL_LTou_Check M0389 //X05开锁完成
  230. #define CTHL_CTM_Origin_IN M0390 //X06下模原位
  231. #define CTHL_CTM_Limit_IN M0391 //X07下模到位
  232. #define CTHL_JLiao_Limit_IN M0392 //X10接拉头到位
  233. #define CTHL_HSLiao_Origin_IN M0393 //X11横送料原位
  234. #define CTHL_HSLiao_Limit_IN M0394 //X12横送料到位
  235. #define CTHL_TLiao_Origin_IN M0395 //X13推料原位
  236. #define CTHL_TXM_Limit_IN M0396 //X14推斜码到位
  237. #define CTHL_XCDW_Limit_IN M0397 //X15小插到位
  238. #define CTHL_QMDW_IN M0398 //X16前码定位
  239. #define CTHL_QMDW_IN_UP (M0398 && !OLDM398)
  240. #define CTHL_ZDP_IN M0399 //X17振动盘
  241. #define CTHL_SF_ALR_IN M0400 //X20 伺服报警
  242. #define CTHL_SafeDoor_IN M0401 //X21 安全门
  243. #define CTHL_START_IN M0402 //X22 //启动
  244. #define CTHL_START_IN_UP (M0402 && !OLDM402)
  245. #define CTHL_STOP_IN M0403 // X23 //停止
  246. #define CTHL_STOP_IN_UP (M0403 && !OLDM403)
  247. #define CTHL_STOP_IN_DW (!M0403 && OLDM403)
  248. #define CTHL_NoLaLian_IN M0404 //X24 最后拉链信号
  249. #define CTHL_NoLaLian_IN_UP (M0404 && !OLDM404)
  250. */
  251. //振宇输入
  252. #define CTHL_START_IN M0384 //X00 //启动
  253. #define CTHL_START_IN_UP (M0384 && !OLDM384)
  254. #define CTHL_STOP_IN M0385 // X01 //停止
  255. #define CTHL_STOP_IN_UP (M0385 && !OLDM385)
  256. #define CTHL_STOP_IN_DW (!M0385 && OLDM385)
  257. #define CTHL_TLiao_Limit_IN M0386 //X02推料到位,给拉头到位
  258. #define CTHL_HSLiao_Origin_IN M0387 //X03横送料原位
  259. #define CTHL_HSLiao_Limit_IN M0388 //X04横送料到位
  260. #define CTHL_FK_Check M0389 //X05方块过链感应
  261. #define CTHL_FK_Check_UP (M0389 && !OLDM389)
  262. #define CTHL_FK_Check_DW (!M0389 && OLDM389)
  263. #define CTHL_FKDW_IN M0390 //X06方块定位感应
  264. #define CTHL_FKDW_IN_UP (M0390 && !OLDM390)
  265. #define CTHL_FKDW_IN_DW (!M0390 && OLDM390)
  266. #define CTHL_FKGY_IN M0391 //X07方块感应,反转时感应
  267. #define CTHL_FKGY_IN_UP (M0391 && !OLDM391)
  268. #define CTHL_FKGY_IN_DW (!M0391 && OLDM391)
  269. #define CTHL_SML_Limit_IN M0392 //X10上模到位
  270. #define CTHL_TXM_Limit_IN M0393 //X11推斜码到位,侧推布带到位
  271. #define CTHL_CXGY_IN M0394 //X12插销到位感应开关
  272. #define CTHL_CXGY_IN_UP (M0394 && !OLDM394)
  273. #define CTHL_CXGY_IN_DW (!M0394 && OLDM394)
  274. #define CTHL_JLiao_Limit_IN M0395 //X13接拉头到位,夹拉头到位
  275. #define CTHL_XCJC_Origin_IN M0396 //X14插销钩针原位,插销检测气缸原位
  276. #define CTHL_CTXM_Origin_IN M0397 //X15下模原位
  277. #define CTHL_CTXM_Limit_IN M0398 //X16下模到位
  278. #define CTHL_XCBB_Limit_IN M0399 //X17插销摆动到位
  279. #define CTHL_JCXBD_Limit_IN M0400 //X20夹插销布
  280. #define CTHL_CXHT_Limit_IN M0401 //X21插销h后退到位
  281. #define CTHL_FZYL_Limit_IN M0402 //X22右拖带压轮到位
  282. #define CTHL_LTou_Check M0403 //X23缺拉头检测,有信号代表缺拉头。
  283. #define CTHL_KDSW_IN M0404 //X23卡带开关
  284. #define CTHL_ZDP_IN M0405 //X17振动盘
  285. #define CTHL_SF_ALR_IN M0406 //X20 伺服报警
  286. #define CTHL_SafeDoor_IN M0407 //X21 安全门
  287. #define CTHL_NoLaLian_IN M0408 //X24 最后拉链信号
  288. #define CTHL_NoLaLian_IN_UP (M0408 && !OLDM408)
  289. //输出
  290. /*
  291. #define CTHL_TLiao_VAVLE M0304 //Y00推料
  292. #define CTHL_HSLiao_VAVLE M0305 //Y01横送料
  293. #define CTHL_JLTou_VAVLE M0306 //Y02接拉头
  294. //#define CTHL_CTXM_VAVLE M0307 //Y03下模
  295. #define CTHL_MGuo_VAVLE M0308 //Y04码勾电磁阀
  296. #define CTHL_JXM_VAVLE M0309 //Y05夹斜码电磁阀
  297. #define CTHL_TXM_VAVLE M0310 //Y06推斜码电磁阀
  298. #define CTHL_QMDW_VAVLE M0311 //Y07前码定位电磁阀
  299. #define CTHL_TFK_VAVLE M0312 //Y10推方块
  300. //#define CTHL_FKDW_VAVLE M0313 //Y11方
  301. #define CTHL_CTXM_VAVLE M0313 //Y11下模
  302. #define CTHL_HL_VAVLE M0314 //Y12合链电磁阀
  303. #define CTHL_YFK_VAVLE M0315 //Y13压方块电磁阀
  304. #define CTHL_YXC_VAVLE M0316 //Y14压小插电磁阀
  305. #define CTHL_XCDW_VAVLE M0317 //Y15小插到位检测电磁阀
  306. #define CTHL_JCBI_VAVLE M0318 //Y16小插摆臂电磁阀
  307. #define CTHL_ZhenDongPian_OUT M0319 //Y17振动盘吹气
  308. #define CTHL_SF_ALR_CLR M0320 //Y20伺服报警清除
  309. #define CTHL_DingLian_VAVLE M0321 //Y21顶链电磁阀
  310. #define CTHL_TestLED M0328 //Y30 测试状态灯
  311. */
  312. #define CTHL_TLiao_VAVLE M0304 //Y00给拉头
  313. #define CTHL_HSLiao_VAVLE M0305 //Y01横送拉头
  314. #define CTHL_TXM_VAVLE M0306 //Y02侧推布带电磁阀 ,推方块侧的斜码、直码
  315. #define CTHL_SMZ_VAVLE M0307 //Y03上模组电磁阀,反转后检测方块装置、检测信号X7
  316. #define CTHL_FKDW_VAVLE M0308 //Y04方块钩针定位升降电磁阀,拖带时检测方块装置,信号X6
  317. #define CTHL_HL_VAVLE M0309 //Y05合练
  318. #define CTHL_XCJC_VAVLE M0310 //Y06小插到位检测电磁阀,插销钩针气缸,检测信号X12;
  319. #define CTHL_JLTou_VAVLE M0311 //Y07夹拉头电磁阀
  320. #define CTHL_MGuo_VAVLE M0312 //Y10码勾电磁阀,拉头开锁电磁阀
  321. #define CTHL_CTXM_VAVLE M0313 //Y11下模
  322. #define CTHL_XCBB_VAVLE M0314 //Y12插销摆臂电磁阀,侧推小插侧的布带
  323. #define CTHL_JCXBD_VAVLE M0315 //Y13夹插侧的布带,为装入小插准备
  324. #define CTHL_CXHT_VAVLE M0316 //Y14小插销后退,夹着小插销布带后退
  325. #define CTHL_FZYL_VAVLE M0317 //Y15右拖带压轮,反转压轮
  326. #define CTHL_ZhenDongPian_OUT M0319 //Y17控制振动盘
  327. #define CTHL_SF_ALR_CLR M0320 //Y20伺服报警清除
  328. #define CTHL_DingLian_VAVLE M0321 //Y21顶链电磁阀
  329. #define CTHL_TestLED M0328 //Y30 测试状态
  330. //M0~M4全局固定使用
  331. /*
  332. #define bRunning M0000
  333. #define bStart M0001
  334. #define bStop M0002
  335. #define bAlarmStop M0003
  336. #define bClearTotal M0004
  337. */
  338. #define CTHL_bHSL M0005 //手动横送料
  339. #define CTHL_bTLiao M0006 //手动推料
  340. #define CTHL_bJLT M0007 //夹拉头
  341. #define CTHL_bMG M0008 //码勾
  342. #define CTHL_bCTXM M0009 //下模
  343. #define CTHL_bCXHT M0010 //插销回退
  344. #define CTHL_bTXM M0011 //侧推布带
  345. #define CTHL_bSM M0013 //上摸
  346. #define CTHL_bFKDW M0014 //方块定位
  347. #define CTHL_bJCXBD M0015 //插销布带夹
  348. #define CTHL_bGLBG M0016 //过链摆杆
  349. #define CTHL_bFZYL M0017 //右拖压带
  350. #define CTHL_bCXDW M0018 //插销钩针
  351. #define CTHL_bCXBB M0019 //插销摆动
  352. #define CTHL_bSingOne M0020 //单循环
  353. #define CTHL_bDANBU_MODE M0021 //单步调试
  354. #define CTHL_bHandWork_MODE M0022 //手动穿链模式
  355. #define CTHL_bAutoZhuangLiao M0024 //自动装料
  356. #define CTHL_bYJDW M0029 //一键定位
  357. #define CTHL_bCLMotor_P M0025 //X轴电机测试
  358. #define CTHL_bCLMotor_N M0026 //X轴电机测试
  359. #define CTHL_bCLMotor_Z M0027 //Z轴电机测试
  360. #define CTHL_bBaoJin M0028 //报警清除加松轴
  361. #define CTHL_bTiaoShiMode M0040 //调试模式
  362. #define CTHL_bTiaoShiStep M0041 //调试单步
  363. extern void CTHL_InitAction(void);
  364. extern void CTHL_Action(void);
  365. #endif