FXWQueDuanJi_Bi.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. #if FU_XIAO_WEI_MACHINE == 1
  2. extern void Bi_QueDuan_Action(void);
  3. extern void Bi_QueDuan_InitAction(void);
  4. extern void Bi_QueDuanEx_ExtiActionX31(void);
  5. extern void FastTimerAction(void);
  6. #define Bi_QD_DIR_P 1
  7. #define Bi_QD_DIR_N 0
  8. #define PP_NoStop 1
  9. #define PP_Stop 0
  10. #define Bi_QD_YDIR_P 1
  11. #define Bi_QD_YDIR_N 0
  12. #define MOTOR_EN 0
  13. #define MOTOR_DISEN 1
  14. #define Bi_QD_WORKTOTAL_ADDR 102 //工作总量,不清除
  15. #define Bi_QD_TOTAL_ADDR 76 //生产总量
  16. #define Bi_QD_ALARM_ADDR 100 //警告代码地址
  17. #define Bi_QD_PROSPEED_ADDR 78 //生产速度地址
  18. #define Bi_QD_PARAM_ZIPPER_LENGTH_ADDR 1
  19. #define Bi_QD_BACK_INDUCTION_MODE 0 //后退纯感应方式
  20. #define Bi_QD_BACK_MEMORY_MODE 1 //后退记忆长度方式
  21. #define Bi_QD_BACK_INPUT_LENGTH_MODE 2 //后退手动输入长度方式
  22. #define Bi_QD_BACK_NOMAL_DEC_MODE 0 //后退感应减速方式
  23. #define Bi_QD_BACK_DIGITAL_MODE 1 //后退数控减速方式
  24. /*
  25. * 警告类型 警告编号
  26. */
  27. #define Bi_QD_NO_ALARM 0 //警告清除
  28. #define Bi_QD_NO_ZIPPER_ALARM 1 //没拉链,自动停机
  29. #define Bi_QD_KA_DAI_ALARM 2 //卡带异常
  30. #define Bi_QD_SM_YUANWEI 3 //上模上限位异常
  31. #define Bi_QD_SM_DAOWEI 4 //上模到位异常(下限位)异常
  32. #define Bi_QD_XM_YUANWEI 5 //下模下限位异常
  33. #define Bi_QD_XM_DAOWEI 6 //下模到位异常(上限位)
  34. #define Bi_QD_BACK_ALARM 7 // 拉带后退超过最大允许距离
  35. #define Bi_QD_TOTAL_ALARM 8 //产量计数到达
  36. //#define Bi_QD_TL_ALARM 9
  37. #define Bi_QD_GZ_ALARM 10 //勾针到位异常
  38. //#define Bi_QD_JD_ORIGIN_ALARM 11
  39. #define Bi_QD_LTWZYC_ALARM 12 //拉头感应异常
  40. #define Bi_QD_QIAN_LIMIT_ALARM 13 //前限位出错
  41. //#define Bi_QD_BL_ALARM 17
  42. #define Bi_QD_SM_ALARM 18 //上模输出不能有启动
  43. #define Bi_QD_LENGTH_LONG_ALARM 19 //拉链长度变长
  44. #define Bi_QD_LENGTH_SHORT_ALARM 20 //拉链长度变短
  45. #define Bi_QD_PARAM_RUN_LENGTH_ALARM 21 //超出轨道运行长度
  46. #define Bi_QD_PARAM_ANQUANMEN_ALARM 22 //安全感应
  47. #define Bi_QD_LDHXW_ALARM 23 //导轨后限位
  48. #define Bi_QD_ECTDYW_ALARM 24 //二次推带原位
  49. #define Bi_QD_DLYW_ALARM 25 //顶链原位
  50. #define Bi_QD_ZJLYW_ALARM 26 //左夹链
  51. #define Bi_QD_YJLYW_ALARM 27 //右夹链
  52. #define Bi_QD_QIAN_LIMIT_HAND_ALARM 28 //前限位亮电机不能前进
  53. #define Bi_QD_TFK_LIMIT_IN_ALARM 29 //推方块到位信号异常
  54. #define Bi_QD_Z_ORIGIN_IN_ALARM 30 //二次电机原点信号异常
  55. #define Bi_QD_Z_POS_OVER_ALARM 31 //位置超出范围
  56. #define VAVLE_ALARM_TIME 30000
  57. #define MOTOR_ALARM_TIME 5000
  58. #define Bi_QD_PARAM_FIRST_SPEED 5000
  59. #define Bi_QD_PARAM_GZ_DELAY (user_datas[0])
  60. #define Bi_QD_PARAM_ZIPPER_LENGTH (user_datas[1] | (user_datas[2] << 16))
  61. #define Bi_QD_PARAM_TL_DELAY 20//(user_datas[3]*10)
  62. #define Bi_QD_PARAM_YD_DELAY (user_datas[4]*10) //延时送链
  63. #define Bi_QD_PARAM_BACK_LOW_SPEED_LENGTH user_datas[6] //后拉慢速长度
  64. #define Bi_QD_PARAM_CUT_DELAY (user_datas[7]*10) //延时切断
  65. #define Bi_QD_PARAM_CUT_BACK_DELAY (user_datas[8]) //切断后延时后拉
  66. //#define Bi_QD_PARAM_KAIBEE_SELECT user_datas[9] //开闭口选择(0 开口,1 闭口)
  67. #define Bi_QD_PARAM_CS_COLD_TIME (user_datas[10] * 10) //固化时间
  68. #define Bi_QD_PARAM_ZS_STOP_TIME (user_datas[11] * 10) //扎数到停止时间
  69. #define Bi_QD_PARAM_DELAY_BACK (user_datas[12] * 10) //延时后拉
  70. #define Bi_QD_PARAM_CYCLE_DELAY (user_datas[14]*10) //延时下一条
  71. #define Bi_QD_PARAM_GO_HIGH_SPEED user_datas[15] //前进最高速
  72. #define Bi_QD_PARAM_GO_LOW_SPEED_LENGTH user_datas[16] //前进低速长度
  73. #define Bi_QD_PARAM_GO_LOW_SPEED user_datas[17] //前进最低速度
  74. #define Bi_QD_PARAM_BACK_SPEED user_datas[18] //后拉速度
  75. #define Bi_QD_PARAM_BACK_LENGTH user_datas[19] ////松夹子长度后走的长度
  76. #define Bi_QD_PARAM_DELAY_CS (user_datas[20] * 10) //延时超声
  77. #define Bi_QD_PARAM_CS_TIME (user_datas[21] * 10) //超声时间
  78. #define Bi_QD_PARAM_FZ_LENGTH user_datas[22] //闭口反转长度
  79. #define Bi_QD_PARAM_TB_TIME (user_datas[23]*10) //台面时间
  80. #define Bi_QD_PARAM_OFFSET_LENGTH user_datas[24] //修正长度
  81. #define Bi_QD_PARAM_LIAN_SELECT 0//user_datas[25] //长短链选择(0 短链,1长链模式)
  82. #define Bi_QD_PARAM_CUT_BACK_SPEED user_datas[26] //切断后拉带速度
  83. #define Bi_QD_PARAM_SJZ_LENGTH user_datas[27] //松夹子长度
  84. #define Bi_QD_PARAM_MOTOR_SELECT user_datas[28] //电机选择 (0 步进 , 1 伺服)(主要是松轴使能不一样)
  85. #define Bi_QD_PARAM_JZ_STOP_POS user_datas[29] //夹子错开压轮电机位置(即夹子松开后回到等待位置)
  86. #define Bi_QD_PARAM_BACK_MODE user_datas[30] //后退拉链定位方式 0为纯数控模式,1为过链感应模式,2先感应后数控+检测,3先感应后数控
  87. #define Bi_QD_PARAM_CL_JZ_TD_LENGTH user_datas[31] //长链夹子电机拖带停止位置
  88. #define Bi_QD_PARAM_QD_POS user_datas[32]// //原点到切刀的位置
  89. #define Bi_QD_PARAM_HL_ENABLE user_datas[33] //合链
  90. #define Bi_QD_PARAM_SJ_ENABLE user_datas[34] //视觉选择
  91. #define Bi_QD_PARAM_XM_ENABLE user_datas[35] //0下模动 1下模不动
  92. #define Bi_QD_PARAM_CS_MODE user_datas[36] //0为气切1为超声切
  93. #define Bi_QD_PARAM_YL_TIME (10 * user_datas[37]) // 长链压轮时间
  94. #define Bi_QD_PARAM_CYCLE_LENGTH user_datas[38] //电机周长
  95. #define Bi_QD_PARAM_CYCLE_PULSE user_datas[39] //电机细分
  96. #define Bi_QD_PARAM_TABLE_NUM user_datas[40] //台面动作条数
  97. #define Bi_QD_PARAM_MOTOR_DINWEI_LENGTH (user_datas[41]) //开口定位长度
  98. #define Bi_QD_PARAM_YMOTOR_CYCLE_LENGTH user_datas[42] // 长链电机轮周长
  99. #define Bi_QD_PARAM_TFK_DELAY (user_datas[44]*10) //延时推方块
  100. #define Bi_QD_PARAM_START_SPEED user_datas[45] //启动速度
  101. #define Bi_QD_PARAM_ACC user_datas[46] //加速度
  102. #define Bi_QD_PARAM_DCC user_datas[47] //减速度
  103. #define Bi_QD_PARAM_CHECK_BACK_HSPEED user_datas[48] //后拉走链最高速度
  104. #define Bi_QD_PARAM_CHECK_BACK_LSPEED 1000//user_datas[49] //后拉走链空位速度
  105. #define Bi_QD_PARAM_CHECK_BACK_CL_HSPEED user_datas[50] //长链超高速度
  106. #define Bi_QD_PARAM_FIRST_BACK_SPEED user_datas[51] //前两条速度
  107. #define Bi_QD_PARAM_DAOKOU_LENGTH user_datas[52] //刀口长度(闭口)
  108. #define Bi_QD_PARAM_DELAY_CHECK 100//user_datas[50] //
  109. #define Bi_QD_PARAM_YALIAN_LENGTH user_datas[53] //提前压并链长度 (双开用)
  110. #define Bi_QD_PARAM_GOUZHEN_LENGTH user_datas[54] //提前上勾针长度
  111. //#define Bi_QD_PARAM_TIAOSHI_MODE user_datas[55] //调试模式(暂不用)
  112. #define Bi_QD_PARAM_DELAY_HL_LENGTH user_datas[56] //合链动作长度
  113. #define Bi_QD_PARAM_BL_ENABLE user_datas[57] //并链就是合链
  114. #define Bi_QD_PARAM_DELAY_XM (user_datas[58]*10)
  115. #define Bi_QD_PARAM_DELAY_XM_LENGTH user_datas[59]
  116. #define Bi_QD_PARAM_BACK_LOW_SPEED user_datas[60]
  117. #define Bi_QD_PARAM_DEC_MODE 1//0为使用感应减速 1后退使用数控降速
  118. #define Bi_QD_PARAM_LT_ENABLE user_datas[62]
  119. #define Bi_QD_PARAM_NO_LT_DELAY_CHECK user_datas[63]
  120. #define Bi_QD_PARAM_ERROR_LENGTH user_datas[64] //长度允许误差
  121. #define Bi_QD_PARAM_DELAYBACK_SM (user_datas[65])
  122. #define Bi_QD_PARAM_SY_LENGTH user_datas[66] //增压时间
  123. #define Bi_QD_PARAM_TTFK_TIME (user_datas[67]*10) //退推方块时间
  124. #define Bi_QD_PARAM_JZGY_MODE user_datas[68] //使用夹子感应
  125. #define Bi_QD_PARAM_TQTFK_LENGTH user_datas[69] //提前推方块
  126. #define Bi_QD_PARAM_TDYS_DELAY (user_datas[70])
  127. #define Bi_QD_PARAM_AUTO_REBACK_LENGTH (Bi_QD_PARAM_CL_JZ_TD_LENGTH+2500) //自动返回长度
  128. #define Bi_QD_PARAM_CHECK_BACK_CL_SPEED user_datas[71] //长链检测速度
  129. #define Bi_QD_PARAM_BI_POS user_datas[72] //一次切模式闭口切断预留长度
  130. //#define Bi_QD_PARAM_LENGTH_MODE 1//user_datas[70] //实则不用
  131. //#define Bi_QD_PARAM_FIRST_BACK_LOWSPEED user_datas[71] //不用
  132. #define Bi_QD_PARAM_SET_TOTAL 0//(user_datas[74] | (user_datas[75] >> 16))
  133. #define Bi_QD_PARAM_CS_ENABLE 1//user_datas[80]
  134. #define Bi_QD_PARAM_YCQ_DJ_SELECT user_datas[79] //一次切刀具选择(0 开口刀, 1 花边刀)
  135. #define Bi_QD_PARAM_TD_DELAY (user_datas[81]*10)
  136. #define Bi_QD_PARAM_TD_TIME (user_datas[82]*10)
  137. #define Bi_QD_PARAM_DELAY_CHECK_GZ (user_datas[83])
  138. #define Bi_QD_PARAM_NOW_CNT user_datas[84]
  139. #define Bi_QD_PARAM_ZHA_SHU user_datas[85]
  140. #define Bi_QD_PARAM_HL_DELAY_BACK user_datas[86] //合链延时退
  141. #define Bi_QD_PARAM_RUN_LENGTH (user_datas[87]) //轨道运行长度
  142. #define Bi_QD_PARAM_TFK_NUMBER user_datas[88] // 推方块次数
  143. #define Bi_QD_PARAM_BKGZ_NUMBER 0 //user_datas[89] // 闭口有无钩针模式
  144. #define Bi_QD_PARAM_LLDK_LENGTH user_datas[89] //拉链刀口长度
  145. #define Bi_QD_PARAM_BKGY_LENGTH user_datas[90] // 闭口感应后再走长度
  146. #define Bi_QD_PARAM_ECQ_DJ_SELECT user_datas[91] //二次切刀具选择(0 开口刀, 1 花边刀)
  147. #define Bi_QD_PARAM_Secondleave_LENGTH user_datas[92] // 第二刀松夹子后再走长度
  148. #define Bi_QD_PARAM_ECQ_MODE user_datas[93] // 二次切选择
  149. #define Bi_QD_PARAM_FD_TIME user_datas[94] // 防抖
  150. #define Bi_QD_PARAM_ECMOTOR_CYCLE_LENGTH 40//100//user_datas[95] // 二次切送带电机周长(丝杆镙距)
  151. #define Bi_QD_PARAM_STOP_TIME user_datas[96] //停机时间
  152. #define Bi_QD_PARAM_LDHTGZ_MODE user_datas[97] //拉带后退钩针
  153. #define Bi_QD_PARAM_LTJC_MODE user_datas[98] //有无拉头()
  154. #define Bi_QD_PARAM_TABLE_MODE user_datas[99] //台面电机锁住
  155. //100,101,102,103 不能用
  156. #define Bi_QD_PARAM_HBD_POS user_datas[104] //花边刀离原点位置
  157. #define Bi_QD_PARAM_YZD_POS user_datas[105] //开口刀离原点位置
  158. #define Bi_QD_PARAM_ECQ_MOTOR_SPEED user_datas[106] //切刀位置电机速度
  159. #define Bi_QD_PARAM_FIRST_POS user_datas[107] //第一刀预留长度
  160. #define Bi_QD_PARAM_SECOND_POS user_datas[108] //第二刀预留长度
  161. #define Bi_QD_PARAM_GO_DW_LENGTH user_datas[109] //前进定位位置(感应到原点为再走的长度,不用调整感应器)
  162. #define Bi_QD_PARAM_LDMS_LENGTH user_datas[110] //二次切感应推方块同时拉带长度
  163. #define Bi_QD_PARAM_DL_DELAY user_datas[111] //开始顶链长度
  164. #define Bi_QD_PARAM_YSECT_DELAY (user_datas[112]*10) //延时二次推链
  165. #define Bi_QD_PARAM_ECTL_TIME (user_datas[113]*10) //二次推链时间
  166. #define Bi_QD_PARAM_CHUIQI_TIME (user_datas[114]*10) //吹气时间
  167. #define Bi_QD_PARAM_ECQYSQD_DELAY (user_datas[115]*10) //二次切延时切断
  168. #define Bi_QD_PARAM_ECTGY_MODE user_datas[116] //屏蔽二次切部分感应
  169. #define Bi_QD_PARAM_ECTMACHINE_MODE user_datas[117] //二次切机器
  170. #define Bi_QD_PARAM_YDCNC_LENGTH user_datas[118] //数控提前压带
  171. #define Bi_QD_PARAM_MATOR_LENGTH user_datas[119] //数控拉带长度
  172. #define Bi_QD_PARAM_JLD_DELAY (user_datas[120]*10) //二次切延时夹链时间
  173. #define Bi_QD_PARAM_SKCDWC_LENGTH user_datas[130] //数控误差长度
  174. #define Bi_QD_PARAM_LZ_SPPED user_datas[131] //拉直速度
  175. #define Bi_QD_PARAM_DANQIEGY_LENGTH user_datas[132] //单次切感应拉长长度
  176. #define Bi_QD_PARAM_DANQIECNC_LENGTH user_datas[133] //单次切数控拉长长度
  177. #define Bi_QD_PARAM_TJL_DELAY user_datas[134]*10 //延时退夹链
  178. //140
  179. #define Bi_QD_PARAM_TL_MODE 0
  180. #define Bi_QD_PARAM_ON_BACK_LENGTH 3000
  181. #define Bi_QD_AutoDelay cDelayTime1
  182. #define Bi_QD_MotorDelay cDelayTime2
  183. #define Bi_QD_XiaQieDelay cDelayTime3
  184. #define Bi_QD_KaDaiDelay cDelayTime4
  185. #define Bi_QD_CSDelay cDelayTime5
  186. #define Bi_QD_TBDelay cDelayTime6
  187. #define Bi_QD_TFKDelay cDelayTime7
  188. #define Bi_QD_TLDelay cDelayTime8
  189. #define Bi_QD_TuiDaiDelay cDelayTime9
  190. #define Bi_QD_AlarmDelay cDelayTime10
  191. #define Bi_QD_SJDelay cDelayTime11
  192. #define Bi_QD_SecondXQDelay cDelayTime12
  193. #define Bi_QD_TableDelay cDelayTime13
  194. #define Bi_QD_StopCodeDelay cDelayTime14
  195. #define Bi_QD_CHUIQIDelay cDelayTime15
  196. #define Bi_QD_ErrorDelay cDelayTime16
  197. #define Bi_QD_YMotorDelay cDelayTime17
  198. #define Bi_QD_ReBackDelay cDelayTime18
  199. #define Bi_QD_ANQUANMEN_Time cDelayTime19 //安全门的防抖时间
  200. #define Bi_QD_ZMotorDelay cDelayTime20
  201. #define Bi_QD_XM_DW_ErrorTime cDelayTime21 //下模输出到位超时
  202. #define Bi_QD_AutoStep cStepMByte
  203. #define Bi_QD_MotorStep cStepMByte1
  204. #define Bi_QD_XiaQieStep cStepMByte2
  205. #define Bi_QD_YuanDianStep cStepMByte3
  206. #define Bi_QD_TuiLianStep cStepMByte4
  207. #define Bi_QD_CheckLengthStep cStepMByte5
  208. #define Bi_QD_BinLianStep cStepMByte6
  209. #define Bi_QD_TuiDaiStep cStepMByte7
  210. #define Bi_QD_SecondXiaQueStep cStepMByte8
  211. #define Bi_QD_StopStep cStepMByte9
  212. #define Bi_QD_YMotorStep cStepMByte10
  213. #define Bi_QD_ReBack_Step cStepMByte11
  214. #define Bi_QD_ZMotorStep cStepMByte12
  215. #define Bi_QD_CuiQiStep cStepMByte13
  216. //32位无符号变量
  217. #define Bi_QD_dwWorkLength cUDword32Buff1
  218. #define Bi_QD_gou_zhen_buff cUDword32Buff2
  219. #define Bi_QD_cZipCnt cUDword32Buff3
  220. #define Bi_QD_cTableCnt cUDword32Buff4
  221. #define Bi_QD_cTuiFangKuaiCnt cUDword32Buff5
  222. #define Bi_QD_length_buff cUDword32Buff6
  223. #define Bi_QD_jz_buff cUDword32Buff7
  224. #define Bi_QD_YPOS_buff cUDword32Buff8
  225. //8位变量
  226. #define Bi_QD_cCheckLianFlg cCharBuff1
  227. #define Bi_QD_cCheckLianFlgEN cCharBuff2
  228. #define Bi_QD_cGoLimitEn cCharBuff3
  229. #define Bi_QD_NQDJGNUNMBER cCharBuff4
  230. #define Bi_QD_DCC_TIME_BL cCharBuff5
  231. #define Bi_QD_cTABLETIME cCharBuff6
  232. #define Bi_QD_cTABLETOTAL cCharBuff7
  233. #define Bi_QD_cSTOPONE cCharBuff8
  234. //#define Bi_QD_cChuiQi cCharBuff9
  235. //位变量
  236. #define Bi_QD_XiaQueOver bBitFlag0
  237. #define Bi_QD_ORIGIN_Over bBitFlag1
  238. #define Bi_QD_CUR_QDSelect bBitFlag2 //当前切刀
  239. #define Bi_QD_XiaMoOut bBitFlag3 //下模
  240. //#define *length_buffer *Short16Buff1 //长度修正
  241. //超声花边切,开口,开闭口二合一输入输出
  242. //输入
  243. #define Bi_QD_START_IN M0384
  244. #define Bi_QD_START_IN_UP (M0384 && !OLDM384)
  245. #define Bi_QD_STOP_IN M0385
  246. #define Bi_QD_STOP_IN_UP (M0385 && !OLDM385)
  247. #define Bi_QD_GUO_LIAN_IN M0386 // X02 //过链感应
  248. #define Bi_QD_GUO_LIAN_IN_UP (M0386 && !OLDM386) // (X02 && !OLDX02)
  249. #define Bi_QD_GUO_LIAN_IN_DW (!M0386 && OLDM386) // (!X02 && OLDX02)
  250. #define Bi_QD_LTGY_IN M0387 //X03 拉头感应
  251. #define Bi_QD_LTGY_IN_UP (M0387 && !OLDM387) //X03 拉头感应
  252. #define Bi_QD_GOUZHEN_IN M0388 //X04 //勾针到位
  253. #define Bi_QD_QIAN_LIMIT_IN M0389// X05 //前限位
  254. #define Bi_QD_QIAN_LIMIT_IN_UP (M0389 && !OLDM389)//(X05 && !OLDX05)
  255. #define Bi_QD_QIAN_LIMIT_IN_DW (!M0389 && OLDM389)//(!X05 && OLDX05)
  256. #define Bi_QD_KK_XM_LIMIT_IN M0390//X06 视觉输入
  257. #define Bi_QD_LDHXW_IN M0391//X07 //拉带后限位
  258. #define Bi_QD_LDHXW_IN_UP (M0391 && !OLDM391)
  259. #define Bi_QD_JDQXW_IN M0392//X10 //夹带前限位
  260. #define Bi_QD_SHANG_MU_ORIGIN M0393 //X11 //上模上限(原位)
  261. #define Bi_QD_SHANG_MU_LIMIT_IN M0394 //X12 //上模下限位(到位)
  262. #define Bi_QD_TFK_LIMIT_IN M0395 //X13 //推方块到位
  263. #define Bi_QD_XIA_MU_LIMIT_IN M0396 //X14 //下模到(闭口下模)
  264. #define Bi_QD_ANQUANMEN_LIMIT_IN M0397 //X15 //安全门
  265. #define Bi_QD_ANQUANMEN_LIMIT_IN_UP (M0397 && !OLDM397)//X15 //安全门
  266. #define Bi_QD_HL_ORIGIN M0398//X16 //护链气缸原位
  267. #define Bi_QD_ECTD_ORIGIN_IN M0399 //X17 //切刀原位
  268. #define Bi_QD_ZJL_ORIGIN_IN M0400 //X20 //二左夹链原位
  269. #define Bi_QD_YJL_ORIGIN_IN M0401 //X21 //右夹链原位
  270. #define Bi_QD_CLTD_ORIGIN_IN M0402 //X22 //长链拉带电机原位
  271. #define Bi_QD_CLTD_LIMIT_IN M0403 //X23 //长链拉带电机进到位
  272. #define Bi_QD_CLTD_YL_ORIGIN_IN M0404 //X24 //长链拉带压轮原位
  273. #define Bi_QD_CLTD_KAI_WD_IN M0406 //X26 //开口温度输入
  274. #define Bi_QD_CLTD_BI_WD_IN M0405 //X25 //闭口温度输入
  275. //输出
  276. #define Bi_QD_GZ_VAVLE M0304 //勾针Y00
  277. #define Bi_QD_SM_VAVLE M0305 //上模Y01
  278. #define Bi_QD_JD_VAVLE M0306 //夹子气缸Y02
  279. #define Bi_QD_YD_VAVLE M0307 //压带Y03
  280. #define Bi_QD_CS_OUT M0308 //增压Y04
  281. #define Bi_QD_DGLG_VAVLE M0309 //顶过链杆Y05
  282. #define Bi_QD_TL_VAVLE M0310 //送链Y06 如果有下模 /送链气缸不动当作下模
  283. #define Bi_QD_XM_VAVLE M0310 //Y06 下模
  284. #define Bi_QD_SD_VAVLE M0311 //松带Y07
  285. #define Bi_QD_TFK_VAVLE M0312 //推方块Y10
  286. #define Bi_QD_TABLE_VAVLE M0313 //台面电机(普通电机,步进为正转)Y11
  287. #define Bi_QD_BL_VAVLE M0314 //合链(并链)Y12
  288. #define Bi_QD_TMFZ_OUT M0315 //台面电机(步进反转)Y13
  289. //二次切
  290. #define Bi_QD_ECT_VAVLE M0316 //二次推带电磁阀Y14
  291. #define Bi_QD_HULIAN_VAVLE M0317 //护链电磁阀Y15
  292. #define Bi_QD_ECQ_CUIQI_VAVLE M0318 //Y16二次切吹气
  293. #define Bi_QD_ECQ_JIALIAN_VAVLE M0319 //Y17二次夹链电磁阀
  294. #define Bi_QD_CLTD_JT_VAVLE M0320 //长链拉带进退电磁阀Y20
  295. #define Bi_QD_CLTD_YL_VAVLE M0321 //长链拉带压轮电磁阀Y21
  296. #define Bi_QD_TMSZ_OUT M0322 //台面电机使能Y22
  297. #define Bi_QD_KAI_XM_VAVLE M0323 //开口下刀电磁阀Y23
  298. #define Bi_QD_BI_XM_VAVLE M0324 //闭口下刀电磁阀Y24
  299. #define Bi_QD_KAI_WD_OUT M0325 //开口刀温度输出Y25
  300. #define Bi_QD_BI_WD_OUT M0326 //闭口刀温度输出Y26
  301. #define Bi_QD_RUN_STATE M0327 //Y27 运行
  302. #define Bi_QD_ALR_STATE M0328 //Y30 警告
  303. #define Bi_QD_SAFE_IN 0
  304. //M0~M4全局固定使用
  305. /*
  306. #define bRunning M0000
  307. #define bStart M0001
  308. #define bStop M0002
  309. #define bAlarmStop M0003
  310. #define bClearTotal M0004
  311. */
  312. #define Bi_QD_bSM M0006 //上模
  313. #define Bi_QD_bXM M0007 //下模
  314. #define Bi_QD_bClearTotal M0008 //产量清零
  315. #define Bi_QD_bXiaQie M0009 //下切
  316. #define Bi_QD_bQianDianDW M0010 //前点定位
  317. #define Bi_QD_bChaoSheng M0011 //超声
  318. #define Bi_QD_bJiaDai M0012 //夹带
  319. #define Bi_QD_bGoMotor M0013 //电机前进
  320. #define Bi_QD_bBackMotor M0014 //电机后退
  321. #define Bi_QD_bTL M0015 //推链(送链)
  322. #define Bi_QD_bYD M0016 //压带
  323. #define Bi_QD_bGZ M0017 //勾针
  324. #define Bi_QD_bJD M0018 //夹带
  325. #define Bi_QD_bHL M0019 //护链
  326. #define Bi_QD_bYuanDianDW M0020 //不用
  327. #define Bi_QD_bTestCS M0021 //超声测试
  328. #define Bi_QD_bSingle M0022
  329. #define Bi_QD_bTFK M0023 //推方块
  330. #define Bi_QD_bTB M0024 //台面(正转)
  331. #define Bi_QD_bYBD M0025
  332. #define Bi_QD_bClearNowTotal M0026 //产量清零
  333. #define Bi_QD_bTS M0027
  334. #define Bi_QD_bBL M0028 //并链(合链)
  335. #define Bi_QD_bYX M0029
  336. #define Bi_QD_bSD M0030 //松带
  337. #define Bi_QD_bZY M0031 //增压
  338. #define Bi_QD_bDGLG M0032 //顶过链杆
  339. #define Bi_QD_bECT M0033
  340. #define Bi_QD_bDL M0034
  341. #define Bi_QD_bCHUIQI M0035 // 吹气
  342. #define Bi_QD_bJL M0036
  343. #define Bi_QD_bCLTD_JT M0037 //长链拉带进退电磁阀Y20
  344. #define Bi_QD_bCLTD_YL M0038 //长链拉带压轮电磁阀Y21
  345. #define Bi_QD_bCLTD_P M0039 //长链拉带正转
  346. #define Bi_QD_bCLTD_N M0040 //长链拉带反转
  347. #define Bi_QD_bTBFZ M0041 //台面反转
  348. #define Bi_QD_bFIRST_POS M0042 //到第一刀位置
  349. #define Bi_QD_bSECOND_POS M0043 //到第二刀位置
  350. #define Bi_QD_bKKD M0044 //开口刀
  351. #define Bi_QD_bHBD M0045 //花边刀
  352. #define Bi_bTiaoShiMode M0046 //调试模式
  353. #define Bi_QD_QD_GO M0047 //切刀进
  354. #define Bi_QD_QD_BACK M0048 //切刀退
  355. #endif