FXWQueDuanJi - 副本.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. #ifndef __FXWQUE_DUAN_JI_H__
  2. #define __FXWQUE_DUAN_JI_H__
  3. #if FU_XIAO_WEI_MACHINE
  4. #if FXW_CHANGLIAN_QIEDUAN_JI_CONFIG
  5. extern void QueDuan_Action(void);
  6. extern void QueDuan_InitAction(void);
  7. extern void QueDuanEx_ExtiActionX31(void);
  8. extern void FastTimerAction(void);
  9. #define QD_DIR_P 1
  10. #define QD_DIR_N 0
  11. #define QD_YDIR_P 0
  12. #define QD_YDIR_N 1
  13. #define QD_YL_DIR_P 0
  14. #define QD_YL_DIR_N 1
  15. #define QD_TOTAL_ADDR 76
  16. #define QD_QIE_DUAN_TOTAL_ADDR 79
  17. #define QD_ALARM_ADDR 100
  18. #define QD_PROSPEED_ADDR 78
  19. /*
  20. * 警告类型 警告编号
  21. */
  22. #define QD_NO_ALARM 0 /* 没警告*/
  23. #define QD_NO_ZIPPER_ALARM 1 /* 没拉链,自动停机*/
  24. #define QD_KA_DAI_ALARM 2 /* 卡带异常*/
  25. #define QD_SM_YUANWEI 3 /* 上模上限位*/
  26. #define QD_SM_DAOWEI 4 /* 上模下限位*/
  27. #define QD_XM_YUANWEI 5 /* 下模上限位*/
  28. #define QD_XM_DAOWEI 6 /* 下模下限位*/
  29. #define QD_BACK_ALARM 7
  30. #define QD_TOTAL_ALARM 8
  31. #define QD_TL_ALARM 9
  32. #define QD_GZ_ALARM 10
  33. #define QD_JD_ORIGIN_ALARM 11
  34. #define QD_DEC_ALARM 12
  35. #define QD_BL_ALARM 17
  36. #define QD_SM_ALARM 18
  37. #define QD_LENGTH_LONG_ALARM 19
  38. #define QD_LENGTH_SHORT_ALARM 20
  39. #define QD_JD_IN_ALARM 21
  40. #define QD_YL_LIMIT_ALARM 22
  41. #define QD_STOP_IN_ALARM 23
  42. #define QD_ERCI_XQ_ALARM 24
  43. #define QD_LT_ERROR_ALARM 25
  44. #define QD_SAFE_DOOR_ALARM 26
  45. #define VAVLE_ALARM_TIME 3000
  46. #define MOTOR_ALARM_TIME 5000
  47. #define QD_PARAM_ZIPPER_LENGTH (user_datas[1] | (user_datas[2] >> 16))
  48. #define QD_PARAM_SET_TOTAL (user_datas[74] | (user_datas[75] >> 16))
  49. #define QD_PARAM_MAX_BACK_LENGTH (user_datas[42] | (user_datas[43] >> 16))
  50. #define QD_PARAM_ON_BACK_LENGTH user_datas[5]
  51. #define QD_PARAM_SJZ_LENGTH user_datas[19]
  52. #define QD_PARAM_FZ_LENGTH user_datas[22]
  53. #define QD_PARAM_Go_LOW_SPEED_LENGTH user_datas[16]
  54. #define QD_PARAM_Back_LOW_SPEED_LENGTH user_datas[6]
  55. #define QD_PARAM_BACK_LENGTH user_datas[27]
  56. #define QD_PARAM_GO_HIGH_SPEED user_datas[15]
  57. #define QD_PARAM_GO_LOW_SPEED user_datas[17]
  58. #define QD_PARAM_BACK_SPEED user_datas[18]
  59. #define QD_PARAM_CUT_BACK_SPEED user_datas[26]
  60. #define QD_PARAM_HL_LENGTH user_datas[29]
  61. #define QD_PARAM_TABLE_NUM user_datas[40]
  62. #define QD_PARAM_CYCLE_LENGTH user_datas[38]
  63. #define QD_PARAM_CYCLE_PULSE user_datas[39]
  64. #define QD_PARAM_FIRST_SPEED user_datas[9]
  65. #define QD_PARAM_ZHA_SHU user_datas[85]
  66. #define QD_PARAM_NOW_CNT user_datas[84]
  67. #define QD_PARAM_DELAY_CS (user_datas[20] * 10)
  68. #define QD_PARAM_CS_TIME (user_datas[21] * 10)
  69. #define QD_PARAM_CS_COLD_TIME (user_datas[10] * 10)
  70. #define QD_PARAM_ZS_STOP_TIME (user_datas[11] * 10)
  71. #define QD_PARAM_DELAY_BACK (user_datas[12]*10)
  72. #define QD_PARAM_DELAY_FZ (user_datas[13]*10)
  73. #define QD_PARAM_CYCLE_DELAY (user_datas[14]*10)
  74. #define QD_PARAM_YD_DELAY (user_datas[4]*10)
  75. #define QD_PARAM_GZ_DELAY (user_datas[0]*10)
  76. #define QD_PARAM_CUT_DELAY (user_datas[7]*10)
  77. #define QD_PARAM_CUT_BACK_DELAY (user_datas[8]*10)
  78. #define QD_PARAM_TB_TIME (user_datas[23]*10)
  79. #define QD_PARAM_MOTOR_DELAY_LENGTH user_datas[41]
  80. #define QD_PARAM_TFK_DELAY (user_datas[44]*10)
  81. #define QD_PARAM_TL_MODE 0//user_datas[45] //推链方式0为气缸1为步进
  82. #define QD_PARAM_TL_CYCLE_LENGTH user_datas[46]
  83. #define QD_PARAM_TL_CYCLE_PULSE user_datas[47]
  84. #define QD_PARAM_TL_SPEED user_datas[48]
  85. #define QD_PARAM_TL_LENGTH user_datas[49]
  86. #define QD_PARAM_DELAY_CHECK user_datas[50]
  87. #define QD_PARAM_DAO_MODE user_datas[51] //0为双刀1为单刀
  88. #define QD_PARAM_DANDAO_MODE_LENGTH user_datas[52]
  89. #define QD_PARAM_OFFSET_LENGTH user_datas[53]
  90. #define QD_PARAM_GOUZHEN_LENGTH user_datas[54]
  91. #define QD_PARAM_TIAOSHI_MODE user_datas[55]
  92. #define QD_PARAM_DELAY_HL_LENGTH user_datas[56]
  93. #define QD_PARAM_HL_ENABLE user_datas[33]
  94. #define QD_PARAM_CS_ENABLE user_datas[90]
  95. #define QD_PARAM_XM_ENABLE user_datas[35] //0为下模不动带推链 1为下模工作带锁模
  96. #define QD_PARAM_CS_MODE user_datas[36] //0为气切1为超声切
  97. #define QD_PARAM_DELAY_XM (user_datas[58]*10)
  98. #define QD_PARAM_DELAY_XM_LENGTH user_datas[59]
  99. #define QD_PARAM_BACK_LOW_SPEED user_datas[60]
  100. #define QD_PARAM_NO_LT_DELAY_CHECK user_datas[63]
  101. #define QD_PARAM_ERROR_LENGTH user_datas[64]
  102. #define QD_PARAM_DELAYBACK_SM (user_datas[65]*10)
  103. #define QD_PARAM_SL_LENGTH user_datas[66]
  104. #define QD_PARAM_TC_LENGTH user_datas[67]
  105. #define QD_PARAM_DELAY_SJ_TIME user_datas[68]
  106. #define QD_PARAM_XHG_LENGTH user_datas[69]
  107. #define QD_PARAM_DELAY_BL_BACK user_datas[70]
  108. #define QD_PARAM_MAX_ERROR_LENGTH user_datas[71]
  109. #define QD_PARAM_MIN_SPEED user_datas[72]
  110. #define QD_PARAM_RUN_STATE user_datas[250]
  111. #define QD_PARAM_YD_ENABLE 1
  112. #define QD_PARAM_DC_MODE 1//user_datas[31] //后退定寸模式,1为钩针,0为不用钩针
  113. #define QD_PARAM_DEC_MODE user_datas[30] //后退方式 1为输入长度数控,0为前两条测长
  114. #define QD_PARAM_GO_MODE 1//1前进使用数控降速
  115. #define QD_PARAM_BACK_MODE user_datas[61]//1后退使用数控降速
  116. #define QD_PARAM_BACK_ALARM_MODE 1 //后退限位模式 0为数控,1为感应限位
  117. #define QD_PARAM_TFK_ENABLE 1
  118. #define QD_PARAM_LT_ENABLE user_datas[62]
  119. #define QD_SAVE_POS (user_datas[200] | (user_datas[201] >> 16))
  120. #define QD_PARAM_BL_ENABLE user_datas[57]
  121. #define QD_PARAM_YL_HIGH_SPEED user_datas[86]
  122. #define QD_PARAM_YL_LOW_SPEED user_datas[87]
  123. #define QD_PARAM_JD_DELAY (user_datas[88]*10)
  124. #define QD_PARAM_START_SPEED user_datas[89]
  125. #define QD_PARAM_ACC_SPEED user_datas[90]
  126. #define QD_PARAM_YL_TRANS_LENGTH user_datas[91]
  127. #define QD_PARAM_YL_SL_TIME (user_datas[92]*10)
  128. #define QD_PARAM_YL_SL_SPEED user_datas[93]
  129. #define QD_PARAM_YL_CYCLE_LENGTH user_datas[94]
  130. #define QD_PARAM_YL_CYCLE_PULSE user_datas[95]
  131. #define QD_PARAM_LONG_MODE user_datas[96]
  132. #define QD_PARAM_DELAY_YL (user_datas[97]*10)
  133. #define QD_PARAM_SJ_TIME (user_datas[98]*10)
  134. #define QD_PARAM_SJ_JZ_TIME (user_datas[99]*10)
  135. #define QD_PARAM_DELAY_GO (user_datas[101]*10)
  136. #define QD_PARAM_GO_LENGTH user_datas[102]
  137. #define QD_PARAM_SJ_ENABLE user_datas[103]
  138. #define QD_PARAM_CQ_TIME (user_datas[104]*10)
  139. #define QD_PARAM_GZ_BACK_DELAY_LENGTH user_datas[105]
  140. #define QD_PARAM_SPEED_MODE 0//user_datas[106]
  141. #define QD_PARAM_DELAY_YL_BACK user_datas[107]
  142. #define QD_PARAM_DELAY_LONG_GO (user_datas[108]*10)
  143. #define QD_PARAM_LATOU_ERROR_LENGTH user_datas[109]
  144. #define QD_PARAM_ERCI_XQ user_datas[110]
  145. #define QD_PARAM_ERCI_XQ_DELAY user_datas[111]
  146. #define QD_PARAM_YL_OUT_DELAY user_datas[112]
  147. #define QD_PARAM_ZY_BACK_DELAY user_datas[113]
  148. #define QD_PARAM_LT_CHECK_LENGTH user_datas[114]
  149. #define QD_PARAM_ERCI_CHECK_MODE user_datas[115]
  150. #define QD_PARAM_XM_TD_DELAY user_datas[116]
  151. #define QD_PARAM_YL_OUT_LENGTH user_datas[117]
  152. #define QD_PARAM_ERCI_TD_ENABLE user_datas[118]
  153. #define QD_PARAM_TL_DELAY (user_datas[119]*10)
  154. #define QD_AutoDelay cDelayTime1
  155. #define QD_MotorDelay cDelayTime2
  156. #define QD_XiaQieDelay cDelayTime3
  157. #define QD_KaDaiDelay cDelayTime4
  158. #define QD_CSDelay cDelayTime5
  159. #define QD_TBDelay cDelayTime6
  160. #define QD_TFKDelay cDelayTime7
  161. #define QD_TLDelay cDelayTime8
  162. #define QD_CheckDelay cDelayTime9
  163. #define QD_ShenJiangDelay cDelayTime10
  164. #define QD_YLBackDelay cDelayTime11
  165. #define QD_XMDelay cDelayTime12
  166. #define QD_GZDelay cDelayTime13
  167. #define QD_BLDelay cDelayTime14
  168. #define QD_CQDelay cDelayTime15
  169. #define QD_BUTTONDelay cDelayTime16
  170. #define QD_AutoStep cStepMByte
  171. #define QD_MotorStep cStepMByte1
  172. #define QD_XiaQieStep cStepMByte2
  173. #define QD_YuanDianStep cStepMByte3
  174. #define QD_TuiLianStep cStepMByte4
  175. #define QD_TuiFangKuaiStep cStepMByte5
  176. #define QD_BinLianStep cStepMByte6
  177. #define QD_ShenJiangStep cStepMByte7
  178. #define QD_MotorStep2 cStepMByte8
  179. //超声花边切输入输出
  180. #define QD_GUO_LIAN_IN X02
  181. #define QD_GUO_LIAN_IN_UP (X02 && !OLDX02)
  182. #define QD_GUO_LIAN_IN_DW (!X02 && OLDX02)
  183. #define QD_LATOU_IN X03
  184. #define QD_GOUZHEN_IN X04
  185. #define QD_QIAN_LIMIT_IN X05
  186. #define QD_QIAN_LIMIT_IN_UP (X05 && !OLDX05)
  187. #define QD_QIAN_DEC_IN X06
  188. #define QD_QIAN_DEC_IN_UP (X06 && !OLDX06)
  189. #define QD_QIAN_DEC_IN_DW (!X06 && OLDX06)
  190. #define QD_BACK_LIMIT_IN X07
  191. #define QD_BACK_LIMIT_IN_UP (X07 && !OLDX07)
  192. #define QD_JD_IN X10
  193. #define QD_SHANG_MU_ORIGIN_IN X11
  194. #define QD_SHANG_MU_LIMIT_IN X12
  195. #define QD_SHANG_MU_LIMIT_IN_DW (!X12 && OLDX12)
  196. #define QD_START_IN X13
  197. #define QD_START_IN_UP (X13 && !OLDX13)
  198. #define QD_STOP_IN X14
  199. #define QD_STOP_IN_UP (X14 && !OLDX14)
  200. #define QD_YL_ORIGIN_IN X15
  201. #define QD_SAFE_DOOR_IN X16
  202. #define QD_SAFE_DOOR_IN_OLD OLDX16
  203. #define QD_XIA_MU_LIMIT_IN X17
  204. #define QD_XIA_MU_LIMIT_IN_UP (X17 && !OLDX17)
  205. #define QD_TD_IN X30
  206. #define QD_JD_ORIGIN_IN X35
  207. #define QD_YL_DIR Y00
  208. #define QD_XM_VAVLE Y01
  209. #define QD_BL_VAVLE Y02
  210. #define QD_YLOUT_VAVLE Y03
  211. #define QD_JD_VAVEL Y04
  212. #define QD_GZ_VAVLE Y05
  213. #define QD_SM_VAVLE Y06
  214. #define QD_YL_VAVLE Y07
  215. #define QD_JZ_DIR Y10
  216. #define QD_YLSZ_OUT Y11
  217. #define QD_CQ_VAVLE Y12
  218. #define QD_TABLE_VAVLE Y13
  219. #define QD_SZ_OUT Y14
  220. #define QD_CS_OUT Y30
  221. #define QD_TD_VAVLE Y20
  222. #define QD_RUNLED Y21
  223. #define QD_STOPLED Y22
  224. #define QD_STAYLED Y15
  225. #define QD_ZY_VAVLE Y24
  226. #define QD_SD_VAVLE Y25
  227. #define QD_YD_VAVLE Y26
  228. #define QD_YTZ_VAVLE Y23
  229. #define QD_TD2_VAVLE Y27
  230. #define QD_L_UP_VAVLE Y13
  231. #define QD_R_UP_VAVLE Y03
  232. #define QD_R_JD Y01
  233. #define QD_TFK_VAVEL Y11
  234. #define QD_TL_VAVLE Y13
  235. #define QD_YBD_VAVLE Y25
  236. //M0~M4全局固定使用
  237. /*
  238. #define bRunning M0000
  239. #define bStart M0001
  240. #define bStop M0002
  241. #define bAlarmStop M0003
  242. #define bClearTotal M0004
  243. */
  244. #define QD_bSM M0006
  245. #define QD_bXM M0007
  246. #define QD_bClearTotal M0008
  247. #define QD_bXiaQie M0009
  248. #define QD_bQianDianDW M0010
  249. #define QD_bChaoSheng M0011
  250. #define QD_bJiaDai M0012
  251. #define QD_bGoMotor M0013
  252. #define QD_bBackMotor M0014
  253. #define QD_bTL M0015
  254. #define QD_bYD M0016
  255. #define QD_bGZ M0017
  256. #define QD_bJD M0018
  257. #define QD_bHL M0019
  258. #define QD_bYuanDianDW M0020
  259. #define QD_bTestCS M0021
  260. #define QD_bSingle M0022
  261. #define QD_bTFK M0023
  262. #define QD_bTB M0024
  263. #define QD_bYBD M0025
  264. #define QD_bClearNowTotal M0026
  265. #define QD_bTS M0027
  266. #define QD_bBL M0028
  267. #define QD_bSetGZMode M0029
  268. #define QD_bYL M0030
  269. #define QD_bYLGO_MOTOR M0031
  270. #define QD_bYLBACK_MOTOR M0032
  271. #define QD_bR_UP M0033
  272. #define QD_bR_JD M0034
  273. #define QD_bCQ M0035
  274. #define QD_bYLOUT M0036
  275. #define QD_bTable M0037
  276. #define QD_bTD M0038
  277. #define QD_bZY M0039
  278. #define QD_bSD M0040
  279. #define QD_bYTZ M0041
  280. #define QD_bERCI M0042
  281. #define QD_bChangeMode M0043
  282. #define QD_bChangeDecMode M0044
  283. #else
  284. extern void QueDuan_Action(void);
  285. extern void QueDuan_InitAction(void);
  286. extern void QueDuanEx_ExtiActionX31(void);
  287. extern void FastTimerAction(void);
  288. #define QD_DIR_P 1
  289. #define QD_DIR_N 0
  290. #define QD_YDIR_P 0
  291. #define QD_YDIR_N 1
  292. #define QD_TOTAL_ADDR 76
  293. #define QD_ALARM_ADDR 100
  294. #define QD_PROSPEED_ADDR 78
  295. #define QD_BACK_INDUCTION_MODE 0 //后退纯感应方式
  296. #define QD_BACK_MEMORY_MODE 1 //后退记忆长度方式
  297. #define QD_BACK_NOMAL_DEC_MODE 0 //后退感应减速方式
  298. #define QD_BACK_DIGITAL_MODE 1 //后退数控减速方式
  299. /*
  300. * 警告类型 警告编号
  301. */
  302. #define QD_NO_ALARM 0 /* 没警告*/
  303. #define QD_NO_ZIPPER_ALARM 1 /* 没拉链,自动停机*/
  304. #define QD_KA_DAI_ALARM 2 /* 卡带异常*/
  305. #define QD_SM_YUANWEI 3 /* 上模上限位*/
  306. #define QD_SM_DAOWEI 4 /* 上模下限位*/
  307. #define QD_XM_YUANWEI 5 /* 下模上限位*/
  308. #define QD_XM_DAOWEI 6 /* 下模下限位*/
  309. #define QD_BACK_ALARM 7
  310. #define QD_TOTAL_ALARM 8
  311. #define QD_TL_ALARM 9
  312. #define QD_GZ_ALARM 10
  313. #define QD_JD_ORIGIN_ALARM 11
  314. #define QD_DEC_ALARM 12
  315. #define QD_BL_ALARM 17
  316. #define QD_SM_ALARM 18
  317. #define QD_LENGTH_LONG_ALARM 19
  318. #define QD_LENGTH_SHORT_ALARM 20
  319. #define VAVLE_ALARM_TIME 3000
  320. #define MOTOR_ALARM_TIME 5000
  321. #define QD_PARAM_GZ_DELAY (user_datas[0]*10)
  322. #define QD_PARAM_ZIPPER_LENGTH (user_datas[1] | (user_datas[2] >> 16))
  323. #define QD_PARAM_TL_DELAY (user_datas[3]*10)
  324. #define QD_PARAM_YD_DELAY (user_datas[4]*10)
  325. #define QD_PARAM_CQ_DELAY (user_datas[5]*10)
  326. #define QD_PARAM_BACK_LOW_SPEED_LENGTH user_datas[6]
  327. #define QD_PARAM_CUT_DELAY (user_datas[7]*10)
  328. #define QD_PARAM_CUT_BACK_DELAY (user_datas[8]*10)
  329. #define QD_PARAM_FIRST_SPEED user_datas[9]
  330. #define QD_PARAM_CS_COLD_TIME (user_datas[10] * 10)
  331. #define QD_PARAM_ZS_STOP_TIME (user_datas[11] * 10)
  332. #define QD_PARAM_DELAY_BACK (user_datas[12]*10)
  333. #define QD_PARAM_CYCLE_DELAY (user_datas[14]*10)
  334. #define QD_PARAM_GO_HIGH_SPEED user_datas[15]
  335. #define QD_PARAM_GO_LOW_SPEED_LENGTH user_datas[16]
  336. #define QD_PARAM_GO_LOW_SPEED user_datas[17]
  337. #define QD_PARAM_BACK_SPEED user_datas[18]
  338. #define QD_PARAM_BACK_LENGTH user_datas[19]
  339. #define QD_PARAM_DELAY_CS (user_datas[20] * 10)
  340. #define QD_PARAM_CS_TIME (user_datas[21] * 10)
  341. #define QD_PARAM_FZ_LENGTH user_datas[22]
  342. #define QD_PARAM_TB_TIME (user_datas[23]*10)
  343. #define QD_PARAM_JD_DELAY (user_datas[24]*10)
  344. #define QD_PARAM_CUT_BACK_SPEED user_datas[26]
  345. #define QD_PARAM_SJZ_LENGTH user_datas[27]
  346. #define QD_PARAM_BACK_MODE user_datas[30] //后退方式 1为记忆长度,0为感应方式
  347. #define QD_PARAM_HL_ENABLE 1// user_datas[33]
  348. #define QD_PARAM_XM_ENABLE user_datas[35]
  349. #define QD_PARAM_CS_MODE user_datas[36] //0为气切1为超声切
  350. #define QD_PARAM_CYCLE_LENGTH user_datas[38]
  351. #define QD_PARAM_CYCLE_PULSE user_datas[39]
  352. #define QD_PARAM_TABLE_NUM user_datas[40]
  353. #define QD_PARAM_MOTOR_DELAY_LENGTH user_datas[41]
  354. #define QD_PARAM_TFK_DELAY (user_datas[44]*10)
  355. #define QD_PARAM_START_SPEED user_datas[45]
  356. #define QD_PARAM_ACC user_datas[46]
  357. #define QD_PARAM_DCC user_datas[47]
  358. #define QD_PARAM_CHECK_BACK_HSPEED user_datas[48]
  359. #define QD_PARAM_CHECK_BACK_LSPEED user_datas[49]
  360. #define QD_PARAM_DELAY_CHECK user_datas[50]
  361. #define QD_PARAM_GOUZHEN_LENGTH user_datas[54]
  362. #define QD_PARAM_TIAOSHI_MODE user_datas[55]
  363. #define QD_PARAM_DELAY_HL_LENGTH user_datas[56]
  364. #define QD_PARAM_BL_ENABLE 1//user_datas[57]
  365. #define QD_PARAM_DELAY_XM (user_datas[58]*10)
  366. #define QD_PARAM_DELAY_XM_LENGTH user_datas[59]
  367. #define QD_PARAM_BACK_LOW_SPEED user_datas[60]
  368. #define QD_PARAM_DEC_MODE user_datas[61]//0为使用感应减速 1后退使用数控降速
  369. #define QD_PARAM_LT_ENABLE user_datas[62]
  370. #define QD_PARAM_NO_LT_DELAY_CHECK user_datas[63]
  371. #define QD_PARAM_ERROR_LENGTH user_datas[64]
  372. #define QD_PARAM_DELAYBACK_SM (user_datas[65]*10)
  373. #define QD_PARAM_TC_LENGTH user_datas[67]
  374. #define QD_PARAM_FIRST_GO_HIGHSPEED user_datas[69]
  375. #define QD_PARAM_LENGTH_MODE user_datas[70]
  376. #define QD_PARAM_FIRST_BACK_LOWSPEED user_datas[71]
  377. #define QD_PARAM_SET_TOTAL (user_datas[74] | (user_datas[75] >> 16))
  378. #define QD_PARAM_CS_ENABLE user_datas[80]
  379. #define QD_PARAM_NOW_CNT user_datas[84]
  380. #define QD_PARAM_ZHA_SHU user_datas[85]
  381. #define QD_PARAM_NO_POS user_datas[86]
  382. #define QD_PARAM_ZIPPER_LENGTH_INCH (user_datas[87] | (user_datas[88] >> 16))
  383. #define QD_PARAM_ZIPPER_TOOTH (user_datas[89] | (user_datas[90] >> 16))
  384. #define QD_MODE_SELECT user_datas[91]
  385. #define QD_JIZHUN_CISHU user_datas[92] //基准齿数
  386. #define QD_JIZHUN_LEN user_datas[93] //基准长度
  387. //3#
  388. #define QD_JIZHUN_CISHU1 user_datas[94] //基准齿数
  389. #define QD_JIZHUN_LEN1 user_datas[95] //基准长度
  390. //5#
  391. #define QD_JIZHUN_CISHU2 user_datas[96] //基准齿数
  392. #define QD_JIZHUN_LEN2 user_datas[97] //基准长度
  393. //8#
  394. #define QD_JIZHUN_CISHU3 user_datas[98] //基准齿数
  395. #define QD_JIZHUN_LEN3 user_datas[99] //基准长度
  396. //特殊刀模
  397. #define QD_JIZHUN_CISHU4 user_datas[101] //基准齿数
  398. #define QD_JIZHUN_LEN4 user_datas[102] //基准长度
  399. #define QD_COUNT_DIR user_datas[103] //数齿方向
  400. #define QD_FILTER user_datas[104] //数齿滤波次数
  401. #define QD_PARAM_TL_MODE 0
  402. #define QD_PARAM_ON_BACK_LENGTH 2000
  403. #define QD_AutoDelay cDelayTime1
  404. #define QD_MotorDelay cDelayTime2
  405. #define QD_XiaQieDelay cDelayTime3
  406. #define QD_ChuiQiDelay cDelayTime4
  407. #define QD_CSDelay cDelayTime5
  408. #define QD_TBDelay cDelayTime6
  409. #define QD_TFKDelay cDelayTime7
  410. #define QD_TLDelay cDelayTime8
  411. #define QD_CheckDelay cDelayTime9
  412. #define QD_AlarmDelay cDelayTime10
  413. #define QD_SJDelay cDelayTime11
  414. #define QD_AutoStep cStepMByte
  415. #define QD_MotorStep cStepMByte1
  416. #define QD_XiaQieStep cStepMByte2
  417. #define QD_YuanDianStep cStepMByte3
  418. #define QD_TuiLianStep cStepMByte4
  419. #define QD_CheckLengthStep cStepMByte5
  420. #define QD_BinLianStep cStepMByte6
  421. //超声花边切输入输出
  422. #define START_IN X00
  423. #define START_IN_UP (X00 && !OLDX00)
  424. #define STOP_IN X01
  425. #define STOP_IN_UP (X01 && !OLDX01)
  426. #define QD_KADAI_IN X02
  427. #define QD_GOUZHEN_IN X04
  428. #define QD_QIAN_LIMIT_IN X05
  429. #define QD_QIAN_LIMIT_IN_UP (X05 && !OLDX05)
  430. #define QD_QIAN_DEC_IN X06
  431. #define QD_QIAN_DEC_IN_UP (X06 && !OLDX06)
  432. #define QD_BACK_LIMIT_IN X07
  433. #define QD_BACK_LIMIT_IN_UP (X07 && !OLDX07)
  434. #define QD_JD_ORIGIN_IN X10
  435. #define QD_SHANG_MU_ORIGIN_IN X11
  436. #define QD_SHANG_MU_LIMIT_IN X12
  437. #define QD_SHANG_MU_LIMIT_IN_DW (!X12 && OLDX12)
  438. #define QD_GUO_LIAN_IN X17
  439. #define QD_GUO_LIAN_IN_UP (X17 && !OLDX17)
  440. #define QD_GUO_LIAN_IN_DW (!X17 && OLDX17)
  441. #define QD_XIA_MU_LIMIT_IN X20
  442. #define QD_COUNT_IN X17
  443. #define QD_COUNT_IN_UP (X17 && !OLDX17)
  444. #define QD_COUNT_IN_DW (!X17 && OLDX17)
  445. #define QD_GZ_VAVLE Y00
  446. #define QD_YD_VAVLE Y01
  447. #define QD_SC_VAVLE Y01
  448. #define QD_JD_VAVEL Y02
  449. #define QD_SM_VAVLE Y04
  450. #define QD_XM_VAVLE Y06
  451. #define QD_SZ_OUT Y07
  452. #define QD_CS_OUT Y15
  453. #define QD_WARMMING_LED Y11
  454. #define QD_COUNT_OUT Y12
  455. #define QD_TABLE_VAVLE Y13
  456. #define QD_CQ_VAVLE Y14
  457. //推方块气切新增输入输出
  458. //没有下模以及下模上限X17 Y06
  459. //没有超声输出Y10 没有压带Y01
  460. //
  461. #define QD_TFK_VAVEL Y03
  462. #define QD_TL_VAVLE Y05
  463. #define QD_YBD_VAVLE Y14
  464. #define QD_JZ_DIR Y10
  465. #define QD_BL_VAVLE Y11
  466. #define QD_XHG_VAVLE Y12
  467. //M0~M4全局固定使用
  468. #define bRunning M0000
  469. #define bStart M0001
  470. #define bStop M0002
  471. #define bAlarmStop M0003
  472. #define bClearTotal M0004
  473. #define QD_bSM M0006
  474. #define QD_bXM M0007
  475. #define QD_bClearTotal M0008
  476. #define QD_bXiaQie M0009
  477. #define QD_bQianDianDW M0010
  478. #define QD_bChaoSheng M0011
  479. #define QD_bJiaDai M0012
  480. #define QD_bGoMotor M0013
  481. #define QD_bBackMotor M0014
  482. #define QD_bTL M0015
  483. #define QD_bYD M0016
  484. #define QD_bGZ M0017
  485. #define QD_bJD M0018
  486. #define QD_bHL M0019
  487. #define QD_bYuanDianDW M0020
  488. #define QD_bTestCS M0021
  489. #define QD_bSingle M0022
  490. #define QD_bTFK M0023
  491. #define QD_bTB M0024
  492. #define QD_bYBD M0025
  493. #define QD_bClearNowTotal M0026
  494. #define QD_bTS M0027
  495. #define QD_bBL M0028
  496. #define QD_bAdd M0029
  497. #define QD_bDec M0030
  498. #define QD_bSetLength M0031
  499. #define QD_bSetInch M0032
  500. #define QD_bSetTooth M0033
  501. #define QD_bCQ M0034
  502. #endif
  503. #endif
  504. #endif