home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 471 / rccl208 < prev    next >
Text File  |  1987-03-02  |  680b  |  34 lines

  1. #include "../h/rccl.h"
  2. #include "../h/rtc.h"
  3.  
  4. extern int rtime;
  5. extern int completed;
  6. extern struct how how;
  7.  
  8. pumatask()
  9. {
  10.     TRSF_PTR z, b1, e;
  11.     POS_PTR  p1;
  12.     int q, sensor;
  13.  
  14.     e = gentr_trsl("E",  0.,  0., 170.);
  15.     z = gentr_trsl("Z",  0.,  0., 864.);
  16.     b1 = gentr_rot("B1", 600. , 300., 500., yunit, 180.);
  17.  
  18.     b1->fn = hold;
  19.     p1 = makeposition("P1" , z, t6, e, EQ, b1, TL, e);
  20.  
  21.     movejnts(p1, 400, 2200);
  22.     waitfor(completed);
  23.  
  24.     sensor = adcopen(7);
  25.     while(how.adcr[sensor] < 10) {
  26.         printf("%f mm\n", b1->p.z);
  27.         b1->p.z -= 3.;
  28.         movejnts(p1, 60, 150);
  29.         waitfor(p1->end);
  30.     }
  31.     printf("The table is at %f mm\n", b1->p.z);
  32.     movejnts(park, 400, 2500);
  33. }
  34.