next up previous
Naprej: Vklju"cevanje vhodnih linij Gor: Seznanjanje z robotom Nazaj: Potek vaje

Program

Za zahtevano "pick & place" rutino sme napisali program z uporabo podprogramov, ki so skraj"sali in poenostavili praogram. Tako je na vrsticah:

200
prihod v to"cko
300
odhod iz to"cke

LLIST 10-400
 00010 I=1
 00015 GOSUB 200
 00020 GOSUB 300
 00030 I=I+1
 00040 GOSUB 200
 00050 IF I < 5 THEN GOTO 20
 00054 I=I-1
 00055 GOSUB 300
 00060 I=1
 00070 GOSUB 200
 00075 GOTO 10
 00080 END
 00200 MOVE T(I+10)
 00205 NOSHAVE
 00206 SPEED 50
 00210 MOVE T(I)
 00220 OUTPUT -OG0 +OG1
 00230 DELAY 500
 00240 RETURN
 00300 OUTPUT +OG0 -OG1
 00320 DELAY 500
 00325 SHAVE
 00326 SPEED 260
 00330 MOVE T(I+10)
 00340 RETURN
 00400 END
E> TLLIST
T0=      407.999 -166.413  -45.156  -22.189 
T1=      472.436 -203.94   -97.444   90.269 
T2=      518.701   26.872  -94.828   93.208 
T3=      334.966   81.937  -94.828  149.721 
T4=      315.494 -136.192  -97.428   90.269 
T5=      422.986  -71.127  -96.597   90.269 
T6=      492.355  131.804  -39.841  -93.696 
T7=      277.1   -239.999  -92.678  -52.874 
T8=      519.571 -134.658  -96.734  -26.508 
T9=      519.571 -134.658  -43.781  -26.508 
T10=     434.357 -187.503  -97.444  -23.349 
T11=     472.436 -203.94   -28.472   90.269 
T12=     518.701   26.872  -34.297   93.208 
T13=     334.966   81.937  -31.113  149.721 
T14=     315.494 -136.192  -26.903   90.269 
T15=     422.986  -71.127  -44.281   90.269



Leon Kos
Mon Apr 15 12:27:38 GMT+0100 1996