XDHeLian.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. #include "global.h"
  2. #if XI_DONG_MACHINE
  3. void HL_InitAction(void);
  4. void HL_Action(void);
  5. void HL_SetAlarmCode(unsigned alarm_code);
  6. void HL_StartStopAction(void);
  7. void HL_AutoRunStep(void);
  8. void HL_Motor(void);
  9. void HL_Step(void);
  10. unsigned char cDWflg=0,cZCXflg=0,cHLflg=0,HL_StopFlg;
  11. short *offset_length_buff;
  12. unsigned char HL_X02_IN_FLAG,HL_X02_IN_FLAG_OLD;
  13. unsigned short HL_X02_FILTER;
  14. void HL_SetAlarmCode(unsigned alarm_code)
  15. {
  16. SetAlarmCode(HL_ALARM_ADDR,alarm_code);
  17. HL_bAlarmStop = 1;
  18. }
  19. void HL_InitAction(void)
  20. {
  21. CalFreqTab_X_Free(14);
  22. XGearRatio = 1;
  23. HL_X02_IN_FLAG = HL_GUO_LIAN_IN;
  24. HL_X02_IN_FLAG_OLD = HL_X02_IN_FLAG;
  25. }
  26. //手动动作
  27. void HL_ManualAction(void)
  28. {
  29. if(!HL_bRunning)
  30. {
  31. //警告跳出
  32. if(bClearTotal)
  33. {
  34. bClearTotal = 0;
  35. ClrcToTal(HL_TOTAL_ADDR);
  36. HL_bSetWorkData = 1;
  37. }
  38. if(HL_bAdd)
  39. {
  40. HL_bAdd = 0;
  41. HL_PARAM_DELAY_STOP += 10;
  42. }
  43. if(HL_bDec)
  44. {
  45. HL_bDec = 0;
  46. if(HL_PARAM_DELAY_STOP >= 10)HL_PARAM_DELAY_STOP -= 10;
  47. }
  48. if(HL_bHM)
  49. {
  50. HL_bHM = 0;
  51. HL_HM_VAVLE = ~HL_HM_VAVLE;
  52. }
  53. if(HL_bTFK)
  54. {
  55. HL_bTFK = 0;
  56. HL_TFK_VAVLE = ~HL_TFK_VAVLE;
  57. }
  58. if(HL_bBB)
  59. {
  60. HL_bBB = 0;
  61. HL_BB_VAVLE = ~HL_BB_VAVLE;
  62. }
  63. if(HL_bJD)
  64. {
  65. HL_bJD = 0;
  66. HL_JD_VAVLE = ~HL_JD_VAVLE;
  67. }
  68. if(HL_bCCX)
  69. {
  70. HL_bCCX = 0;
  71. HL_CCX_VAVLE = ~HL_CCX_VAVLE;
  72. }
  73. if(HL_bSL)
  74. {
  75. HL_bSL = 0;
  76. HL_SL_MOTOR = ~HL_SL_MOTOR;
  77. }
  78. if(HL_bDK)
  79. {
  80. HL_bDK = 0;
  81. HL_DK_VAVLE = ~HL_DK_VAVLE;
  82. }
  83. if(HL_bMotor)
  84. {
  85. SetEn(X_AXIS,HL_MOTOR_EN);
  86. if(!X_DRV)AxisContinueMove(X_AXIS,10,HL_DIR_P);
  87. }
  88. else
  89. {
  90. if(X_DRV)AxisDecStop(X_AXIS);
  91. }
  92. }
  93. }
  94. //合链动作
  95. void HL_Action(void)
  96. {
  97. HL_ManualAction();
  98. HL_StartStopAction();
  99. HL_Motor();
  100. HL_Step();
  101. HL_AutoRunStep();
  102. }
  103. //启动停止故障停止动作
  104. void HL_StartStopAction(void)
  105. {
  106. static unsigned long dwstop_cnt = 0;
  107. if((START_IN_UP || HL_bStart || HL_bSingStart || HL_bDW || HL_bZCX || HL_bHL) && !HL_bRunning && (HL_AutoStep ==0))
  108. {
  109. if(!HL_CCX_LIMIT_IN)HL_SetAlarmCode(HL_CCX_LIMIT_ALARM);
  110. else if(!HL_CCX_ORIGIN_IN)HL_SetAlarmCode(HL_CCX_ORIGIN_ALARM);
  111. else
  112. {
  113. SetAlarmCode(HL_ALARM_ADDR,HL_NO_ALARM);
  114. HL_bRunning = 1;
  115. HL_StopFlg = 0;
  116. dwZipCnt = 0;
  117. if(HL_bSingStart)
  118. {
  119. HL_bSingStart = 0;
  120. SingOneFlg = 1;
  121. }
  122. if(HL_bDW)
  123. {
  124. cDWflg = 1;
  125. dwZipCnt = 1;
  126. }
  127. if(HL_bZCX)cZCXflg = 1;
  128. if(HL_bHL)cHLflg = 1;
  129. if(HL_bZCX)HL_AutoStep = 4;
  130. else if(HL_bHL)HL_AutoStep = 1;
  131. else HL_AutoStep = 1;
  132. }
  133. HL_bDW = 0;
  134. HL_bZCX = 0;
  135. HL_bHL = 0;
  136. HL_bSingStart = 0;
  137. HL_bStart = 0;
  138. }
  139. if(!HL_bMotor && !X_DRV && !HL_bRunning && (HL_MotorStep==0))SetEn(X_AXIS,HL_MOTOR_DISEN);
  140. if(HL_bStop)
  141. {
  142. HL_bStop = 0;
  143. if(HL_bRunning)
  144. SingOneFlg = 1;
  145. else
  146. {
  147. HL_HM_VAVLE = 0;
  148. HL_JD_VAVLE = 0;
  149. HL_CCX_VAVLE = 0;
  150. HL_DK_VAVLE = 0;
  151. HL_SL_MOTOR = 0;
  152. HL_bRunning = 0;
  153. HL_AutoStep = 0;
  154. HL_MotorStep = 0;
  155. SingOneFlg = 0;
  156. HL_bMotor = 0;
  157. cDWflg = 0;
  158. cZCXflg = 0;
  159. cHLflg = 0;
  160. AxisEgmStop(X_AXIS);
  161. SetAlarmCode(HL_ALARM_ADDR,HL_NO_ALARM);
  162. HL_StopFlg = 1;
  163. }
  164. }
  165. if(STOP_IN_UP)
  166. {
  167. if(HL_bRunning)
  168. {
  169. HL_bStop = 0;
  170. HL_DK_VAVLE = 0;
  171. HL_JD_VAVLE = 0;
  172. HL_CCX_VAVLE = 0;
  173. HL_SL_MOTOR = 0;
  174. HL_bRunning = 0;
  175. HL_AutoStep = 0;
  176. HL_MotorStep = 0;
  177. HL_HLStep = 0;
  178. SingOneFlg = 0;
  179. HL_bMotor = 0;
  180. cDWflg = 0;
  181. cZCXflg = 0;
  182. cHLflg = 0;
  183. SetAlarmCode(HL_ALARM_ADDR,HL_NO_ALARM);
  184. AxisEgmStop(X_AXIS);
  185. }
  186. else
  187. {
  188. HL_bStop = 0;
  189. HL_DK_VAVLE = 0;
  190. HL_JD_VAVLE = 0;
  191. HL_CCX_VAVLE = 0;
  192. HL_SL_MOTOR = 0;
  193. HL_bRunning = 0;
  194. HL_AutoStep = 0;
  195. HL_MotorStep = 0;
  196. HL_HLStep = 0;
  197. SingOneFlg = 0;
  198. HL_bMotor = 0;
  199. cDWflg = 0;
  200. cZCXflg = 0;
  201. cHLflg = 0;
  202. SetAlarmCode(HL_ALARM_ADDR,HL_NO_ALARM);
  203. AxisEgmStop(X_AXIS);
  204. HL_HM_VAVLE = 0;
  205. HL_StopFlg = 1;
  206. }
  207. }
  208. if(HL_StopFlg)
  209. {
  210. if(!HL_SM_LIMIT_IN && !HL_XM_LIMIT_IN)
  211. {
  212. HL_BB_VAVLE = 0;
  213. HL_TFK_VAVLE = 0;
  214. HL_StopFlg = 0;
  215. }
  216. }
  217. if(HL_bAlarmStop)
  218. {
  219. HL_bAlarmStop = 0;
  220. AxisEgmStop(X_AXIS);
  221. HL_AutoStep = 0;
  222. HL_ManDKStep = 0;
  223. HL_MotorStep = 0;
  224. HL_HLStep = 0;
  225. HL_bRunning = 0;
  226. SingOneFlg = 0;
  227. cDWflg = 0;
  228. cZCXflg = 0;
  229. cHLflg = 0;
  230. }
  231. if(HL_KA_DAI_IN)
  232. {
  233. HL_SetAlarmCode(HL_KD_ALARM);
  234. }
  235. else
  236. {
  237. // if(GetAlarmCode(HL_ALARM_ADDR) == HL_KD_ALARM)SetAlarmCode(HL_ALARM_ADDR,HL_NO_ALARM);
  238. }
  239. }
  240. void HL_Step(void)
  241. {
  242. static long hm_save_buff;
  243. switch(HL_HLStep)
  244. {
  245. case 1:
  246. if(HL_GUO_LIAN_IN_UP)
  247. {
  248. hm_save_buff = dwRealPos;
  249. HL_HLStep = 2;
  250. }
  251. break;
  252. case 2:
  253. if((dwRealPos + HL_PARAM_DELAY_HM_BACK) <= hm_save_buff)
  254. {
  255. HL_HM_VAVLE = 0;
  256. HL_HLDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  257. HL_HLStep = 3;
  258. }
  259. else if(!X_DRV)HL_SetAlarmCode(HL_HM_BACK_ALARM);
  260. break;
  261. case 3:
  262. if(!HL_SM_LIMIT_IN && !HL_XM_LIMIT_IN)
  263. {
  264. HL_HLStep = 4;
  265. HL_HLDelay = dwTickCount + HL_PARAM_DELAY_BB_BACK;
  266. }
  267. else if(dwTickCount >= HL_HLDelay)
  268. {
  269. if(HL_SM_LIMIT_IN)HL_SetAlarmCode(HL_SM_LIMIT_ALARM);
  270. else HL_SetAlarmCode(HL_XM_LIMIT_ALARM);
  271. }
  272. break;
  273. case 4:
  274. if(dwTickCount >= HL_HLDelay)
  275. {
  276. HL_HLStep = 5;
  277. HL_BB_VAVLE = 0;
  278. HL_HLDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  279. }
  280. break;
  281. case 5:
  282. if(!HL_BB_LIMIT_IN)
  283. {
  284. HL_HLStep = 0;
  285. if(SingOneFlg)
  286. {
  287. SingOneFlg = 0;
  288. HL_AutoStep = 0;
  289. HL_bRunning = 0;
  290. HL_MotorStep = 0;
  291. }
  292. HL_HLDelay = dwTickCount;
  293. }
  294. else if(dwTickCount >= HL_HLDelay)
  295. {
  296. HL_SetAlarmCode(HL_BB_LIMIT_ALARM);
  297. }
  298. break;
  299. }
  300. }
  301. //电机动作
  302. void HL_Motor(void) //
  303. {
  304. static long save_buff,hm_save_buff;
  305. DISPLAY_DATA0 = dwRealPos;
  306. DISPLAY_DATA1 = HL_AutoStep;
  307. DISPLAY_DATA2 = HL_MotorStep;
  308. DISPLAY_DATA3 = HL_HLStep;
  309. HL_X02_IN_FLAG_OLD = HL_X02_IN_FLAG;
  310. if(HL_GUO_LIAN_IN)
  311. {
  312. if(HL_X02_FILTER < HL_PARAM_FILTER_TIMES)
  313. {
  314. HL_X02_FILTER++;
  315. }
  316. else
  317. HL_X02_IN_FLAG = 1;
  318. }
  319. else if(HL_X02_FILTER > (HL_PARAM_FILTER_TIMES/2))
  320. {
  321. HL_X02_FILTER--;
  322. }
  323. else
  324. HL_X02_IN_FLAG = 0;
  325. dwRealPos = GetPos(X_AXIS);
  326. switch(HL_MotorStep)
  327. {
  328. case 0:break;
  329. case 1:
  330. if(GetEn(X_AXIS) == 0)
  331. {
  332. SetEn(X_AXIS,HL_MOTOR_EN);
  333. HL_MotorDelay = dwTickCount + 100;
  334. }
  335. HL_MotorStep = 2;
  336. break;
  337. case 2:
  338. if(dwTickCount >= HL_MotorDelay)
  339. {
  340. HL_MotorDelay = dwTickCount + HL_PARAM_MOTOR_ALARM_TIME;
  341. if(!HL_GUO_LIAN_IN)
  342. {
  343. MoveAction_Const_AccDec(X_AXIS,HL_DIR_P,HL_PARAM_LOW_SPEED,1,5,1);
  344. HL_MotorStep = 4;
  345. }
  346. else
  347. {
  348. if(dwZipCnt == 0)
  349. MoveAction_Const_AccDec(X_AXIS,HL_DIR_P,HL_PARAM_HIGH_SPEED/2,1,5,1);
  350. else
  351. MoveAction_Const_AccDec(X_AXIS,HL_DIR_P,HL_PARAM_HIGH_SPEED,1,5,1);
  352. HL_MotorStep = 3;
  353. }
  354. if(HL_HM_VAVLE)
  355. {
  356. *offset_length_buff = 0;
  357. if(HL_HLStep == 0)HL_HLStep = 1;
  358. }
  359. else
  360. {
  361. *offset_length_buff = 0;
  362. // offset_length_buff = &user_datas[22];
  363. }
  364. }
  365. break;
  366. case 3:
  367. if(HL_GUO_LIAN_IN_DW)
  368. {
  369. AxisChangeSpeed(X_AXIS,HL_PARAM_LOW_SPEED);
  370. HL_MotorDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  371. HL_MotorStep = 4;
  372. }
  373. else if((dwTickCount >= HL_MotorDelay) || HL_GUO_LIAN_IN_UP)
  374. HL_SetAlarmCode(HL_GUOLIAN_ALARM);
  375. break;
  376. case 4:
  377. if((HL_X02_IN_FLAG && !HL_X02_IN_FLAG_OLD))
  378. {
  379. save_buff = dwRealPos;
  380. HL_MotorStep = 5;
  381. }
  382. else if(dwTickCount >= HL_MotorDelay)
  383. HL_SetAlarmCode(HL_GUOLIAN_ALARM);
  384. break;
  385. case 5:
  386. if((dwRealPos + HL_PARAM_DELAY_STOP) <= save_buff)
  387. {
  388. AxisEgmStop(X_AXIS);
  389. HL_MotorStep = 6;
  390. }
  391. break;
  392. case 6:
  393. if(!X_DRV && (HL_HLStep == 0))
  394. {
  395. HL_MotorStep = 0;
  396. HL_MotorDelay = dwTickCount;
  397. }
  398. break;
  399. }
  400. }
  401. //自动运行动作
  402. void HL_AutoRunStep(void)
  403. {
  404. if(HL_bRunning)
  405. {
  406. if(HL_AutoStep == 1)
  407. {
  408. HL_AutoStep = 2;
  409. }
  410. else if((HL_AutoStep == 2) && (dwTickCount >= HL_AutoDelay))
  411. {
  412. if(HL_MotorStep == 0)
  413. {
  414. HL_AutoStep = 3;
  415. HL_MotorStep = 1;
  416. }
  417. }
  418. else if(HL_AutoStep == 3)
  419. {
  420. if(HL_MotorStep == 0)
  421. {
  422. if(cDWflg | cHLflg)
  423. {
  424. cDWflg = 0;
  425. cHLflg = 0;
  426. HL_AutoStep = 0;
  427. HL_bRunning = 0;
  428. }
  429. else
  430. {
  431. HL_AutoDelay = dwTickCount + HL_PARAM_DELAY_TFK;
  432. HL_AutoStep = 4;
  433. }
  434. }
  435. }
  436. else if((HL_AutoStep == 4) && (dwTickCount >= HL_AutoDelay))
  437. {
  438. HL_TFK_VAVLE = 0;
  439. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  440. HL_AutoStep = 5;
  441. }
  442. else if(HL_AutoStep == 5)
  443. {
  444. if(HL_TFK_LIMIT_IN)
  445. {
  446. HL_AutoStep = 6;
  447. HL_AutoDelay = dwTickCount + HL_PARAM_DELAY_HM;
  448. }
  449. else if(dwTickCount >= HL_AutoDelay)
  450. {
  451. HL_SetAlarmCode(HL_TFK_LIMIT_ALARM);
  452. }
  453. }
  454. else if((HL_AutoStep == 6) && (dwTickCount >= HL_AutoDelay))
  455. {
  456. HL_HM_VAVLE = 1;
  457. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  458. HL_AutoStep = 7;
  459. }
  460. else if(HL_AutoStep == 7)
  461. {
  462. if(HL_SM_LIMIT_IN && HL_XM_LIMIT_IN)
  463. {
  464. HL_AutoStep = 8;
  465. HL_AutoDelay = dwTickCount + HL_PARAM_DELAY_TFK_BACK;
  466. }
  467. else if(dwTickCount >= HL_AutoDelay)
  468. {
  469. if(!HL_SM_LIMIT_IN)
  470. HL_SetAlarmCode(HL_SM_LIMIT_ALARM);
  471. else
  472. HL_SetAlarmCode(HL_XM_LIMIT_ALARM);
  473. }
  474. }
  475. else if((HL_AutoStep == 8) && (dwTickCount >= HL_AutoDelay))
  476. {
  477. HL_AutoStep = 9;
  478. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  479. HL_TFK_VAVLE = 1;
  480. }
  481. else if(HL_AutoStep == 9)
  482. {
  483. if(HL_TFK_ORIGIN_IN)
  484. {
  485. HL_AutoDelay = dwTickCount + HL_PARAM_DELAY_DK;
  486. HL_AutoStep = 10;
  487. }
  488. else if(dwTickCount >= HL_AutoDelay)
  489. HL_SetAlarmCode(HL_TFK_ORIGIN_ALARM);
  490. }
  491. else if((HL_AutoStep == 10) && (dwTickCount >= HL_AutoDelay))
  492. {
  493. HL_AutoStep = 11;
  494. }
  495. else if(HL_AutoStep == 11)
  496. {
  497. HL_DK_VAVLE = 1;
  498. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  499. HL_AutoStep = 12;
  500. }
  501. else if(HL_AutoStep == 12)
  502. {
  503. if(HL_DK_LIMIT_IN)
  504. {
  505. HL_AutoDelay = dwTickCount + HL_PARAM_DELAY_BB;
  506. HL_AutoStep = 13;
  507. }
  508. else if(dwTickCount >= HL_AutoDelay)
  509. HL_SetAlarmCode(HL_DK_LIMIT_ALARM);
  510. }
  511. else if((HL_AutoStep == 13) && (dwTickCount >= HL_AutoDelay))
  512. {
  513. HL_BB_VAVLE = 1;
  514. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  515. HL_AutoStep = 14;
  516. }
  517. else if(HL_AutoStep == 14)
  518. {
  519. if(HL_BB_LIMIT_IN)
  520. {
  521. HL_AutoDelay = dwTickCount + HL_PARAM_DELAY_JD;
  522. HL_AutoStep = 15;
  523. }
  524. else if(dwTickCount >= HL_AutoDelay)
  525. HL_SetAlarmCode(HL_BB_LIMIT_ALARM);
  526. }
  527. else if((HL_AutoStep == 15) && (dwTickCount >= HL_AutoDelay))
  528. {
  529. HL_JD_VAVLE = 1;
  530. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  531. HL_AutoStep = 16;
  532. }
  533. else if(HL_AutoStep == 16)
  534. {
  535. if(HL_JD_LIMIT_IN)
  536. {
  537. HL_AutoDelay = dwTickCount + HL_PARAM_DELAY_CCX;
  538. HL_AutoStep = 17;
  539. }
  540. else if(dwTickCount >= HL_AutoDelay)
  541. HL_SetAlarmCode(HL_JD_LIMIT_ALARM);
  542. }
  543. else if((HL_AutoStep == 17) && (dwTickCount >= HL_AutoDelay))
  544. {
  545. HL_CCX_VAVLE = 1;
  546. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  547. HL_CheckDelay = dwTickCount + HL_PARAM_DELAY_CHECK_CCX;
  548. HL_AutoStep = 18;
  549. }
  550. else if((HL_AutoStep == 18) && (dwTickCount >= HL_CheckDelay))
  551. {
  552. if(HL_CCX_LIMIT_IN)
  553. {
  554. if(!X_DRV)AxisMovePosAccDec(X_AXIS,HL_PARAM_LOW_SPEED,HL_PARAM_CCX_LENGTH,1,5,5);
  555. HL_JD_VAVLE = 0;
  556. HL_DK_VAVLE = 0;
  557. HL_AutoDelay = dwTickCount + HL_VAVLE_ALARM_TIME;
  558. HL_AutoStep = 19;
  559. }
  560. else if(dwTickCount >= HL_AutoDelay)
  561. HL_SetAlarmCode(HL_CCX_LIMIT_ALARM);
  562. }
  563. else if(HL_AutoStep == 19)
  564. {
  565. if(HL_DK_ORIGIN_IN && !HL_JD_LIMIT_IN && !X_DRV)
  566. {
  567. HL_CCX_VAVLE = 0;
  568. HL_AutoStep = 20;
  569. }
  570. else if(dwTickCount >= HL_AutoDelay)
  571. {
  572. if(!HL_DK_ORIGIN_IN)
  573. HL_SetAlarmCode(HL_DK_ORIGIN_ALARM);
  574. else
  575. HL_SetAlarmCode(HL_CCX_ORIGIN_ALARM);
  576. }
  577. }
  578. else if(HL_AutoStep == 20)
  579. {
  580. HL_AutoStep = 21;
  581. }
  582. else if(HL_AutoStep == 21)
  583. {
  584. HL_AutoStep = 22;
  585. }
  586. else if(HL_AutoStep == 22)
  587. {
  588. HL_AutoStep = 23;
  589. }
  590. else if(HL_AutoStep == 23)
  591. {
  592. HL_AutoDelay = dwTickCount;
  593. HL_AutoStep = 24;
  594. }
  595. else if(HL_AutoStep == 24)
  596. {
  597. if(cZCXflg)
  598. {
  599. cZCXflg = 0;
  600. HL_AutoStep = 0;
  601. HL_bRunning = 0;
  602. }
  603. else
  604. {
  605. HL_AutoStep = 25;
  606. }
  607. }
  608. else if(HL_AutoStep == 25)
  609. {
  610. AddToTal(HL_TOTAL_ADDR);
  611. dwZipCnt++;
  612. HL_AutoStep = 2;
  613. HL_AutoDelay = HL_PARAM_CYCLE_DELAY + dwTickCount;
  614. CalProSP(HL_PROSPEED_ADDR);
  615. }
  616. }
  617. }
  618. #endif