📄 xq_ap66c.lst
字号:
216 3 output_port (buzzer,OFF);
217 3 return;
218 3 }
219 2 a = scan_manual ();
220 2 on_workhd ();
221 2 while ( !input_port (workhd_up) );
222 2 delay (263);
223 2
224 2 if ( input_port (detect) == 0 )
225 2 {
226 3 output_port (buzzer,ON);
227 3 delay (883);
228 3 output_port (buzzer,OFF);
229 3 return;
230 3 }
231 2 output_port (index,ON);
232 2 while ( !input_port (index_dn) );
233 2 delay (23);
234 2 output_port (index,OFF);
235 2 while ( !input_port (index_up) );
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 12
236 2 delay (23);
237 2 b = a;
238 2 while (b)
239 2 {
240 3 output_port (index,ON);
241 3 while ( !input_port (index_dn) );
242 3 delay (23);
243 3 output_port (index,OFF);
244 3 while ( !input_port (index_up) );
245 3 delay (23);
246 3 on_p_pusher ();
247 3 c = 1;
248 3 while (c)
249 3 {
250 4 job_time = _current_time ();
251 4
252 4 while (c)
253 4 {
254 5 if ( input_port(p_pusher_fd) == 1 )
255 5 c = 0;
256 5
257 5 job_time_temp = _current_time ();
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 13
258 5 if ( job_time == job_time_temp - 936 )
259 5 {
260 6 output_port (buzzer,ON);
261 6 off_p_pusher ();
262 6 off_workhd ();
263 6 while (1);
264 6 }
265 5 }
266 4 }
267 3 delay (33);
268 3 off_p_pusher ();
269 3 while ( !input_port (p_pusher_bd) );
270 3 delay (63);
271 3 b--;
272 3 }
273 2 off_workhd ();
274 2 while ( !input_port (workhd_dn) );
275 2 }
276 1 delay (23);
277 1 }
278 //-------------------------------------------------------------------------
279 void on_p_pusher ()
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 14
280 {
281 1 output_port (p_pusher_1,ON);
282 1 output_port (p_pusher_2,OFF);
283 1 }
284 //-------------------------------------------------------------------------
285 void off_p_pusher ()
286 {
287 1 output_port (p_pusher_1,OFF);
288 1 output_port (p_pusher_2,ON);
289 1 }
290 //-------------------------------------------------------------------------
291 void on_workhd ()
292 {
293 1 output_port (workhd_1,ON);
294 1 output_port (workhd_2,OFF);
295 1 }
296 //-------------------------------------------------------------------------
297 void off_workhd ()
298 {
299 1 output_port (workhd_1,OFF);
300 1 output_port (workhd_2,ON);
301 1 }
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 15
302
303 //-------------------------------------------------------------------------
304 // end of file
305
306
307 /*
308 void sin_mo_wa ()
309 {
310 char a;
311
312 a = 1;
313 if ( input_port (auto) == 0 )
314 {
315 while (a)
316 {
317 if ( input_port (start1) )
318 { if ( input_port (start2) )
319 a = 0;
320 }
321 if ( input_port (manual) )
322 break;
323 }
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 16
324 }
325 while ( input_port (start1) );
326 while ( input_port (start2) );
327
328 }
329 */
330 //-------------------------------------------------------------------------
331 /*
332 void ck_home ()
333 {
334
335 char a;
336 char b;
337
338 b = 1 ;
339
340 while ( b )
341 {
342 a = input_port(wguide_bd) ;
343 a = a + input_port(feed1_dn) ;
344 a = a + input_port(feed2_up) ;
345
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 17
346 if ( a != 3 )
347 { output_port (alarm,ON);
348 b = 1;
349 }
350 else
351 { b = 0;
352 output_port (alarm,OFF);
353 }
354
355 } //for the while (b)
356 } //for the function
357 */
358 //-------------------------------------------------------------------------
359 /*
360 void sin_mo_pro ()
361 {
362 // char a;
363
364 output_port (lock,ON);
365 lockmem = 1;
366
367 while ( !input_port (lock_fd) ) ;
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 18
368
369 sin_mo_wa ();
370 if ( input_port (manual) )
371 return;
372
373 output_port (oil_pump,ON);
374 oil_pumpmem = 1;
375
376 sin_mo_wa ();
377 // while ( !input_port (oil_lvl_ck) ) ;
378
379 output_port (tr1,ON);
380 while ( !input_port (timer1) ) ;
381 delay (238);
382 output_port (tr1,OFF);
383 output_port (oil_pump,OFF);
384 oil_pumpmem = 0;
385
386 while ( !input_port (timer3) ) ; //soak time
387
388 output_port (oil_drain,ON);
389 oil_drainmem = 1;
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 19
390
391 while ( !input_port (timer4) ) ; //drain time
392
393 output_port (rotate_mot,ON);
394 rotate_motmem = 1;
395
396 output_port (tr2,ON);
397 while ( !input_port (timer2) ) ;
398 output_port (tr2,OFF);
399
400 output_port (rotate_mot,OFF);
401 rotate_motmem = 0;
402
403 sin_mo_wa ();
404 if ( input_port (manual) )
405 return;
406
407 output_port (oil_drain,OFF);
408 delay (1630);
409 oil_drainmem = 0;
410
411 sin_mo_wa ();
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 20
412 if ( input_port (manual) )
413 return;
414
415 output_port (lock,OFF);
416 lockmem = 0;
417
418 }
419 */
420
421
422 //-------------------------------------------------------------------------
423 // end of file
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 769 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 3 5
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
C51 COMPILER V7.06 AP66C 03/06/2004 21:02:00 PAGE 21
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -