HZFC_DengDaiDianJiaoJi.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. #ifndef DENGDAI_DIANJIAO_H
  2. #define DENGDAI_DIANJIAO_H
  3. #if FU_CHEN_MACHINE == 1
  4. extern void DDDJ_InitAction(void);
  5. extern void DDDJ_Action(void);
  6. #define DDDJ_VAVLE_ERROR_TIME 3000
  7. #define DDDJ_MOTOR_ALARM_TIME 5000
  8. //故障代码列表
  9. #define DDDJ_NO_ALARM 0
  10. #define X_ORIGIN_ALARM 1
  11. #define Y_ORIGIN_ALARM 2
  12. #define Z_ORIGIN_ALARM 3
  13. #define U_ORIGIN_ALARM 4
  14. #define V_ORIGIN_ALARM 5
  15. #define W_ORIGIN_ALARM 6
  16. #define DDDJ_TOTAL_ALARM 7
  17. #define DDDJ_YL_ORIGIN_ALARM 8
  18. #define DDDJ_CYG_ORIGIN_ALARM 9
  19. #define DDDJ_JYG_ORIGIN_ALARM 10
  20. #define DDDJ_DYG_ORIGIN_ALARM 11
  21. #define DDDJ_QL_ORIGIN_ALARM 12
  22. #define DDDJ_NO_RESET_ALARM 13
  23. #define DDDJ_NO_WLSTOP_ALARM 14
  24. //8位无符号变量
  25. #define ALL_Reset_Flag cCharBuff19
  26. #define X_Reset_Flag cCharBuff20
  27. #define Y_Reset_Flag cCharBuff21
  28. #define Z_Reset_Flag cCharBuff22
  29. #define U_Reset_Flag cCharBuff23
  30. #define V_Reset_Flag cCharBuff24
  31. #define W_Reset_Flag cCharBuff25
  32. #define X_SOFT_PLIMIT cCharBuff26
  33. #define X_SOFT_NLIMIT cCharBuff27
  34. #define Y_SOFT_PLIMIT cCharBuff28
  35. #define Y_SOFT_NLIMIT cCharBuff29
  36. #define Z_SOFT_PLIMIT cCharBuff30
  37. #define Z_SOFT_NLIMIT cCharBuff31
  38. #define U_SOFT_PLIMIT cCharBuff32
  39. #define U_SOFT_NLIMIT cCharBuff33
  40. #define V_SOFT_PLIMIT cCharBuff34
  41. #define V_SOFT_NLIMIT cCharBuff35
  42. #define W_SOFT_PLIMIT cCharBuff36
  43. #define W_SOFT_NLIMIT cCharBuff37
  44. #define DDDJ_CW_TIME cCharBuff1//插钩允许标志
  45. #define DDDJ_CCW_TIME cCharBuff2//装钩允许标志
  46. #define DDDJ_GP_HEAT_FLAG cCharBuff3
  47. #define DDDJ_XDG_YL_FLAG cCharBuff4//下档钩有料
  48. #define DDDJ_ZYJ_EN_FLAG cCharBuff5//装衣架使能
  49. #define DDDJ_ZYJ_YL_FLAG cCharBuff6//装衣架使能
  50. #define DDDJ_WorkCnt cCharBuff7
  51. #define DDDJ_Fristwork cCharBuff8
  52. #define DDDJ_FDAI_FLAG cCharBuff9
  53. #define DDDJ_XM_UP_FLAG cCharBuff10
  54. #define DDDJ_SJCHECK_TIME cCharBuff15
  55. #define DDDJ_DUANLIAN_ALARM_FLAG cCharBuff16//短链报警标志
  56. #define DDDJ_CHUANGLIAN_ALARM_FLAG cCharBuff17//长链报警标志
  57. #define DDDJ_Manu_CS_FLAG cCharBuff18
  58. #define DDDJ_AlARM_STOP_FLAG cCharBuff19
  59. //16位无符号变量
  60. #define XRunResetOStep cStepMByte20
  61. #define YRunResetOStep cStepMByte21
  62. #define ZRunResetOStep cStepMByte22
  63. #define URunResetOStep cStepMByte23
  64. #define VRunResetOStep cStepMByte24
  65. #define WRunResetOStep cStepMByte25
  66. #define DDDJ_AutoStep cStepMByte
  67. #define DDDJ_ZLTStep cStepMByte1
  68. #define DDDJ_LPDJStep cStepMByte2
  69. #define DDDJ_CYGStep cStepMByte4
  70. #define DDDJ_cXMOTORStep cStepMByte5
  71. #define DDDJ_cYMOTORStep cStepMByte6
  72. #define DDDJ_cZMOTORStep cStepMByte7
  73. #define DDDJ_cGPJRStep cStepMByte8
  74. //32位无符号变量
  75. #define ReSetXOUT_TIME cDelayTime20
  76. #define ReSetYOUT_TIME cDelayTime21
  77. #define ReSetZOUT_TIME cDelayTime22
  78. #define ReSetUOUT_TIME cDelayTime23
  79. #define ReSetVOUT_TIME cDelayTime24
  80. #define ReSetWOUT_TIME cDelayTime25
  81. #define ReSetXDelay cDelayTime26
  82. #define ReSetYDelay cDelayTime27
  83. #define ReSetZDelay cDelayTime28
  84. #define ReSetUDelay cDelayTime29
  85. #define ReSetVDelay cDelayTime30
  86. #define ReSetWDelay cDelayTime31
  87. #define DDDJ_AutoDelay cDelayTime1
  88. #define DDDJ_ZLTDelay cDelayTime2
  89. #define DDDJ_LPDJDelay cDelayTime3
  90. #define DDDJ_ZJDelay cDelayTime4
  91. #define DDDJ_CYGDelay cDelayTime5
  92. #define DDDJ_cXMOTORDelay cDelayTime6
  93. #define DDDJ_cYMOTORDelay cDelayTime7
  94. #define DDDJ_cZMOTORDelay cDelayTime8
  95. #define DDDJ_cGPJRDelay cDelayTime9
  96. #define DDDJ_cWLJCDelay cDelayTime10
  97. //32位有符号变量
  98. #define DDDJ_XSAVEPOS cDword32Buff1
  99. #define DDDJ_CHECK_GY_LENGTH cDword32Buff2
  100. #define DDDJ_CHECK_GY_OLDLENGTH cDword32Buff3
  101. #define DDDJ_CHECK_LD_LENGTH cDword32Buff4
  102. #define DDDJ_CHECK_LD_OLDLENGTH cDword32Buff5
  103. #define ZHANUMBER_ADDR 99
  104. #define ALARM_ADDR 100
  105. #define SPEED_ADDR 101
  106. #define SETTOTAL_ADDR 102
  107. #define TOTAL_ADDR 104
  108. #define NOWTOTAL_ADDR 106
  109. #define PARAM_X_LOCAL (long *)&user_datas[108]
  110. #define PARAM_Y_LOCAL (long *)&user_datas[110]
  111. #define PARAM_Z_LOCAL (long *)&user_datas[112]
  112. #define PARAM_U_LOCAL (long *)&user_datas[114]
  113. #define PARAM_V_LOCAL (long *)&user_datas[116]
  114. #define PARAM_W_LOCAL (long *)&user_datas[118]
  115. #define ALL_TOTAL_ADDR 130
  116. #define DATE_TOTAL_ADDR 132
  117. #define DIR_P 1
  118. #define DIR_N 0
  119. #define MOTOR_EN 1
  120. #define MOTOR_DISEN 0
  121. //1~19
  122. #define PARAM_XCYCLE_PULSE user_datas[0]//0 转一圈脉冲数
  123. #define PARAM_XCYCLE_LENGTH user_datas[1]//1 转一圈拖带多长
  124. #define PARAM_YCYCLE_PULSE user_datas[2]//0 转一圈脉冲数
  125. #define PARAM_YCYCLE_LENGTH user_datas[3]//1 转一圈拖带多长
  126. #define PARAM_ZCYCLE_PULSE user_datas[4]//0 转一圈脉冲数
  127. #define PARAM_ZCYCLE_LENGTH user_datas[5]//1 转一圈拖带多长
  128. #define PARAM_UCYCLE_PULSE user_datas[6]//0 转一圈脉冲数
  129. #define PARAM_UCYCLE_LENGTH user_datas[7]//1 转一圈拖带多长
  130. #define PARAM_VCYCLE_PULSE user_datas[8]//0 转一圈脉冲数
  131. #define PARAM_VCYCLE_LENGTH user_datas[9]//1 转一圈拖带多长
  132. #define PARAM_WCYCLE_PULSE user_datas[10]//0 转一圈脉冲数
  133. #define PARAM_WCYCLE_LENGTH user_datas[11]//1 转一圈拖带多长
  134. #define PARAM_XREST_SPEED user_datas[12]//X轴复位速度
  135. #define PARAM_YREST_SPEED user_datas[13]//X轴复位速度
  136. #define PARAM_ZREST_SPEED user_datas[14]//Z轴复位速度
  137. #define PARAM_UREST_SPEED user_datas[15]//X轴复位速度
  138. #define PARAM_VREST_SPEED user_datas[16]//X轴复位速度
  139. #define PARAM_WREST_SPEED user_datas[17]//Z轴复位速度
  140. #define PARAM_XPOWERON_RST user_datas[18]// X轴上电复位
  141. #define PARAM_YPOWERON_RST user_datas[19]//Y轴上电复位
  142. #define PARAM_ZPOWERON_RST user_datas[20]//Z轴上电复位
  143. #define PARAM_UPOWERON_RST user_datas[21]// X轴上电复位
  144. #define PARAM_VPOWERON_RST user_datas[22]//Y轴上电复位
  145. #define PARAM_WPOWERON_RST user_datas[23]//Z轴上电复位
  146. #define PARAM_XMAX_LENGTH user_datas[24]//X轴最大长度
  147. #define PARAM_YMAX_LENGTH user_datas[25]//Y轴最大长度
  148. #define PARAM_ZMAX_LENGTH user_datas[26]//Z轴最大长度
  149. #define PARAM_UMAX_LENGTH user_datas[27]//X轴最大长度
  150. #define PARAM_VMAX_LENGTH user_datas[28]//Y轴最大长度
  151. #define PARAM_WMAX_LENGTH user_datas[29]//Z轴最大长度
  152. #define PARAM_XMIN_LENGTH (short *)&user_datas[30]//X轴最大长度
  153. #define PARAM_YMIN_LENGTH (short *)&user_datas[31]//Y轴最大长度
  154. #define PARAM_ZMIN_LENGTH (short *)&user_datas[32]//Z轴最大长度
  155. #define PARAM_UMIN_LENGTH (short *)&user_datas[33]//X轴最大长度
  156. #define PARAM_VMIN_LENGTH (short *)&user_datas[34]//Y轴最大长度
  157. #define PARAM_WMIN_LENGTH (short *)&user_datas[35]//Z轴最大长度
  158. //50~?
  159. #define DDDJ_PARAM_TTP_H_TIME user_datas[50]//送料感应原点后走长度
  160. #define DDDJ_PARAM_TTP_R_TIME user_datas[51]//送料间隔长度
  161. #define DDDJ_PARAM_JTP_H_TIME user_datas[52]//送料间隔长度
  162. #define DDDJ_PARAM_JTP_R_TIME user_datas[53]//压线到位时间
  163. #define DDDJ_PARAM_XZTP_H_TIME user_datas[54]
  164. #define DDDJ_PARAM_XZTP_R_TIME user_datas[55]//横档到位
  165. #define DDDJ_PARAM_TPUD_H_TIME user_datas[56]//固化时间
  166. #define DDDJ_PARAM_TPUD_R_TIME user_datas[57]//固化时间
  167. #define DDDJ_PARAM_DTP_H_TIME user_datas[58]//固化时间
  168. #define DDDJ_PARAM_DTP_R_TIME user_datas[59]//固化时间
  169. #define DDDJ_PARAM_YDD_H_TIME user_datas[60]//固化时间
  170. #define DDDJ_PARAM_YDD_R_TIME user_datas[61]//固化时间
  171. #define DDDJ_PARAM_JDD_H_TIME user_datas[62]//固化时间
  172. #define DDDJ_PARAM_JDD_R_TIME user_datas[63]//固化时间
  173. #define DDDJ_PARAM_ZJ_TIME user_datas[64]//固化时间
  174. //70
  175. #define DDDJ_PARAM_TD_KS_LOCAL user_datas[70]//拖带开始位置
  176. #define DDDJ_PARAM_TD_L_LENGTH user_datas[71]//拖带长度
  177. #define DDDJ_PARAM_TD_DW_LENGTH user_datas[72]//拖带定位长度
  178. #define DDDJ_PARAM_TD_H_SPEED user_datas[73]//拖带定位长度
  179. #define DDDJ_PARAM_TD_L_SPEED user_datas[74]//拖带定位长度
  180. #define DDDJ_PARAM_TP_FZ_LOCAL user_datas[75]//托盘放置
  181. #define DDDJ_PARAM_TP_DJ_LOCAL user_datas[76]//拖带点胶
  182. #define DDDJ_PARAM_TP_YJ_LOCAL user_datas[77]//托盘压胶位置
  183. #define DDDJ_PARAM_TP_H_SPEED user_datas[78]//拖带定位长度
  184. #define DDDJ_PARAM_TP_L_SPEED user_datas[79]//拖带定位长度
  185. //80
  186. #define DDDJ_PARAM_SXJG_LOCAL user_datas[80]//收线间隔
  187. #define DDDJ_PARAM_START_LOCAL user_datas[81]//起始位置
  188. #define DDDJ_PARAM_JG_SPEED user_datas[82]//间隔速度
  189. #define DDDJ_PARAM_JG_NUM user_datas[83]//收线慢速
  190. #define DDDJ_PARAM_TP_SPACE_LENGTH user_datas[84]//拖带间隔
  191. #define DDDJ_PARAM_TP_SPACE_NUM user_datas[85]//拖带间隔数量
  192. //输入定义
  193. #define DDDJ_X_ORIGIN_IN M0386 //X02插钩电机原点
  194. #define DDDJ_Y_ORIGIN_IN M0387 //X03下料电机原点
  195. #define DDDJ_Z_ORIGIN_IN M0388 //X04 推料点胶原点
  196. #define DDDJ_U_ORIGIN_IN_UP (M0389 && !OLDM389) //X05 推料点胶原点
  197. //输入定义
  198. #define EMGSTOP_IN M0384 //X00 急停
  199. #define STOP_IN M0384 //X01停止
  200. #define STOP_IN_UP (M0384 && !OLDM384)
  201. #define STOP_IN_DW (!M0384 && OLDM384)
  202. #define START_IN M0385 //X01启动
  203. #define START_IN_UP (M0385 && !OLDM385)
  204. #define DDDJ_DT_GYING_IN M0390 //X05夹钩原点
  205. #define DDDJ_DT_GYING_IN_UP (M0390 && !OLDM390)
  206. #define DDDJ_DT_GYING_IN_DW (!M0390 && OLDM390)
  207. #define DDDJ_X_SALARM_IN M0397 //X15插钩伺服告警
  208. #define DDDJ_Y_SALARM_IN M0398 //X16插钩伺服告警
  209. #define DDDJ_Z_SALARM_IN M0399 //X17 收料电机原点
  210. //输出定义
  211. #define DDDJ_LSLSN_OUT M0304 //Y00
  212. #define DDDJ_LSLQH_OUT M0305 //Y01
  213. //
  214. //
  215. #define DDDJ_TTP_VAVLE M0306 //Y02
  216. #define DDDJ_JTP_VAVLE M0307 //Y03
  217. #define DDDJ_TPXZ_VAVLE M0308 //Y04
  218. #define DDDJ_TPSJ_VAVLE M0309 //Y05
  219. #define DDDJ_DTP_VAVLE M0310 //Y06
  220. #define DDDJ_ZJ_VAVLE M0311 //Y07
  221. #define DDDJ_YDD_VAVLE M0312 //Y10
  222. #define DDDJ_JDD_VAVLE M0313 //Y11
  223. #define DDDJ_ALARM_OUT M0323 //Y23 报警输出
  224. #define DDDJ_RUNNING_OUT M0324 //Y24 运行输出
  225. //M0~M4全局固定使用
  226. #define bRunning M0000
  227. #define bStart M0001
  228. #define bStop M0002
  229. #define bAlarmStop M0003
  230. #define bClearTotal M0004
  231. #define bClerNowTotal M0005
  232. #define bClearAllTOTAL M0006
  233. #define bOnceStart M0007
  234. #define bTestMode M0008
  235. #define bClearDateTOTAL M0009
  236. #define DDDJ_All_REST M0010
  237. #define DDDJ_All_RESTING M0011
  238. #define DDDJ_bLPStart M0012
  239. #define DDDJ_bLPRunning M0013
  240. #define DDDJ_bAuto_TEST M0016
  241. #define DDDJ_bHAND_Rsting M0017
  242. #define DDDJ_bZS_REST M0018
  243. #define DDDJ_bZS_Rsting M0019
  244. #define DDDJ_bFristQD M0020
  245. #define DDDJ_bFristQDing M0021
  246. #define DDDJ_bClearHDLT M0022
  247. #define DDDJ_bClearHDLTing M0023
  248. #define DDDJ_bManu_CTM M0024
  249. #define DDDJ_bManu_CTMing M0025
  250. #define DDDJ_bManu_ZLT M0026
  251. #define DDDJ_bManu_ZLTing M0027
  252. #define DDDJ_bXZ_SWC M0028
  253. #define DDDJ_bXZ_SWO M0029
  254. #define bXMotor_P M0030
  255. #define bXMotor_N M0031
  256. #define bYMotor_P M0032
  257. #define bYMotor_N M0033
  258. #define bZMotor_P M0034
  259. #define bZMotor_N M0035
  260. #define bUMotor_P M0036
  261. #define bUMotor_N M0037
  262. #define bVMotor_P M0038
  263. #define bVMotor_N M0039
  264. #define bWMotor_P M0040
  265. #define bWMotor_N M0041
  266. #define bXREST M0042
  267. #define bXRsting M0043
  268. #define bYREST M0044
  269. #define bYRsting M0045
  270. #define bZREST M0046
  271. #define bZRsting M0047
  272. #define bUREST M0048
  273. #define bURsting M0049
  274. #define bVREST M0050
  275. #define bVRsting M0051
  276. #define bWREST M0052
  277. #define bWRsting M0053
  278. #define DDDJ_bLPDJ M0060
  279. #define DDDJ_bHeat M0061
  280. #define DDDJ_bM62 M0062
  281. #define DDDJ_bM63 M0063
  282. #define DDDJ_bM64 M0064
  283. #define DDDJ_bM65 M0065
  284. #define DDDJ_bM66 M0066
  285. #define DDDJ_bM67 M0067
  286. #define DDDJ_bM68 M0068
  287. #define DDDJ_bM69 M0069
  288. #define DDDJ_bQL M0070
  289. #define DDDJ_bYL M0071
  290. #define DDDJ_bJZ M0072
  291. #define DDDJ_bCYG M0073
  292. #endif
  293. #endif