XYQueduanChuantou_QGCT.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. #ifndef JHQUEDUAN_CHUANTOU_H
  2. #define JHQUEDUAN_CHUANTOU_H
  3. #if XIN_YE_MACHINE == 1
  4. extern void QDCT_InitAction(void);
  5. extern void QDCT_Action(void);
  6. #define QDCT_LONG_LENGTH_USE user_datas[133] //0为普通长度 1为无限长
  7. #define QDCT_PARAM_QLT_ON (user_datas[31]) //前拉头开
  8. #define QDCT_PARAM_HLT_ON (user_datas[32]) //后拉头开
  9. #define QDCT_PARAM_MODE (user_datas[86]) // 0为正穿 1为反穿
  10. #define QDCT_SEBIAO_MODE (user_datas[59])
  11. #define QDCT_SEBIAO_USE user_datas[134] //色标配置选择:0无色标 ,1有色标,该变量只在屏幕上使用
  12. #define QDCT_DIR_P 1
  13. #define QDCT_DIR_N 0
  14. #define QDCT_JJ_DIR_P 1
  15. #define QDCT_JJ_DIR_N 0
  16. #define QDCT_YL_DIR_P 1
  17. #define QDCT_YL_DIR_N 0
  18. #define QDCT_MOTOR_EN 1
  19. #define QDCT_MOTOR_DISEN 0
  20. #define QDCT_VAVLE_ERROR_TIME 3000
  21. #define QDCT_MOTOR_ALARM_TIME 5000
  22. //故障代码列表
  23. #define QDCT_NO_ALARM 0
  24. #define QDCT_NO_ZIPPER_ALARM 1
  25. #define QDCT_ZLSWL_ZDPWL_ALARM 2//振动盘无料,或者抓料夹子故障
  26. #define QDCT_HSL_ORIGIN_ALARM 3
  27. #define QDCT_HSL_LIMIT_ALARM 4
  28. #define QDCT_XM_LIMIT_ALARM 5
  29. #define QDCT_XM_ORIGIN_ALARM 6
  30. #define QDCT_CSL_LIMIT_ALARM 7
  31. #define QDCT_CSL_ORIGIN_ALARM 8
  32. #define QDCT_XZLT_LIMIT_ALARM 9
  33. #define QDCT_XZLT_ORIGIN_ALARM 10
  34. #define QDCT_TuiL_LIMIT_ALARM 11
  35. #define QDCT_CLTM_LIMIT_ALARM 12
  36. #define QDCT_CLTM_ORIGIN_ALARM 13
  37. #define QDCT_SDQD_LIMIT_ALARM 14
  38. #define QDCT_SDQD_ORIGIN_ALARM 15
  39. #define QDCT_XDQD_LIMIT_ALARM 16
  40. #define QDCT_XDQD_ORIGIN_ALARM 17
  41. #define QDCT_CRGY_CHECK_ALARM 18
  42. #define QDCT_HAND_ORIGIN_ALARM 19
  43. #define QDCT_ZLS_ORIGIN_ALARM 20
  44. #define QDCT_LD_LENGTH_ALARM 21
  45. #define QDCT_LD_LENGTH_DL_ALARM 22
  46. #define QDCT_LD_LENGTH_CL_ALARM 23
  47. #define QDCT_TOTAL_ALARM 24
  48. #define QDCT_KADA_ALARM 25
  49. #define QDCT_SAFE_ALARM 26
  50. #define QDCT_HAND_SERVO_ALARM 27
  51. #define QDCT_TLGQ_CHECK_ALARM 28
  52. #define QDCT_TuiL_ORIGIN_ALARM 29
  53. //8位无符号变量
  54. #define X_Reset_Flag cCharBuff1
  55. #define Y_Reset_Flag cCharBuff2
  56. #define Z_Reset_Flag cCharBuff3
  57. #define X_SOFT_PLIMIT cCharBuff11
  58. #define X_SOFT_NLIMIT cCharBuff12
  59. #define Y_SOFT_PLIMIT cCharBuff13
  60. #define Y_SOFT_NLIMIT cCharBuff14
  61. #define QDCT_ZSZL_TIME cCharBuff4
  62. #define QDCT_ZLT_TIME cCharBuff5
  63. #define QDCT_ZLT_OK_FLAG cCharBuff6
  64. #define QDCT_WorkCnt cCharBuff7
  65. #define QDCT_STOPPRESS_FLAG cCharBuff8
  66. #define QDCT_FDAI_FLAG cCharBuff9
  67. #define QDCT_XM_UP_FLAG cCharBuff10
  68. #define QDCT_SJCHECK_TIME cCharBuff15
  69. #define QDCT_DUANLIAN_ALARM_FLAG cCharBuff16//短链报警标志
  70. #define QDCT_CHUANGLIAN_ALARM_FLAG cCharBuff17//长链报警标志
  71. #define QDCT_Manu_CS_FLAG cCharBuff18
  72. #define QDCT_AlARM_STOP_FLAG cCharBuff19
  73. #define QDCT_STOP_NUM cCharBuff20
  74. #define QDCT_HUDAO_CHECK_FLAG cCharBuff21
  75. #define QDCT_AlARM_LED_FLAG cCharBuff22
  76. #define QDCT_SERVO_ALAEM_FLAG cCharBuff23
  77. #define QDCT_CLR_SERVOALAEM_FLAG cCharBuff24
  78. #define QDCT_CONT_ZLT_TIMES cCharBuff25//未检测道推料光纤信号连续装拉头次数
  79. #define QDCT_YORIGIN_FLAG cCharBuff26
  80. #define QDCT_LTCC_COUNT cCharBuff27
  81. #define QDCT_TRAN_FLAG cCharBuff28
  82. #define QDCT_KADAI_FLAG cCharBuff29
  83. #define QDCT_CLT_PD_FLAG cCharBuff30
  84. #define QDCT_LD_PD_FLAG cCharBuff31
  85. #define QDCT_FAIDAI_FLAG cCharBuff32
  86. #define QDCT_PD_FZ_FLAG cCharBuff33
  87. #define QDCT_PD_NUM cCharBuff34
  88. //16位无符号变量
  89. #define XRunResetOStep cStepMByte16
  90. #define YRunResetOStep cStepMByte17
  91. #define ZRunResetOStep cStepMByte18
  92. #define QDCT_AutoStep cStepMByte
  93. #define QDCT_ZSZLStep cStepMByte1
  94. #define QDCT_ZLTStep cStepMByte2
  95. #define QDCT_TSXZLTStep cStepMByte3
  96. #define QDCT_LTCHECKStep cStepMByte4
  97. #define QDCT_QDLLStep cStepMByte5
  98. #define QDCT_CLTMStep cStepMByte6
  99. #define QDCT_cMOTORStep cStepMByte7
  100. #define QDCT_cZHENPANStep cStepMByte8
  101. #define QDCT_cSTOPStep cStepMByte9
  102. #define QDCT_cFristQDStep cStepMByte10
  103. #define QDCT_cClearHDLTStep cStepMByte11
  104. //32位无符号变量
  105. #define ReSetXOUT_TIME cDelayTime11
  106. #define ReSetYOUT_TIME cDelayTime12
  107. #define ReSetZOUT_TIME cDelayTime13
  108. #define ReSetXDelay cDelayTime14
  109. #define ReSetYDelay cDelayTime15
  110. #define ReSetZDelay cDelayTime16
  111. #define QDCT_AutoDelay cDelayTime1
  112. #define QDCT_ZSZLDelay cDelayTime2
  113. #define QDCT_ZLTDelay cDelayTime3
  114. #define QDCT_TSXZLTDelay cDelayTime4
  115. #define QDCT_TQSMDelay cDelayTime5
  116. #define QDCT_LTCHECKDelay cDelayTime6
  117. #define QDCT_QDLLDelay cDelayTime7
  118. #define QDCT_CLTMDelay cDelayTime8
  119. #define QDCT_PKLLDelay cDelayTime9
  120. #define QDCT_cMOTORDelay cDelayTime10
  121. #define QDCT_cTMSSDelay cDelayTime20
  122. #define QDCT_STOP_PRESS_Delay cDelayTime21
  123. #define QDCT_ZHENPANDelay cDelayTime22
  124. #define QDCT_KKPOLIANDelay cDelayTime23
  125. #define QDCT_ZLSZLCHECKDelay cDelayTime24
  126. #define QDCT_STOPStepDelay cDelayTime25
  127. #define QDCT_ManuCSDelay cDelayTime26
  128. #define QDCT_ManuSSDelay cDelayTime27
  129. #define QDCT_QD_HM_TIME_TOTAL cDelayTime28
  130. #define QDCT_QD_KM_TIME_TOTAL cDelayTime29
  131. #define QDCT_QD_ALL_TIME_TOTAL cDelayTime30
  132. #define QDCT_QD_SZ_STOPPRESS_DELAY cDelayTime31
  133. #define QDCT_QD_HUADAO_CHECK_DELAY cDelayTime32
  134. #define QDCT_CLR_ALARM_Pulse cDelayTime33
  135. #define QDCT_cFristQDStep_DELAY cDelayTime34
  136. #define QDCT_cClearHDLTStep_DELAY cDelayTime35
  137. #define QDCT_PD_CHECK_DELAY cDelayTime19
  138. //32位有符号变量
  139. #define QDCT_XSAVEPOS cDword32Buff1
  140. #define QDCT_CHECK_GY_LENGTH cDword32Buff2
  141. #define QDCT_CHECK_GY_OLDLENGTH cDword32Buff3
  142. #define QDCT_CHECK_LD_LENGTH cDword32Buff4
  143. #define QDCT_CHECK_LD_OLDLENGTH cDword32Buff5
  144. #define QDCT_CHECK_CLT_PD_LENGTH cDword32Buff6
  145. #define QDCT_CHECK_LD_PD_LENGTH cDword32Buff7
  146. #define QDCT_PD_XSAVEPOS cDword32Buff8
  147. #define QDCT_CHECK_PD_LOCAL cDword32Buff9
  148. #define QDCT_ZHANUMBER_ADDR 99
  149. #define QDCT_ALARM_ADDR 100
  150. #define QDCT_SPEED_ADDR 101
  151. #define QDCT_SETTOTAL_ADDR 102
  152. #define QDCT_TOTAL_ADDR 104
  153. #define QDCT_NOWTOTAL_ADDR 106
  154. #define QDCT_PARAM_X_LOCAL (long *)&user_datas[108]
  155. #define QDCT_PARAM_Y_LOCAL (long *)&user_datas[110]
  156. #define QDCT_ALL_TOTAL_ADDR 112
  157. #define QDCT_DATE_TOTAL_ADDR 114
  158. //1~19
  159. #define QDCT_PARAM_XCYCLE_PULSE user_datas[0]//0 转一圈脉冲数
  160. #define QDCT_PARAM_XCYCLE_LENGTH user_datas[1]//1 转一圈拖带多长
  161. #define QDCT_PARAM_YCYCLE_PULSE user_datas[2]//0 转一圈脉冲数
  162. #define QDCT_PARAM_YCYCLE_LENGTH user_datas[3]//1 转一圈拖带多长
  163. #define QDCT_PARAM_ZCYCLE_PULSE user_datas[4]//0 转一圈脉冲数
  164. #define QDCT_PARAM_ZCYCLE_LENGTH user_datas[5]//1 转一圈拖带多长
  165. #define QDCT_PARAM_XREST_SPEED user_datas[6]//X轴复位速度
  166. #define QDCT_PARAM_YREST_SPEED user_datas[7]//X轴复位速度
  167. #define QDCT_PARAM_ZREST_SPEED user_datas[8]//Z轴复位速度
  168. #define QDCT_PARAM_XPOWERON_RST user_datas[9]// X轴上电复位
  169. #define QDCT_PARAM_YPOWERON_RST user_datas[10]//Y轴上电复位
  170. #define QDCT_PARAM_ZPOWERON_RST user_datas[11]//Z轴上电复位
  171. #define QDCT_PARAM_XORIGN_WAIT user_datas[12]//X轴零点待机位置
  172. #define QDCT_PARAM_YORIGN_WAIT (short *)&user_datas[13]//Y轴零点待机位置
  173. #define QDCT_PARAM_ZORING_WAIT user_datas[14]//Z轴l零点待机位置
  174. #define QDCT_PARAM_XMAX_LENGTH user_datas[15]//X轴最大长度
  175. #define QDCT_PARAM_YMAX_LENGTH user_datas[16]//Y轴最大长度
  176. #define QDCT_PARAM_ZMAX_LENGTH user_datas[17]//Z轴最大长度
  177. #define QDCT_PARAM_RORIGIN_LENGTH user_datas[18]//Y轴回零减速长度
  178. //20~?
  179. #define QDCT_PARAM_ZSFOR_SPEED user_datas[20]
  180. #define QDCT_PARAM_ZSBACK_SPEED user_datas[21]
  181. #define QDCT_PARAM_ZSSL_LOCAL (short *)&user_datas[22]
  182. #define QDCT_PARAM_ZSFL_LOCAL user_datas[23]
  183. #define QDCT_PARAM_LOWSP_LENGTH user_datas[24]
  184. #define QDCT_PARAM_ZSJL_TIME user_datas[25]
  185. #define QDCT_PARAM_ZSFL_TIME user_datas[26]
  186. #define QDCT_PARAM_SJCHECK_LOCAL user_datas[27]
  187. #define QDCT_PARAM_SJCHECK_TIME user_datas[28]
  188. #define QDCT_PARAM_SJCHECK_USE user_datas[29]
  189. #define QDCT_PARAM_ZSLTFALUE_NUM user_datas[30]
  190. #define QDCT_PARAM_ZSSL_SPEED user_datas[31]
  191. #define QDCT_PARAM_ZSXL_SPEED user_datas[32]
  192. #define QDCT_PARAM_WLTBJ_WAIT user_datas[27]//user_datas[33]
  193. #define QDCT_PARAM_SJCHECK_DELAY user_datas[33]
  194. #define QDCT_PARAM_ZPSTART_TIME user_datas[34]//振盘无料振动时间
  195. #define QDCT_PARAM_ZPSTOP_TIME user_datas[35]//振盘有料停振时间
  196. //36~?
  197. #define QDCT_PARAM_JLT_OVERTIME user_datas[36]
  198. #define QDCT_PARAM_TQSM_TIME user_datas[37]
  199. #define QDCT_PARAM_TUILTBACK_DELAY user_datas[38]
  200. #define QDCT_PARAM_HEMO_TIME user_datas[39]
  201. #define QDCT_PARAM_CAOSHENG_TIME user_datas[40]
  202. #define QDCT_PARAM_PKLL_TIME user_datas[41]//破链时间
  203. #define QDCT_PARAM_HJL_OVERTIME user_datas[42]//夹链到位时间
  204. #define QDCT_PARAM_SJBD_OVERTIME user_datas[43]//松开夹布带时间
  205. #define QDCT_PARAM_LLMZ_TYPE user_datas[44]//拉链马桩类型,0为闭口,1为开口
  206. #define QDCT_PARAM_TMSS_TIME user_datas[45]//台面输送时间
  207. #define QDCT_PARAM_CYCLE_TIME user_datas[46]//运行循环时间
  208. #define QDCT_PARAM_TQXZ_TIME user_datas[47]//提前旋转时间
  209. #define QDCT_PARAM_TJHJBD_DELAY user_datas[48]//停机后延时夹布带
  210. #define QDCT_PARAM_WEIBA_TYPE user_datas[49]//拉链尾巴类型
  211. #define QDCT_PARAM_WORK_MODE user_datas[50]//工作模式,0穿头切断,1、切断
  212. #define QDCT_PARAM_ZPSL_MODE user_datas[51]//振盘上料模式,0、标准模式 1、机械手上料,
  213. #define QDCT_PARAM_ZSWL_CHECK_MODE user_datas[52]//抓手检测无料停机时间
  214. #define QDCT_PARAM_SAFE_DOOR_SW user_datas[53]//安全护罩0常开(关门有信号)、1常闭(关门无信号);
  215. #define QDCT_PARAM_XMDW_DELAY user_datas[54]//下模到位后延时检测的时间
  216. #define QDCT_PARAM_ZLSCL_NUM user_datas[55]//拉头存料数量
  217. #define QDCT_PARAM_TQHS_TIME user_datas[56]//提前横送时间
  218. #define QDCT_PARAM_HAND_WAIT_LOCAL (short *)&user_datas[60]//机械手待机位
  219. #define QDCT_PARAM_HAND_WORK_LOCAL (short *)&user_datas[61]//机械手工作位
  220. #define QDCT_PARAM_HAND_IDLE_SPEED user_datas[62]//机械手空走速度
  221. #define QDCT_PARAM_HAND_CLT_SPEED user_datas[63]//机械手穿拉头速度
  222. #define QDCT_PARAM_HAND_TLD_SPEED user_datas[64]//机械手拖带速度
  223. #define QDCT_PARAM_HAND_LD_CMP (short *)&user_datas[65]//长度修正补偿
  224. #define QDCT_PARAM_HAND_LD_LENGTH (unsigned long *)&user_datas[66]//拉带长度32位
  225. //#define QDCT_PARAM_HAND_LD_LENGTH user_datas[67]//拉带长度
  226. #define QDCT_PARAM_HAND_LT_LENGTH user_datas[68]//拉头长度预留
  227. //#define QDCT_PARAM_HAND_LT_LOCAL user_datas[69]//拉头位置
  228. #define QDCT_PARAM_CTM_QD_LENGTH user_datas[70]//穿拉头模距离切刀长度
  229. #define QDCT_PARAM_CTM_XMLT_LENGTH user_datas[71]//穿来头模距离下模拉头长度
  230. #define QDCT_PARAM_CTM_TM_LENGTH user_datas[72]//穿来头模距离台面长度
  231. #define QDCT_PARAM_LDDTM_LOCAL user_datas[73]//拉到台面位置
  232. #define QDCT_PARAM_HAND_TJ_LOCAL user_datas[74]//机械手退夹距离
  233. #define QDCT_PARAM_HAND_SD_LOCAL user_datas[75]//机械手松带距离
  234. #define QDCT_PARAM_HAND_FD_SPEED user_datas[76]//机械手放带速度
  235. #define QDCT_PARAM_HAND_STOP_LOCAL user_datas[77]//机械手停止位置
  236. #define QDCT_PARAM_BKPL_TIME user_datas[78]//机械手闭口破链时间
  237. #define QDCT_PARAM_KK_First_SPEED user_datas[80]// 开口前两条速度
  238. #define QDCT_PARAM_KK_Work_SPEED user_datas[81]// 开口工作速度
  239. #define QDCT_PARAM_KK_TD_SPEED user_datas[82]//开口的空位速度
  240. #define QDCT_PARAM_KK_KW_SPEED user_datas[83]//开口的空位速度
  241. #define QDCT_PARAM_KK_QDDW_LENGTH user_datas[84]//定位长度
  242. #define QDCT_PARAM_KKPL_TIME user_datas[85]//开口破链时间
  243. #define QDCT_PARAM_KKKW_LOW_LENGTH user_datas[86]//空位前减速距离
  244. #define QDCT_PARAM_KKFIRST_ALARM_LENGTH user_datas[87]//开口的前两条拉带保护长度
  245. #define QDCT_PARAM_KK_ALARM_LENGTH user_datas[88]//开口的前两条拉带保护长度
  246. #define QDCT_PARAM_KK_CDL_ALARM_LENGTH user_datas[89]//长短链报警值
  247. #define QDCT_PARAM_XMTM_SPEED user_datas[90]//下模脱模速度
  248. #define QDCT_PARAM_XMTM_CMP_LENGTH user_datas[91]//在脱模速度下长度修正
  249. #define QDCT_PARAM_FACTORY user_datas[92]//厂家名称
  250. #define QDCT_PARAM_SF_BJ_MODE user_datas[93]//1步进/0伺服
  251. #define QDCT_PARAM_FEIDAI_LENGTH user_datas[94]//废带感应安装距离
  252. #define QDCT_PARAM_HAND_FL_SD_LENGTH user_datas[95]//机械手松带距离
  253. #define QDCT_PARAM_FEILIAO_MODE user_datas[96]//机械手松带距离
  254. //输入定义
  255. #define QDCT_START_IN M0384 //X00启动
  256. #define QDCT_START_IN_UP (M0384 && !OLDM384)
  257. #define QDCT_STOP_IN M0385 //X01停止
  258. #define QDCT_STOP_IN_UP (M0385 && !OLDM385)
  259. #define QDCT_STOP_IN_DW (!M0385 && OLDM385)
  260. #define QDCT_HZLT_ORIGIN_IN M0386 //PGin(2)// //X02抓拉头原位,机械手
  261. #define QDCT_LTQL_CHECK_IN M0387 //X03 拉头缺料感应
  262. #define QDCT_LLCR_CHECK_IN M0388 //X04 拉链穿入感应
  263. #define QDCT_XM_ORIGIN_IN M0389 //X05 下模原位
  264. #define QDCT_XM_LIMIT_IN M0390 //X06下模到位
  265. #define QDCT_HSL_LIMIT_IN M0391 //X07横送料到位
  266. #define QDCT_HSL_ORIGIN_IN M0392 //X10横送料原位
  267. #define QDCT_SQD_LIMIT_IN M0393 //X11上切刀到位
  268. #define QDCT_XQD_LIMIT_IN M0394 //X12下切刀到位
  269. #define QDCT_XQD_ORIGIN_IN M0395 //X13下切刀原位
  270. #define QDCT_CLT_LIMIT_IN M0396 //X14穿拉头到位
  271. #define QDCT_CLT_ORIGIN_IN M0397 //X15 穿拉头原位
  272. #define QDCT_TL_LIMIT_IN M0398 //X16推料到位信号
  273. #define QDCT_HAND_ORIGIN_IN M0399 //X17 机械手原点
  274. #define QDCT_KW_CHECK_IN M0400 //X20 空位感应
  275. #define QDCT_HDGQ_CHECK_IN M0401 //X21 滑道光纤
  276. #define QDCT_TLGQ_CHECK_IN M0402 //X22 推料光纤
  277. #define QDCT_XZ_ORIGIN_IN M0403 //X23旋转原位
  278. #define QDCT_XZ_LIMIT_IN M0404 //X24旋转到位
  279. #define QDCT_CSL_LIMIT_IN M0405 //X25 侧送料到位
  280. #define QDCT_CSL_ORIGIN_IN M0406 //X26 测试料原位
  281. #define QDCT_DOOR_CHECK_IN M0407 //X27 安全护照
  282. #define QDCT_DOOR_CHECK_IN_UP (M0407 && !OLDM407) //X27 安全门(常闭时打开)
  283. #define QDCT_DOOR_CHECK_IN_DOWN (!M0407 && OLDM407) //X27 安全门(常开始时打开)
  284. #define QDCT_SHIJ_CHECK_IN M0408 //X30 视觉检测
  285. #define QDCT_SHIJ_CHECK_IN_UP (M0408 && !OLDM408) //X30 视觉检测
  286. #define QDCT_LDQL_CHECK_IN M0409 //X31拉带缺料感应
  287. #define QDCT_LDQL_CHECK_IN_UP (M0409 && !OLDM409)
  288. #define QDCT_ZPYL_CHECK_IN M0410 //X32振盘有料
  289. #define QDCT_ZPYL_FEIDAI_IN M0411 //X33废带感应
  290. #define QDCT_ZPYL_FEIDAI_IN_UP (M0411 && !OLDM411)
  291. //机械手与通用型的重复点位
  292. #define QDCT_LDQL_COM_CHECK_IN M0386 //X02拉带缺料感应
  293. #define QDCT_LDQL_COM_CHECK_IN_UP (M0386 && !OLDM386)
  294. #define QDCT_EMG_STOP_IN M0401 //X21 安全护照
  295. #define QDCT_EMG_STOP_IN_UP (M0401 && !OLDM401) //X21 安全门(常闭时打开)
  296. #define QDCT_EMG_STOP_IN_DOWN (!M0401 && OLDM401) //X21 安全门(常开始时打开)
  297. #define QDCT_DOOR_COM_CHECK_IN M0401 //X21 安全护照
  298. #define QDCT_DOOR_COM_CHECK_IN_UP (M0401 && !OLDM401) //X21 安全门(常闭时打开)
  299. #define QDCT_DOOR_COM_CHECK_IN_DOWN (!M0401 && OLDM401) //X21 安全门(常开始时打开)
  300. #define QDCT_ZPYL_COM_CHECK_IN M0402 //X22振盘有料
  301. #define QDCT_TL_COM_ORIGIN_IN M0403 //X23旋转原位
  302. //输出定义
  303. #define QDCT_JIALIAN_VAVLE M0304 //Y00 夹链气缸
  304. #define QDCT_ZHL_VAVLE M0305 //Y01 抓料气缸
  305. #define QDCT_XM_VAVLE M0306 //Y02 下模气缸
  306. #define QDCT_HSL_VAVLE M0307 //Y03 横送料气缸
  307. #define QDCT_TL_VAVLE M0308 //Y04 推料气缸
  308. #define QDCT_HDDL_VAVLE M0309 //Y05 滑道档料气缸
  309. #define QDCT_XZ_VAVLE M0310 //Y06 旋转气缸
  310. #define QDCT_JLT_VAVLE M0311 //Y07 夹拉头气缸
  311. #define QDCT_FDAI_VAVLE M0312 //Y10 分带气缸
  312. #define QDCT_CLT_VAVLE M0313 //Y11 穿头气缸
  313. #define QDCT_JBD_VAVLE M0314 //Y12 夹布带气缸
  314. #define QDCT_XQD_VAVLE M0315 //Y13下刀气缸
  315. #define QDCT_ZYCS_VAVLE M0316 //Y14 增压/超声
  316. #define QDCT_SQD_VAVLE M0317 //Y15 上刀气缸
  317. #define QDCT_ALARM_OUT M0318 //Y16 报警输出
  318. #define QDCT_RUNNING_OUT M0319 //Y17 运行输出
  319. #define QDCT_SSD_OUT M0320 //Y20 输送带
  320. #define QDCT_ZPKZ_VAVLE M0321 //Y21 振盘控制
  321. #define QDCT_CJL_VAVLE M0322 //Y22 侧进料气氛
  322. #define QDCT_ZPCQ_VAVLE M0323 //Y23 振盘吹气
  323. #define QDCT_SJ_CHECK_OUT M0324 //Y24 视觉输出
  324. //机械手与通用型的重复点位
  325. #define QDCT_ZPCQ_COM_VAVLE M0321 //Y21 振盘吹气
  326. //M0~M4全局固定使用
  327. #define QDCT_bRunning M0000
  328. #define QDCT_bStart M0001
  329. #define QDCT_bStop M0002
  330. #define QDCT_bAlarmStop M0003
  331. #define QDCT_bClearTotal M0004
  332. #define QDCT_bClerNowTotal M0005
  333. #define QDCT_bSafedoor M0006
  334. #define QDCT_bClearAllTOTAL M0007
  335. #define QDCT_bTestMode M0008
  336. #define QDCT_bQieDuan M0009
  337. #define QDCT_bOnceStart M0010
  338. #define QDCT_bZPSTARTing M0011
  339. #define QDCT_bZPSTART M0012
  340. #define QDCT_bQZuangLT M0013
  341. #define QDCT_bHZuangLT M0014
  342. #define QDCT_bClearDateTOTAL M0015
  343. #define QDCT_bHAND_REST M0016
  344. #define QDCT_bHAND_Rsting M0017
  345. #define QDCT_bZS_REST M0018
  346. #define QDCT_bZS_Rsting M0019
  347. #define QDCT_bFristQD M0020
  348. #define QDCT_bFristQDing M0021
  349. #define QDCT_bClearHDLT M0022
  350. #define QDCT_bClearHDLTing M0023
  351. #define QDCT_bManu_CTM M0024
  352. #define QDCT_bManu_CTMing M0025
  353. #define QDCT_bManu_ZLT M0026
  354. #define QDCT_bManu_ZLTing M0027
  355. #define QDCT_bManu_ZSZL M0028
  356. #define QDCT_bManu_ZSZLing M0029
  357. #define QDCT_bXMotor_P M0030
  358. #define QDCT_bXMotor_N M0031
  359. #define QDCT_bYMotor_P M0032
  360. #define QDCT_bYMotor_N M0033
  361. #define QDCT_bJiaLian M0051
  362. #define QDCT_bZHLT M0052
  363. #define QDCT_bXM M0053
  364. #define QDCT_bHSL M0054
  365. #define QDCT_bTLiao M0055
  366. #define QDCT_bHDDL M0056
  367. #define QDCT_bXZQG M0057
  368. #define QDCT_bJLT M0058
  369. #define QDCT_bFDai M0059
  370. #define QDCT_bCLT M0060
  371. #define QDCT_bJBD M0061
  372. #define QDCT_bXQD M0062
  373. #define QDCT_bZYXS M0063
  374. #define QDCT_bSQD M0064
  375. #define QDCT_bSSD M0065
  376. #define QDCT_bZPKG M0066
  377. #define QDCT_bCJL M0067
  378. #define QDCT_bZPCQ M0068
  379. #endif
  380. #endif