Rp6 v2 Robotersystem

download Rp6 v2 Robotersystem

of 138

Transcript of Rp6 v2 Robotersystem

  • 8/19/2019 Rp6 v2 Robotersystem

    1/138

    RP6 ROBOT BASE

    RP6-BASERP6v2-BASE

    ©2007 - 2012 AREXX Engineering

    www.arexx.com

    http://www.arexx.com/http://www.arexx.com/

  • 8/19/2019 Rp6 v2 Robotersystem

    2/138

    RP6Robo S!"em

    Manual

    - English -

    Version RP6-BASE-EN-20120115 

    for RP6 and RP6v2

     IMPORTANT INFORMATION!Please read carefully! 

    Before you start operating the RP6, RP6 or any of the additionale"uip#ent, you #ust read this #anual and the #anuals for add$on#odules co#pletely! The docu#entation contains infor#ation a%outho& to operate the syste#s properly and ho& to aoid dangerous situ$ations! Further#ore the #anuals proide i#portant details, &hich #ay

    %e un'no&n to aerage users(Paying no attention to this #anual &ill cause a loss of &arranty! Addi$tionally, AR)** )ngineering cannot %e #ade responsi%le for any da#$ages caused %y neglecting the #anual+s instructions! 

    Please pay special attention to the chapter -afety instructions.! 

    /o not connect the 0-B Interface to your P1 %efore you

    hae read chapter 2 3 4ard&are and -oft&are -etup.

    and co#pleted the soft&are installation! 

  • 8/19/2019 Rp6 v2 Robotersystem

    3/138

    #ega$ %oice

    ©2007 - 2012 AREXX Engineering

    Nervistraat 168013 RS ZwolleThe Netherlands

    Tel.: +31 (0) 38 ! "0"8#a$.: +31 (0) 38 !" 8"

    %R&6 Ro'ot Sste% is a tradear* o,R- -n/ineerin/.,ll other tradear*s used in this douent'elon/ to their owners.

    This anual is roteted ' ori/ht. Noart o it a 'e oied2 rerodued or distri'uted without the rior written erissiono the editor4

    Changes in produ! speifia!ions and sopeof deliver" are reserved# $he on!en!s of

    !his %anual %a" hange a! an" !i%e &i!hou! prior no!ie#Ne& versions of !his %anual &ill 'e pu'-lished on our &e'si!e(h!!p())&&are**#o%) 

    ,lthou/h we areull ontrol ontents2 we do not assue an lia'ilit or the ontents oe$ternal we'sites reerred to in this anual. Solel the oerators o these a/es 'ear resonsi'ilit or the ontents.

    #imiaion" in &arran! an' #iabi$i!

    The warrant o ,R- -n/ineerin/ is liited e$lusivel to the e$han/e o devies withinle/al warrant eriods in ase o hardware deets2 suh as ehanial daa/e2 issin/ orwron/ asse'l o eletroni oonents2 e$ludin/ so*eted iruits. To the e$tent eritted ' alia'le law2 ,R- -n/ineerin/ assues no lia'ilit or an daa/e resultin/diretl or indiretl ro the use o the devie.

    5rreversi'le odiiations (e./. solderin/ additional oonents2 drillin/ holes2 et.) ordaa/in/ the devies ' ne/letin/ the instrutions in this anual will void warrant.

    No warranties an 'e /iven with reset to individual reuireents to the inluded sotware2 nor to the errorree and uninterruted oeration o the sotware.,dditionall2 the sotware a 'e odiied and loaded onto the sste ' the user. Thereore the user is resonsi'le or sotware ualit and the overall sste erorane o thero'ot.

    ,R- -n/ineerin/ /uarantees the untionalit o sulied e$ale sotware as lon/ asthe seiied oeratin/ onditions are reseted. 5 the devies are oerated 'eond theseonditions and the devie or the &7sotware is aluntionin/ or /ets deetive2 the ustoer will 'e har/ed or all servie osts2 reairs and orretions. &lease also a attention to the orresondin/ liense a/reeents on the 7R9M4

    S!mbo$"

    T(e )o$$owing S!mbo$" are *"e' in (i" man*a$+

    T(e ,Aenion S!mbo$ i" *"e' o mar/ imoran 'eai$".%eg$ecing (e"e in"r*cion" ma! 'amage or 'e"ro! (e ro-bo an'or a''iiona$ comonen" an' !o* ma! ri"/ !o*r ownor o(er" (ea$(

    T(e 3n)ormaion S!mbo$ i" *"e' o mar/ *"e)*$ i" an'ric/" or bac/gro*n' in)ormaion. 3n (i" ca"e (e in)ormaioni" o be con"i'ere' a" ,*"e)*$4 b* no nece""ar!.

    http://www.arexx.com/http://www.arexx.com/

  • 8/19/2019 Rp6 v2 Robotersystem

    4/138

    5onen"1. 5ntrodution ................................................................................. 6

    1.1. Tehnial suort  .................................................................... 1.". Soe o deliver ; R&6 ........................................................... 1.3. Soe o deliver R&6v" ........................................................ 81.. The R&6v" and -$ansion ossi'ilities ....................................... 81.!. #eatures and tehnial ata  .................................................... 111.6. atter @olta/e Sensor......................................................"0".3.". Ai/ht Sensors (ARs)........................................................."0".3.3. ,nti 7ollision Sste (,7S)................................................"1".3.. >uers..........................................................................""".3.!. Motor 7urrent Sensors.......................................................""".3.6. -noders........................................................................."3

    ".. rive Sste  ........................................................................ "".!. -$ansion Sste ................................................................. "!

    ".!.1. The 5B7 >us....................................................................."6".!.". -$ansion 7onnetors......................................................."

    3. Cardware and Sotware Setu ....................................................... "?3.1. Saet 5nstrutions ................................................................ "?

    3.1.1. -letrostati ishar/es and Shorts....................................."?3.1.". -nvironent o the Ro'ot..................................................30

    3.1.3. Sul @olta/e.................................................................303.". Sotware Setu ..................................................................... 31

    3.".1. The R&6 7R9M..............................................................313.".". 

  • 8/19/2019 Rp6 v2 Robotersystem

    5/138

    .1.". 7oni/ure Snta$ Ci/hli/htin/.............................................!6.1.3. 9enin/ and oilin/ sale roHets...............................!8

    .". &ro/ra uload to the R&6 ..................................................... 60.3. 

  • 8/19/2019 Rp6 v2 Robotersystem

    6/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    1. 3nro'*cionThe R&6 is a low ost autonoous o'ile ro'ot sste2 desi/ned or 'e/inners aswell as e$eriened eletronis and sotware develoers as an introdution to theasinatin/ world o ro'otis.

    The ro'ot is delivered oletel asse'led. Thus it is ver well suited or all userswho are une$eriened with solderin/ and tin*erin/ and want to onentrate on sotware develoent. Cowever2 ileentin/ our own iruits and addin/ additionalthin/s to the ro'ot is easil ossi'le2 too4 5n at2 the R&6 oers a lot o e$ansionossi'ilities and a 'e used as a lator or a variet o interestin/ eletroni e$erients4

    5t is the suessor o the ver oular %77ontrol Ro'' R&!%2 whih had 'een released in "003 ' 7onrad -letroni S-. The shortut JR&!K is to 'e interreted as%Ro'ot &roHet !%. The new ro'ot and the redeessor sste do not have too uhin oon e$et or the ehanis. The 77ontrol 1 Miroontroller o 7onrad -le

    troni has 'een relaed and thus the new ro'ot annot 'e ro/raed in >asi anore. 5nstead2 the ar ore owerul ,TM-D,3" ro ,tel2 whih is ro/raa'lein 7 is used. ,dditionall there is an e$ansion odule or adatin/ the newer 77ontrol &R9 odules (e./. 77&R9 M-D,1"8) to the ro'ot. This odule allows the sste to 'e ro/raed in the ore sile >asi lan/ua/e and rovides a /reat nu'er o additional interaes and lots o additional eor.

    The new desi/n inludes an FS> interae2 a new e$ansion sste with irovedasse'l otions2 hi/h resolution odoetr sensors (resolution is 1!0$ hi/her oared to the redeessor sste)2 a reise volta/e re/ulator (this was onl rovidedas an e$ansion odule or the old sste)2 a 'uer oosed o two iroswithes with lon/ levers and an other thin/s.

    >asiall the ehanial desi/n has 'een adoted ro the R&! sste. Cowever2 wedid otiiGe the desi/n or lower noise oeration and now it rovides soe additionaldrillin/ holes or ehanial e$ansions.

    The R&6 ro'ot has 'een desi/ned to 'e oati'le with our other ro'ots2 ,SFR9 and-T52 'oth usin/ the saller ,TM-D,8 and idential develoent tools (

  • 8/19/2019 Rp6 v2 Robotersystem

    7/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    1.1. Tec(nica$ "*or

    ou a ontat our suort tea via internet as ollows ($ea"e rea'(i" man*a$ com$ee$! be)ore conacing (e "*or  Readin/the anual areull will answer ost o our ossi'le uestions

    alread4 &lease also read aendi$ , ; Trou'leshootin/): throu/h our oru: http://www.arexx.com/forum/

    ' -Mail: [email protected]

    ou will ind our ostal address in the le/al notie at the 'e/innin/ othis anual.

    ,ll soft&are updates, ne& ersions of this #anualand urther inorations will 'e u'lished on ourhoea/e:

    http://www.arexx.com/an' on (e robo8" (omeage+

    http://www.arexx.com/rp6 

    1.2. Scoe o) 'e$iver! 9 RP6

    ou should ind the ollowin/ ites in our R&6 'o$ (RP6v2 ". nex age):

    ● 5om$ee$! a""emb$e' Robo

    ● R&6 FS> 5nterae

    ● FS> ,> a'le

    ● 10in lat a'le

    ● R&6 7R9M

    ● Oui*start anual

    ● RP6 Exerimen boar'

    ● s "! M3 distane 'olts

    ● s M3 srews

    ● s M3 nuts

    ● s 1in onnetors

    ● " s 1in lat a'le

    http://www.arexx.com/forum/mailto:[email protected]://www.arexx.com/http://www.arexx.com/rp6http://www.arexx.com/forum/mailto:[email protected]://www.arexx.com/http://www.arexx.com/rp6

  • 8/19/2019 Rp6 v2 Robotersystem

    8/138

  • 8/19/2019 Rp6 v2 Robotersystem

    9/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    The ain use has 'een han/ed ro ".!, to 3.1!,2 as there are now soe additional ower sul onnetors and the ower distri'ution has 'een iroved. This allowsusa/e o sli/htl hi/her ower e$ansions. The Motor rivers have 'een irovedwith new ore owerul and ore relia'le M9S#-Ts. These have even lower resistane than the ones used 'eore.

    ,ll these odiiations inrease the ost si/niiantl. 9ver the last ew ears therewere also lots o inreases in rodution ost2 thus we an not inlude a -$erient-$ansion >oard or ree an lon/er2 this has to 'e urhased seeratel. The rest othe Ro'ot has not han/ed uh2 in order to *ee the Sotware 100Q oati'le. 5ou need ore roessin/ ower or additional 5P9s2 ou an hoose roe three e$ansion 'oards: the R&6M3"2 the R&6771"8 and the newR&6v"M"!6 e$ternal SR,M. 5t oes with a uite oorta'le 5-and allows to use 7oat7 or >,S57 as ro/rain/ lan/ua/e.

    The ost owerul e$ansion odule is the new R&6v"M"!6

  • 8/19/2019 Rp6 v2 Robotersystem

    10/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    5t is ossi'le to o'ine the R&6v"M"!6us aster and the other twoare used as 5"7 >us slaves.

    #or the sa*e o oleteness it shall 'e entioned that the 77ontrol Fnit is urrentlnot a'le to 'e used as a 5"7 >us Slave. This eans the o'ination o several roessor odules reuires the 771"8 to 'e the 5"7 >usaster. 7o'inin/ the M"!6and 771"8 >oards is not reall suorted. 5t is theoretiall ossi'le i ou use thenoral serial ort (or one o the seondar orts) to oand the 771"8 Fnit rothe M"!6 and ut the 5"7 >us into slave ode on the M"!6 or not use the 5"7 >uson the 77ontrol Fnit at all and deativate that ort.

    #or ore inoration on the e$ansion odules2 he* the R&6

  • 8/19/2019 Rp6 v2 Robotersystem

    11/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    1.. @ea*re" an' ec(nica$

  • 8/19/2019 Rp6 v2 Robotersystem

    12/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    ● Power)*$ caeri$$ar 'rive *ni  in o'ination with a new /earin/ sste oriniisin/ noise +o%pared !o !he predeessor CCRP5###,

    ◊ Two owerul ."@ 7Motors

    ◊ Ma$iu seed a. "! Ps ; deendin/ on har/e state and ualit o 'atteries2

    total wei/ht and other onditions4

    ◊ Sellu'in/2 sintered 'earin/s at all our wheela$les

    ◊ Two ru''er tra*s

    ◊ 7aa'le o traversin/ sall o'stales (u to a. " hei/ht) li*e aret ed/es2thresholds or ras o u to 30Q steeness (with ounted 'uer swithes).Reovin/ the 'uers and restritin/ the nu'er o odules to a a$iu o "odules allows the ro'ot to drive over ras with u to 0Q steeness.

    ● Two ower)*$ OS@ET oor'river" (C>rid/es)

    ◊ Rotational veloit and diretion an 'e ontrolled ' the Miroontroller sste.

    ◊ Two c*rren "en"or" rovidin/ a easureent ran/e u to a. 1.8,  or eahotor. This allows to ui*l sense 'lo*ed or heavil loaded otors.

    ◊ M9S#-T rivers have 'een sli/htl iroved on R&6v" (lower loss2 ore ro'ust)

    ● Two (ig( re"o$*ion enco'er" or seed and otionontrol

    ◊ Resolution 62 5PR  (%7ounts &er Revolution%) whih ilies the sste ounts6"! se/ents o the odewheel er revolution o a wheel4 (1!0$ hi/her resolutionoared to the redeessor sste 77R&! with onl a. 7&R).

    ◊ -$at and ast seed easureent and ontrol4

    ◊ Ci/h resolution o a. 0."! er ounted se/ent4◊ RP6v2 )ea*re" Enco'er" wi( imrove' e$ecronic" an' new co'ew(ee$"

    ● Ani-co$$i"ion-"!"em A5SF whih an detet o'stales with an inte/rated 5Rreeiver and two 5R diodes ali/ned to let and ri/ht

    ◊ etets o'stales in the iddle2 let or ri/ht o the ro'otIs ront.

    ◊ Sensitivit and transitter ower are adHusta'le2 allowin/ relia'le detetion o'adl reletin/ o'Hets.

    ● 3n)rare' 5omm*nicaion-"!"em 3R5OF

    ◊ Reeives si/nals o standard universal inrared Reote 7ontrols o T@s or @ideoreoders. ou a ontrol our ro'ot with a standard (R7!) reote ontrol4 Therotool a 'e han/ed in sotware2 'ut we rovide onl an ileentation othe standard R7!rotooll ' deault.

    ◊ Ma 'e used or ouniation with several ro'ots (usin/ diret line o si/ht orreletions ro the eilin/ and walls) or or transittin/ teleetr data.

    ● Two $ig( "en"or" ; e./. or li/ht intensit easureent and li/ht soure tra*in/

    ● Two b*mer "en"or" or ollision detetion

    ● 6 Sa*" #E

  • 8/19/2019 Rp6 v2 Robotersystem

    13/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    ● Two )ree Ana$og o

  • 8/19/2019 Rp6 v2 Robotersystem

    14/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    1.6. &(a can (e RP6 'oG

    asiall the R&6 an :

    ● ... ruise around autonoousl (this eans indeendentl2 without reote ontrol)

    ● ... avoid o'stales

    ● ... ollow li/ht soures and easure li/ht intensit

    ● ... detet ollisions2 'lo*ed en/ines2 low 'atter level and reat roerl on that

    ● ... easure and ontrol the rotational seed o the otors ; virtuall indeendentlo the ower level o 'atteries2 wei/ht2 et. (this is erored with the hi/h resolution enoders)

    ● ... ove or a /iven distane2 rotate or seii an/les and easure the driven dis

    tane (see hater " or deviations)● ... ove /eoetri i/ures2 e./. irles2 ol/ons and others

    ● ... e$han/e data with other ro'ots or devies. 7oands a 'e reeived rostandard T@P@ideoPCi#i reote ontrols and ou will 'e a'le to ontrol our ro'ot Hust li*e a reote ontrolled ar.

    ● ... transer sensor data and other data to a &7 with the FS> 5nterae

    ● ... 'e e$anded easil ' usin/ the le$i'le 'ussste4

    ● ... odiied aordin/ to our ideas. Eust have a loo* at the sheatis on the 7and the &7>4 >ut lease restrit odiiations to those ou ull understand4 5t is

    usuall a 'etter idea to start o ' usin/ an e$ansion 'oard ; artiularl i ouare une$eriened in solderin/ iruits and eletronis in /eneral.

    1

  • 8/19/2019 Rp6 v2 Robotersystem

    15/138

    RP6 ROBOT SSTE - 1. 3nro'*cion

    1.7. A$icaion roo"a$" an' i'ea"

    The R&6 has 'een desi/ned with /ood e$ansion ossi'ilities. 5 ou eui our R&6with soe additional sensor iruits2 ou an JteahK our Ro'ot soe o the ollowin/thin/s (soe o the ollowin/ tas*s will turn out to 'e uite ole$ and the list is

    rou/hl sorted in order o ole$it):● -$and the ro'ot with additional ontrollers rovidin/ ore 7&F ower2 add addi

    tional eor or sil soe 5P9orts and ,7s as it will 'e disussed in the e$ale ro/ras with sile 5B7 ort e$anders and ,7s.

    ● 9utut sensor data and te$t on a A7isla

    ● Reat on noise and /enerate aousti si/nals

    ● Measurin/ the distane to o'stales with additional ultrasoni sensors2 inraredsensors or siilar in order to ahieve 'etter ollision avoidane

    ● Tra* 'la* lines on the loor

    ● Tra* and trae other ro'ots or o'Hets

    ● 7ontrol the ro'ot ro our &7 ' usin/ inrared si/nals (this needs e$tra hardware.Fnortunatel it does not wor* with standard 5R, interaes). ,lternativel oui/ht start strai/ht awa ' usin/ wireless R# odules.

    ● 7ontrol the R&6 ' usin/ a &, or Sarthone (in this ase we su//est to ountthese devies to the ro'ot instead o usin/ the as reote ontrol. >ut that is ossi'le2 too4)

    ● 7ollet o'Hets (e./. tea li/hts2 ar'les2 tin etal o'Hets )

    ● ,ttah a tin ro'ot ar to /ras o'Hets

    ● Navi/ate with the hel o an eletroni oass andPor inrared 'eaons (ade uo sall towers euied with a nu'er o 5RA-s and ositioned at a well *nownloation)2 in order to deterine the ro'otIs osition and head or a /iven loation.

    ● &rovidin/ a nu'er o ro'ots euied with a 'all *i* and handlin/ ehanis andsoe e$tra sensors ou i/ht 'e a'le to raise a tea o ro'ots lain/ soer4

    ● anthin/ else2 whih i/ht oe to our thou/hts4

    Cowever2 irst o all ou have to read this anual and 'eoe ailiar with ro'otisand ro/rain/. The revious list o ideas is Hust eant as a little otivation.

    ,nd i ro/rain/ does not sueed at irst /lane2 lease do not /ive u ieadiatel and throw everthin/ out o the window: all 'e/innin/s are diiult4

    1!

  • 8/19/2019 Rp6 v2 Robotersystem

    16/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    2. T(e RP6 in 'eai$This hater desri'es the ost iortant hardware oonents o the R&6 R9>9TSST-M. e/inners in ro'otis however should stud this hater to /ain insi/ht to the R&6 'asis.

    5 ou do not want to wait and rather li*e to test the ro'ot2 then lease roeed tohater 32 'ut return to this hater later on as it ertainl ontains a nu'er o useul e$lanations o the ro'otIs ro/rain/ details. ,nd ou do want to *now what isontrolled with the sotware and how this wor*s2 donIt ou=

  • 8/19/2019 Rp6 v2 Robotersystem

    17/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    tes) #lash

    R9M ; whih i/ht 'e oared to a noral Jhard dis* driveK or nowadas a lashdrive. This #lash R9M is used to store all ro/ra data. The Rando ,ess Meor(R,M) siGe is liited to "> ("08 >tes) and is alread ore than suiient or ourneeds. 5a/ine or oarison the ontroller o the old 77R&! Ro'ot with onl "0>tes R,M2 whih was alost oletel reserved or the >asi 5nterreter.

    >ut what on earth ena'les a iroontroller to wor* with this tin eor aait=

    ThatIs sile: The roessor neither handles hu/e aounts o data nor does it needto rovide an oeratin/ sste suh as Ainu$ or even

  • 8/19/2019 Rp6 v2 Robotersystem

    18/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    The ontroller is ouniatin/ to the world outside via 3" 5P9 &ins (%5nutP9utut&ins%)2 or/aniGed in %&orts%2 eah oosed o 8 5P9 &ins. This wa the M-D,3"rovides %&orts%: &9RT, to &9RT. The ontroller is a'le to read the lo/ial statuso these orts and roess the inoration in sotware. 9 ourse2 the roessor willeuall use the orts to outut lo/ial si/nals in order to ontrol sall loads u to "0

    , urrents (e./. A-s).

    ,dditionall the ontroller rovides a nu'er o inte/rated hardware odules or seial tas*s. 5leentin/ these tas*s in sotware would norall 'e either ver diiult or even iossi'le. 9ne o these seial tas*s is tiin/. Three Tiers or ountin/ lo* eriods are availa'le. The tier odules are oletel indeendent roro/ra low. 5n at2 the iroontroller a even roess other Ho's while waitin/or a ro/raed ounter level.

    R&6 is usin/ one o the tiers to /enerate &

  • 8/19/2019 Rp6 v2 Robotersystem

    19/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    2.1.1. Boo$oa'er

    There is a so alled >ootloader loated in a seial eor area o theiroontroller. This tin ro/ra is resonsi'le or loadin/ new user ro/ras intothe iroontrollerIs eor via the serial interae. The >ootloader ouniates

    with the the Ro'otAoader sotware (ori/inal nae was R&6Aoader) on the host &7.Ai*e this2 no additional ro/rain/ hardware is reuired. The FS> 5nterae an 'eused or ouniation with the ontroller throu/h te$t essa/es and additionall toro/ra the ontroller. Cowever there is one draw'a* in usin/ a >ootloader: it needs"> o the lash eor2 whih will leave 30> ree eor or our own ro/ras.This does not 'other us too uh as there is lent o roo even or ver ole$ro/ras (oared to the > ree eor o the tin ,SFR9 ro'ot)4

    2.2. Power S*$!

    9 ourse the ro'ot needs ener/. The R&6 is arrin/ this ener/ in or o 6 auulator 'atteries. 9eratin/ tie will heavil deend on 'atter aait and al

    thou/h the eletroni sstes will onsue relativel sall aounts o ener/ the'ul* load o ener/ will end u in the otors2 deendin/ on their load.

    5n order to rovide lon/ oeratin/ ties ou i/ht avour 'atteries with ale aaities o u to "!00,h. 7aaities o "000,h however will 'e usea'le as well. Ci/hualit 'atteries will rovide 'etween 3 to 6 oeratin/ hours2 deendin/ on otorload and 'atter ualit. ou will need 6 'atteries2 suin/ u to a volta/e o 6$1."@ ."@olts. The 'lo* sheati dia/ra la'els this 'atter volta/e %F>% ( %F>atter%2 F is the standard letter or volta/e in eletrial en/ineerin/ orulas). %F>%is deined as a noinal volta/e onl2 as the volta/e a var over tie. 7oletelhar/ed NiMC 'atteries an deliver u to 8.!@4 The volta/e dros while the >atter isdishar/ed and a han/e drastiall2 deendin/ on load and ualit as well. Theritial value or this is the internal resistane.

    9 ourse2 an alterin/ sul volta/e is not usea'le or sensor easureents. Moreiortant however is the liited oeratin/ volta/e ran/e o seiondutor oonents. The iroontroller or instane i/ht 'e destroed ' alin/ volta/es toohi/h over !@. Thereore we have to redue and sta'iliGe the volta/e level to a welldeined level.

    This is erored ' an inte/rated volta/e re/ulator aa'le osulin/ a urrent u to 1.!, (see i/ure). ,t 1.!, this deviewould dissiate a lot o heat and thereore it is attahed to alar/e oer lane on the &7>. -ven with this heat sin* we su/

    /est to liit urrents over 1, to a ew seonds onl. 9therwiseou will have to attah an additional heat sin*.

    7ontinuous urrent load should 'e liited to a'out 800,. Suha heav load would ui*l dishar/e 'atteries anwa.

    Fnder noral load onditions and without e$ansion odulesthe ro'ot will not draw ore than 0,2 unless the 5R79MM

    transitter is ative. This urrent level will not ause an ro'les or the re/ulatorand it an sul enou/h ower or lots o e$ansion 'oard. Fsuall the e$ansionswill need soethin/ in the ran/e o !0,2 i no otor loads2 ower A-s2 et. areused on the.

    1?

  • 8/19/2019 Rp6 v2 Robotersystem

    20/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    2.:. Sen"or"

    Most sensors have 'een entioned in reedin/ haters2 'ut now we will have aloser loo* at the.

    5n the overview dia/ra ou will ind sensors outside o the 'lueoloured area JSensorsK. ,tuall these sensors 'elon/ to other odules. Cowever2 the odoetrenoders2 the otor urrent sensors and the 'atter volta/e sensor are sensors andwill 'e disussed in this hater2 too4

    2.:.1. Baer! ?o$age Sen"or

    >asiall this sensor is a sile volta/e divider onsistin/ o two resistors in series. ou a sot two soalled ARs (%Ai/ht eendant Resistors%)2 whih are ali/ned tothe let and to the ri/ht resetivel. There is a 'la* artitionwall 'etween the two sensors in order to revent li/ht enterin/the Jwron/K side o the li/ht sensor sste. Eust li*e the @olta/esensor2 'oth li/ht sensors or a volta/e divider to/ether with a

    resistor2 'ut here to deterine the li/ht intensit. 5n this ase2 the !@ rail is divided aswell2 'ut now we have a varia'le resistor. The division relation will han/e aordin/to the surroundin/ li/ht intensit and rovide a li/ht deendant volta/e level to one othe ,7 hannels4

    The volta/e dierene 'etween 'oth sensors a 'e used to deterine at whih side

    o the ro'ot the 'ri/htest soure o li/ht is loated: let2 ri/ht or in the iddle. , suita'le ro/ra an trae a 'ri/ht torh in a darened  roo or /uide the ro'ot to the

    "0

  • 8/19/2019 Rp6 v2 Robotersystem

    21/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    'ri/htest sot in the roo4 #or e$ale i ou illuinate the loor with a ver 'ri/hthalo/entorh2 the ro'ot will ollow the 'ri/ht li/ht sot on the loor.

    9 ourse ou a tr the oosite: the ro'ot ould 'e ro/raed to hide ro'ri/ht li/ht soures.

    ou an reine this ' ountin/ one or two additional ARs at the 'a*side o the ro'ot. > usin/ onl the two sensors whih ro'ot has ' deault2 it an not distin/uish'etween 'ri/ht li/ht in the ront and in the 'a* too well. Two o the ,Ponverterhannels are still ree...

    2.:.:. Ani 5o$$i"ion S!"em A5SF

    #ro the sotwareIs oint o view2 the ost ole$ Sensor is the,7S ; the J,nti 7ollision SsteK4 The ,7S onsists o an inte/ratedinrared (5R)reeiver iruit (see i/.) and two 5R A-s2 loated at

    the let and ri/ht rontside o the sensor &7>. The Miroontroller isontrollin/ the 5RA-s diretl. The ontrollin/ untions an 'ehan/ed and iroved ' oursel i neessar4 The redeessorodel had a seial ontroller or this urose and the user ould notodi the sotware o this devie.

    The 5R A-s are transittin/ short inrared ulses odulated with36*CG2 whih an 'e deteted ' the 5Rreeiver.

  • 8/19/2019 Rp6 v2 Robotersystem

    22/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    2.:.;. B*mer"

    There is a sall &7> with two iro swithes with lon/ levers ounted in ront o theRo'ot. 5t rotets the 5R A-s on the sensor&7> ro 'ein/ daa/ed i the ro'ot aidentl hits an o'stale.

  • 8/19/2019 Rp6 v2 Robotersystem

    23/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    2.:.6. Enco'er"

    The enoders wor* oletel dierent oared to thereviousl disussed sensors. The onsist o reletive interruters and ode wheels whih are attahed to one o

    the /earwheels in eah /earin/ sste. This setu is usedto deterine the rotational veloit o the Motors. >oth enoder wheels have 36 se/ents (18 'la* and 18 whiteields2 see i/ure). oth risin/ and allin/ ed/es o the si/nal (han/es o !@ to 0@ and 0@ to !@)

    tri//er an interrut event and these event are ounted ' sotware. This wa the driven distane an 'e easured and to/ether with a tier the rotational veloit an 'ealulated.

    eterination o the seed is the ain aliation o the enoders. -noder eed'a*is the onl relia'le wa to ontrol the otor seed. 5n an unontrolled sste2 theotor seed would 'e deendin/ on 'atter volta/e2 load and otor araeters. Thehi/h resolution enoders even allow us to relia'l ontrol rather slow seeds.

    -ah o 'oth luster /ears in the iddle o the /earin/ sste rovide !0 teeth at the outer and 1"teeth at the saller inner /earwheel (see i/ure).The ode wheels are loated at the /earwheel ne$tto the otor inion /ear2 thus we an alulate:

    This is where the 36 Se/ents oe ro2 'eausethis results in an inte/er nu'er without rationalart or a olete wheel revolution. The enoders/enerate 6"! e/des er revolution and whereas eah reresents one se/ent.

    , wheel diaeter o around !0 inludin/ the ru''er tra* theoretiall results in awheel iruerene o aro$iatel 1! and thus 0."!1" or eah ountin/unit o the enoders. Cowever the tra*s a /et deored under ressure or the

    a /et ushed into le$i'le suraes. Thereore we an diretl assue a a$iuo 0."! or eah ountin/ unit. 9ten we will have to al even less: 0." or0."3. 7ali'ration values a 'e deterined ' drivin/ well deined test distanesas desri'ed in the ,endi$. This is not aurate 'eause o slier and siilar eets. Movin/ strai/ht orward will ause inor enoder aura errors2 'ut rotatin/the ro'ot will result in inreased deviations. -seiall rotatin/ the ro'ot on the ointwill ause deviations.

    eviations an onl 'e deterined and orreted ' testin/2 trial and error. This is adraw'a* or all aterillar drive sstes ; in our ro'ot and in ore e$ensive aswell. 7oared to ro'ots with a standard dierential drive unit with two wheels and

    an additional suort wheel the aterillar sstes allows a ar 'etter 'ehaviour in allterrain surroundin/s. The aterillar drive sste will easil overoe sall

    "3

    50

    12⋅50

    12=17

    13

    36;   17

    13

    36 36=625

  • 8/19/2019 Rp6 v2 Robotersystem

    24/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    o'stales2 ras and uneven loors. 9n suh suraes2 the enoders are e$treelhelul2 as the allow otial seed re/ulation under all load onditions2 oletelindeendent o surae ondition2 otor load and >atter volta/e.

    ,t a rate o !0 se/ents er seond we have a seed o 1."! Ps assuin/ a value

    o 0."! er se/ent. This seed is the inial seed2 whih an 'e ontrolledrelia'l (at least with the standard sotware ileentation). The e$at value avar or individual ro'ots. , rate o 1"00 se/entsPseond orresonds to the a$iu ossi'le 30 Ps (at 0."! resolution2 whereas 0."3 orresonds to ".6 Ps).Ma$iu seed deends on 'atter har/in/ status and 30Ps will are not ossi'leor too lon/ with usual >atteries. >eause o this2 the untion li'rar ores a liit o1000 se/entsPseond to 'e a'le to aintain a onstant a$iu seed or lon/er'atter dishar/e eriods. ,dditionall2 the lie tie o /ears and otors will 'e rolon/ed when usin/ lower seeds ost o the tie4

  • 8/19/2019 Rp6 v2 Robotersystem

    25/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    Now we have ound a wa to reverse the otorIs rotational diretion. ,nd how are we/oin/ to aelerate or slow down the otor= , 7Motor will rotate aster the hi/herthe volta/e /ets and we a ontrol the otor seed ' inreasin/ or dereasin/ thevolta/e. AetIs have a loser loo* at the C'rid/e a/ain.

    The i/ure shows what we an do.

  • 8/19/2019 Rp6 v2 Robotersystem

    26/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    the o'stales4

    ,art ro sensor iruits2 additional ontrollers ould 'e useul to eror additionaltas*s2 e./. the R&6 79NTR9A M3" rovidin/ an e$tra M-D,3" iroontroller.

    9 ourse the e$ansion sste has to 'e aa'le o onnetin/ several e$ansion

    odules (see i/ure)2 while usin/ a iniu nu'er o si/nal lines and rovidin/suiient ouniation seed.

    2..1. T(e 3D5 B*"

    The 5B7 >us will satis these reuireents. The nae stands or 3ner 3negrae'5irc*i >us and is ronouned .-s/uared-C# Soeties we a write J5"7K instead o J5B7K2 'eause in lain 7 lan/ua/e the JBK s'ol is not allowed or varia'le naesand other thin/s. The 'us reuires onl two si/nal lines and a onnet 1" artiiants ouniatin/ at a rate o 00*>itPs.

    The e$treel oular 5B7 >us2 desi/ned ' &hilis Seiondutors durin/ the

    ei/hties and nineties2 is used in a /reat nu'er o eletroni euient2 e./. video reorders2 televisions2 'ut also in industrial sstes. Most o the odern &7s and note'oo*s use a variant o this 'us alled SM>us to ontrol air low and teerature o theinternal devies. , /reat nu'er o ro'ots also uses the 5B7 >us sste and or thisreason a nu'er o sensor odules li*e ultrasoni sensors2 eletroni oasses2teerature sensors and siilar devies are availa'le on the ar*et.

    The 5B7 >us is a asterPslaveoriented 'us. 9ne or ore aster devies are ontrollin/ ouniation with u to 1" slave devies. >ut even thou/h the 'us is a'leto handle ultiaster ouniation2 we will onl desri'e a 'us ouniationwith a sin/le aster devie. Multiaster toolo/ would onl oliate thin/s.

    The two reuired si/nal lines are naed S, and S7A. S, is to 'e read %Serial ata%and S7A is naed %Serial 7lo*% ; whih alread e$lains we are usin/ a data and alo* si/nal line. S, is used as a 'idiretional si/nal and thereore 'oth aster andslave devies are allowed to outut data. S7A is oletel ontrolled ' the asterdevie.

    ata 'its are alwas transerred snhronous to the lo* si/nal as delivered ' theaster. The S, level is onl allowed to han/e as lon/ as S7A is low (e$et orStart and Stoonditions2 see 'elow). Transer rates are allowed to han/e 'etween0 and 00*>itPs even while data is 'ein/ transitted.

    The reedin/ i/ures show usual transission rotools. The irst one shows a transission ro a aster to a slave devie2 in whih white 'o$es reer to data transissions ro aster to slave and the dar* 'o$es reresent the resonses ro the slavedevie.

    -ah transission has to start with an initial start ondition and ust 'e ended ' asto ondition. The start ondition is raised whenever at a hi/h S7Alevel the data lineS, is ulled ro hi/h to low level. , reversed level attern alies to the stoon

    dition: whenever at a hi/h S7Alevel the data line S, is ulled ro low to hi/h levelwe eet a stoondition.

    "6

  • 8/19/2019 Rp6 v2 Robotersystem

    27/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    5ediatel ater the startondition we have to send the >it lon/ slaveaddress orthe devie to 'e addressed2 ollowed ' a 'it deinin/ whether we want to write orread data. The slave will resond ' sendin/ an ,7 (%,*nowled/e%). ,n nu'er odata 'tes a ollow and eah individual reeived 'te will have to 'e a*nowled/ed' the slave (usin/ the ,7si/nal). 7ouniation will 'e terinated with a

    stoondition.

    This desrition is onl a ver short e$lanation o the 5B7 >us. 5nterested readersa ind ore inoration in the 5B7 >us seiiation sheets ' &hilis. ,nd also theses or the M-D,3" do ontain ore inoration to this toi.

    The e$ale ro/ras deonstrate how to use the 'us hardware. The R&6 li'raralread rovides untions or ontrollin/ the 5B7 >us. ou will not have to /o into details o the rotool2 'ut it is useul to understand how 'us the ouniation is 'asiall wor*in/.

    2..2. Exan"ion 5onnecor"

    The ain'oard rovides our e$ansion onnetors.Two o these devies are la'elled J>FS1K and J>FS"K resetivel. J>FSK is a shortut or Jeansion >FSK. J>FS1K and J>FS"K are interonnetedoletel and have 'een arran/ed setriall onthe ain 'oard. #or this reason ou will 'e allowed toount e$ansion odules 'oth at ront and rear o the

    ro'ot. -ah e$ansion odule rovides two >FS onnetors at one side o the od

    ule. , 1in lat a'le is used or interonnetin/ the odules to eah other and tothe ain'oard. #or interonnetions eah e$ansion odule rovides !&o idential interonneted lu/s. The outer lu/ has to 'e used or downward interonnetions2whereas the inner lu/ has to 'e used or uward interonnetions. This wa ou are(theoretiall) allowed to sta* an nu'er o odules (see i/ure2 showin/ threeR&6 'read'oard e$ansion odules2 whih a 'e used or our individual iruits).

    The >FS lu/s rovide ower sul2 the reviousl desri'ed 5B7>us2 a asterrest and interrut si/nals.

    The ower sul rovides two volta/es at the onnetors: irst o all the sta'iliGed !@ro the volta/e re/ulator2 'ut the 'atter volta/e as well. The 'atter volta/e willvar with tie and load ; usuall 'etween !.! (dishar/ed 'atteries) u to aro$iatel 8.!@ (newl har/ed 'atteries ; varin/ ro anuaturer to anuaturer).@olta/es a however e$eed these liits deendin/ on load2 te and har/in/status o 'atteries.

    The aster reset si/nal is iortant or resettin/ all iroontroller devies whenressin/ the StartPSto'utton or or ro/rain/. The 'oot loader ro/ras in theiroontrollers will start their user ro/ra at a low ulse (hi/hlowhi/h) on S,.This wa all ro/ras on the (,@R) ontrollers will siultaneousl start ater ressin/and releasin/ the StartPSto'utton or ' startin/ the ro/ra ' 'oot loader sot

    ware... (the 'oot loader does not onl /enerate a low iulse to start2 'ut also aolete 5B7 Deneral 7all with 0 as data 'te.)

    "

  • 8/19/2019 Rp6 v2 Robotersystem

    28/138

    RP6 ROBOT SSTE - 2. T(e RP6 in 'eai$

    , ew odules an use the interrut lines or si/nallin/ the aster iroontrollereither the arrival o new data2 or whether a Ho' has 'een oleted and new oands are 'ein/ e$eted. Not rovidin/ these lines would ore the aster devie toreeatin/l uer soe seii e$ansion odules or new data. 9 ourse this ethod would 'e ossi'le2 'ut the alternative desi/n with additional interrut lines will

    usuall redue 'us trai and 7&F load. ,s the nu'er o interrut lines is restritedto 3 si/nals and one ree line reserved or user si/nals2 ou a have to assi/n oneline to several odules (e./. all ultrasound sensors) and oll all odules su'seuentlwhen an interrut is si/nalled.

    The other two e$ansion onnetors la'elled JFSR>FS1K and JFSR>FS"K on the ain'oard are not interonneted. ,ll lines are routed to solderin/ ads on all e$ansionodules and ou a al our own si/nals to these ads.

     JFSR>FSK is an a''reviation o JFser>usK. ou a use this 1in e$ansion onnetor or anthin/ ou want our own 'us sste2 additional ower sul lines('ut 'e areul2 the traes are rather thin and or low urrents o a$. !00, onl) or

    anthin/ else. -$ale /iven: ou are a'le to interonnet two e$ansion oduleswithout rovidin/ onnetions to other odules. This i/ht 'e useul or ore ole$ iruits or sensors2 whih annot 'e laed on a sin/le e$ansion odule. Thisethod will tid u our wirin/.

    9 ourse ou an not add an nu'er o e$ansion odules ; 6 sta*ed odules atthe ront or 'a*side will deinitel overload our vehile. Too an odules will alsoause ro'les ' overloadin/ the 'atter sul. ,s a /eneral rule ou a ount aa$ial nu'er o 8 odules to the R&6: at the ront side and at the 'a*side.

    The i/ure shows the onnetion dia/ra or 'oth e$ansion onnetors. 9n the ain'oard2 in 1 is alwas loatednear the white la'el >FS1 and >FS"2 resetivel. ,lternativel2 the in is la'elled with J1K at the onnetorosition.

    +F> is the 'attervolta/e2 @ is the +!@ rail2 DN la'els JMinusK or JDroundK (DN Dround)2 MR-S-T la'elsthe Master Reset Si/nal2 5NT$ are the 5nterrutlines2 S7Ais the lo* and S, the dataline o the 5B7 >us.

    ,nthin/ else ou need has to 'e soldered to the FSR>FS

    onnetor ins.

     I#portant note5 

  • 8/19/2019 Rp6 v2 Robotersystem

    29/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :. >ar'ware an' So)ware Se*>eore ou start with settin/ u the R&6 or aessories2 ou have toread the ollowin/ saet instrutions areull. -seiall i hildrenare handlin/ the R&6 later on4

    P$ea"e rea' (i" c(aer exra care)*$$!

    :.1. Sa)e! 3n"r*cion"

    ue to the oen rae arhiteture o the R&62 there are several shar ed/es. Thusthe Ro'ot a not 'e used as a to or hildren a/ed less than 8 ears4 &lease suervise hildren that are in the roo while oeratin/ the R&6 and inor our hildrena'out the desri'ed dan/ers4

    o not oerate the ro'ot in loations with reel ovin/ anials2 or e$ale hasters2 as the a /et hurt. The other wa round2 'i//er anials li*e do/s and atsi/ht daa/e the ro'ot...

    The aterillar drive sste has soe dan/erous setors  beween rac/" an'w(ee$"4 w(ere (e caeri$$ar ma! 'raw in !o* )inger". These setors arelar/el overed ' the wheel wells o the R&6 and thereore ostl seure. Still2 ta*eare not to /et our in/ers 'etween wheels and tra*s4 The otors are uite owerul and a easil hurt ou4 ,lso *ee our in/ers out o the area 'etween &7> andtra*s4

    ATTE%T3O%+ -ven i ou are usin/ the standard sotware2 the otors a autoatiall inrease their ower level4 eendin/ on the ro/rain/ stle2 otors astart oeration at an tie and unoreseen reations and oveents a our4Neer operate the ro%ot &ithout superision! 

    :.1.1. E$ecro"aic

  • 8/19/2019 Rp6 v2 Robotersystem

    30/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    ,ll eletri lines ro and to the sste ust 'e onneted 'eore onnetin/ and alin/ the sul volta/e.Fne$eted onnetin/ or disonnetin/ lu/s2 a'les or odules in an oeratin/ ro'ot a daa/e or destro arts o the sste and additional oonents.

    :.1.2. Environmen o) (e Robo

    o not oerate the ro'ot on ta'le tos or in areas with hi/h reiies2 where it aall down to the /round. &lease onsider the li'in/ aa'ilit o aterillar vehiles4The ro'ot a easil drive over sall o'stales and ush li/ht arts awa4 &lease reove all o'Hets ontainin/ liuids ro the ro'otIs oeratin/ area2 e./. us2 'ottlesand vases.

    The ro'otIs hassis will rotet the ehanial arts a/ainst a nu'er o environental inluenes2 'ut it is neither water nor dustroo. The eletronis are ratherunroteted as well. ou should oerate the ro'ot in lean and dr inhouse areasonl. irt2 loose artiles and huidit a daa/e or destro ehanial and eletroni oonents. 9eratin/ teeratures are to 'e restrited 'etween 0V7 and0V7.

    -seiall inside oeratin/ 7Motors2 tin sar*s are /enerated.

  • 8/19/2019 Rp6 v2 Robotersystem

    31/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.2. So)ware Se*

    Sof!&are se!up o%es ne*!# Corre!l" ins!alled sof!&are is re/uiredfor all follo&ing hap!ers#

    ou &ill need ad%inis!ra!or righ!s !o ins!all so please login as an ad-%inis!ra!or !o "our s"s!e%#

    e sugges! !ha! "ou firs! read !he &hole hap!er and !hen su'-se/uen!l" follo& !he ins!ru!ions s!ep '" s!ep3

    &e nee' o a""*me4 (a !o* (ave ba"ic /now$e'ge in wor/ing wi( com-*er" *"ing (e oeraing "!"em" &in'ow" or #in*x and standard sotwarea*a/es suh as a ile ana/er2 we' 'rowser2 una*er  (

  • 8/19/2019 Rp6 v2 Robotersystem

    32/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.2.2. &inA?R - )or &in'ow"

    #irst o all we will install

  • 8/19/2019 Rp6 v2 Robotersystem

    33/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    #irst o all ou will have to deinstall an reedin/ ; and as alread stated ro'a'lo'solete versions o the avr/2 avr'inutils and avrli'. To start deinstall ou ause our distri'utions a*a/e ana/er tool2 searh or JavrK and then deinstall thea*a/es ro our sste2 i the tool inds orresondin/ o'Hets startin/ with JavrK.

    ou a easil he* whether avr/ has 'een installed or not. 5 it e$ists ou aas* or the loation o the ro/ra ' e$eutin/ the ollowin/ on a oandline:

    which avr-gcc

    5 the sste resonds with a athnae2 then ost li*el an avr/ version alreade$ists on our sste. 5n this ase ou an he* its version:

    avr-gcc --ver$ion

    5 the version nu'er is under 3..62 ou deinitel have to deinstall it. 5 the versionnu'er is newer than 3..6 ou a test it ' oilin/ ro/ras (see ne$thater). 5 oilin/ ails ou an roeed ' deinstallin/ old versions and installin/

    the avr/ version ro the 7. The ollowin/ hater will reer to version .1.1 (released Marh "00) inludin/ soe iortant athes that are usuall also inluded in

  • 8/19/2019 Rp6 v2 Robotersystem

    34/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    ,ll relevant installation iles or avr/2 avrli' and 'inutils an 'e ound in the ollowin/ diretor:

    eore roeedin/ ater an error essa/e2 we advise ou to delete the reviousl/enerated iles in the standard installation diretor JPusrPloalPavrK.

  • 8/19/2019 Rp6 v2 Robotersystem

    35/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.2.:.2. an*a$ in"a$$ roce'*re

    5 ou reer anual install or the autoated install srit ails2 ou a roeed withthe ollowin/ stes.

    The desrition has 'een derived ro the ollowin/ artile:

    http://www.nongnu.org/avr-li0c/u$er-manual/in$talltool$.html

    5t an also 'e ound as a &# douent in the ,@R Ai' ouentation on the 7:

  • 8/19/2019 Rp6 v2 Robotersystem

    36/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    eendin/ on our &7Is erorane this will ta*e a ew inutes ; this is also true orthe ne$t two stes ; eseiall or the D774

    55 )or A?R 

    Fsin/ siilar roedure as or >inutils2 the D77 has to 'e athed2 oiled and in

    stalled: cd +/R, 0un?ip -c gcc-E.6.6.tar.0? A tar xf - cd gcc-E.6.6 patch -pB < ../gcc-patch-B0-con$tant$.diff patch -pB < ../gcc-patch-attri0utealia$.diff patch -pB < ../gcc-patch-0ug7.diff patch -pB < ../gcc-patch-dwarf.diff patch -pB < ../gcc-patch-li0i0ert5-Makefile.in.diff patch -pB < ../gcc-patch-newdevice$.diff patch -pB < ../gcc-patch-??-atmegax.diff mkdir o0-avr

    cd o0-avr ../configure --prefix8,R9#; --targetavr --ena0le-language$cFcGG !  --di$a0le-nl$ --di$a0le-li0$$p Hwith-dwarf make make in$tall

    > usin/ a JXK ou a ress -nter and ontinue tin/ on the oandline ; this allows ou to slit a line u and write an e$treel lon/ oand line in several linesor 'etter overview. 9 ourse ou a also oit this harater and write the oand as a sin/le ver lon/ line.

    A?R #ibc

    #inall the ,@R li':

    cd +/R, 0un?ip -c avr-li0c-6.E..tar.0? A tar xf - cd avr-li0c-6.E. ./configure --prefix8,R9#; --0uildI./config.gue$$I --ho$tavr make make in$tall

    ,ttention: ,t ;'uildJ.Poni/./uessJ ou ust a attention to the J,ent /raveK(Y W the tin stro*e on to o the letter a4 o not use a noral aostrohe2 as thiswill not wor*.

    :.2.:.:. Seing (e a(

    Now ou have to a*e sure that the diretor /u$r/local/avr/0in is in our &ath varia'le4 9therwise ou will not 'e a'le to start the avr/ ro the terinal and roa*eiles. ou have to add the avr/ ath to the ile /etc/profile or /etc/envir-

    onment or siilar iles (this varies ro distri'ution to distri'ution). ou have to add

    the new ath to the e$istin/ strin/2 searated ' a J:K harater. The line in the ilea %ore or less loo* li*e this:

    ,&=>J/u$r/local/0in:/u$r/0in:/0in:/u$r/;66R/0in:/usr/local/avr/binJ

    3ow 5ou can check if the in$tallation work$ 05 entering Kavr-gcc -Hver$ionL in aterminal a$ di$cu$$ed in previou$ $ection$. f thi$ give$ proper re$pon$eF in-$tallation wa$ $ucce$$ful

    36

  • 8/19/2019 Rp6 v2 Robotersystem

    37/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.2.;. Kava 6

    The Ro'otAoader (see 'elow or ore inoration a'out it) has 'een desi/ned or theEava environent and a 'e used in

  • 8/19/2019 Rp6 v2 Robotersystem

    38/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.2.. Robo#oa'er

  • 8/19/2019 Rp6 v2 Robotersystem

    39/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.:. 5onnecing (e =SB 3ner)ace 9 &in'ow"

    inu* users an sip !his se!ion3

    There are several was to install the FS> 5nterae rivers. The silest wa is in-"a$$ing (e 'river" BE@ORE connecing (e 'evice  or the irst tie. The 7rovides dierent install ro/ras or the driver.

    #or :2 an' 6; Bi &in'ow" XP4 Server 200:4 ?i"a an' &in 7:

    Serial 7onverterK under FS> evies andone JFS> SerialortK in J&orts (79M A&T)K).

    ,ter the installation ou a onnet the FS> 5nterae to our &72 B7$ PEASE ;<N2solderin/ ads or ontatin/ eleents o the overed lu/ to avoid stati dishar/es4

    This is a /eneral handlin/ rule or all eletronis euient without overin/.The reviousl installed driver will 'e autoatiall assi/ned to the devie and no urther ation is reuired. 9n

  • 8/19/2019 Rp6 v2 Robotersystem

    40/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.:.2. !his is ?us! for "our infor%a!ion,: 5 ou have 'een usin/ the 7Minstallationsotware ou a uninstall tools ' seletin/ Start Settin/s 7ontrol &anel 

    Sotware. The list should ontain an entr J#T5 FS> Serial 7onverter riversK. Eustselet it and li* on reovePuninstall4

    5 ou installed the driver anuall2 ou a e$eute the ro/ra %#TFN5N.e$e% inthe diretor o the FS>driver on the 74 ,ttention: ,n FS>RS"3" ,dater usin/the #T5 hisets i/ht 'e usin/ this driver as well4

    :.;. 5onnecing (e =SB 3ner)ace 9 #in*x

    indo&s users an sip !his se!ion3

    The Ainu$ ernel ".."0 or hi/her alread inludes the reuired driver or our FS> 5nterae #T"3"R. The devie will 'e reo/niGed autoatiall and ou will not have to

    do anthin/ else. Eust in ase ou run into trou'le2 ou a o'tain a Ainu$ driver diretl ro #T5: http://www.ftdichip.com/

    Cavin/ onneted the devie to a Ainu$ ahine2 ou an he* i the FS>Serial &orthas 'een reo/niGed roerl ' enterin/ the oand:

    cat /proc/tt5/driver/u$0$erial

    Eust or our inoratin: the 02 PdevPttFS>1 or siilar. ,dditionallstandard oort la'els (JdevPttS0K2 et.) will 'e dislaed as well. 5n this ase ouwill have tr out whih is the orret ort4Fnortunatel2 Ainu$ does not rovide an easil installa'le driver or 'oth untionsand or this reason we reer the usa/e o a @irtual 7oort driver here2 whih isalread inluded in the standard Ainu$ *ernels.

    :.. @ina$iMing So)ware in"a$$aion

    That was all ou have to do or sotware and FS> 5nterae setu4

    #inall ou a o the ost iortant iles ro the 7 to our harddis* (eseiall the olete diretor JouentationK and J-$alesK2 i not doned et). Ai*e

    this2 ou donIt need to searh or the 7 all the tie ou need a seii ile4 The diretories on the 7 are naed ater the ontained Sotware a*a/es2 so ou an indeverthin/ easil.

    5 ou should ever loose the 72 ou an download all relevant Sotware ro ourCoea/e. There ou will also ind the ost u to date version whih a inlude iortant 'u/ i$es or new eatures.

    P$ea"e c(ec/ i) (ere i" newer So)ware avai$ab$e on (e RP6 &eb"ie+

    (+www.arexx.comr6

    3 co*$' conain b*g)ixe" or new )ea*re".

    0

    http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=controlhttp://www.ftdichip.com/http://www.arexx.com/rp6http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=controlhttp://www.ftdichip.com/http://www.arexx.com/rp6

  • 8/19/2019 Rp6 v2 Robotersystem

    41/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    :.6. 3n"ering Baerie"

    5tIs a'out tie to /et to the Ro'ot itsel. #irst o all the ro'ot needs 6 'atteries4

    (see i/.)4 >e areul to touh the ain 'oard atthe ed/es and at lar/er lasti

    arts onl in order to avoid statidishar/es4

    The ain 'oard is wired to theen/ines2 the enoders and the'atter holder ' a 'undle osoldered a'les. &lease ovethese a'les ; deendin/ ontheir osition ; areull out othe wa.

    1

  • 8/19/2019 Rp6 v2 Robotersystem

    42/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    &lease ta*e out the 'la* 'atter holder aterwards(see i/ure).

    a/e "*re (a (e mainower "wic( i" in (e o"iion

    ,O@@ T(e "wic( $ever m*"oin o (e 'irecion o) (eex ,O@@ an' (e $arge c!$-in'rica$ caacior on (e mainboar' "ee )ig*reF

    >eore reativatin/ the ro'ot2lease he* orret orientation othe 'atteries.

    ou a now insert 6 NiMC >atteries with5ORRE5T OR3E%TAT3O% PO#AR3T

    5A=T3O%+ T(e @*"e wi$$ b$ow i) !o* in-"er (e Baerie" wi( wrong oriena-ion

    3n wor" ca"e4 (i" ma! even 'amagear" o) (e e$ecronic"

    Thus ou should 'etter diretl insert the

    >atteries in the orret wa to avoid anro'les4 There are also ar*in/s in the>atter holder ( (+) and ()2 the ne/ativeterinal (the lat side) ust oint to thesrin/s in the holder) to hel ou.

    1hec' eerything three ti#es 3 9ust to%e sure! 

    Now ou an ut the 'atterholder 'a*into the hassis. Ta*e are o the a'les4,void a'les han/in/ around near the

    /ears4Cavin/ oened the ro'ot anwa2 ou anow do a ui* he* o 'oth /earin/ sstes and the enoder wheels or transortdaa/es or e./. loosened 'olts2 srews andother oonents. &lease ver! care)*$$!an' "$ow$!  turn the 'a*side wheels forone reolution4

    Turnin/ hal a revolution orward and 'a*ward would 'e enou/h alread. ou should'e a'le to sense a rear*a'le resistane2 'ut the wheel ust 'e rotatin/ reel. The

    /earwheels have to 'e ovin/ reel4 &lease also have a loo* at aendi$ ,4

    "

  • 8/19/2019 Rp6 v2 Robotersystem

    43/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    The ain'oard a now 'e ut 'a* onto the hassis. Move an a'les 'etweenain'oard and lasti division 'ars or other hassis arts awa ' usin/ our in/eror a lon/ srewdriver2 in order to $ocae (e mainboar' )$a an' even on (ec(a""i" >eore i$in/ it a/ain2 lease he* or an a'lin/ ollisions 'etween ain'oard2 hassis and /earwheels4 Now ou a i$ the ain 'oard ' ti/htenin/ the

    our srews ; and weIre done4

    :.7. 5(arging (e Baerie"

    5 ou did not install har/ed 'atteries alread as we reoended it2 ou will nowhave to attah an e$ternal har/er. &lease turn the ain ower swith into osition J9##K or har/in/4 >atter har/in/ onl wor*s i the Ro'ot is turned o. The ainswith onnets the 'atteries either to the R&6Is eletronis or to the har/er onnetor.

    7he* the olarit o the har/er oared to the har/in/ sul lu/ (la'elled J7har/erK) loated ne$t to the ro'otIs ain ower swith4

    ou an see a olarit ar*in/ on the ain'oard in ront othe lu/ (see i/ure). T(e negaive ermina$ i" $ocae'on (e O=TER ETA# P#ATE an' (e o"iive ermina$on (e 3%%ER in

    7har/in/ tie deends on the used har/er and the 'atteries (Miroroessor ontrolled devies2 e./. @oltrat 1, P", elta &ea* #ast har/ers or ,nsann ,7S110 P 10 willneed 'etween 3 and hours2 standard har/ers e./. ,78

    reuire a'out 1 hours o har/in/ tie) ; lease read the details in the anual othe har/in/ devie4

  • 8/19/2019 Rp6 v2 Robotersystem

    44/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    user ro/ra to e$eute anwa. Stand' ode a 'e terinated via the FS> 5nterae2 ' ressin/ the StartPSto >utton or ' shortl swithin/ the ro'ot o andon. -ven in stand' ode the ro'ot uses a sall aount o ener/ (u to !,) ; andlease ree'er to turn o the R&6 oletel i ou do not want to use the ssteor a lon/er tie4 us or the StartPSto >utton.

    :.C.1. 5onnecing (e =SB 3ner)ace an' "ar Robo#oa'er

    Ne$t we will test a ro/ra uload with the FS> interae. &lease onnet the FS> interae to the &7 a$wa!" "ar b! connecing i o (e P5F. Then onnet theFS> interae to the J&R9DPF,RTK onnetor o the Ro'ot loated diretl 'eside theStartPSto >utton4

    The onnetor has ehanial olarit rotetion and ou annot insert the 10in

    lu/ with reverse olarit unless ou ush it reall hard.Now start the Ro'otAoader.

    eendin/ on seleted lan/ua/es the enus a 'ela'elled dierent.

    The sreenshots show the -n/lish versions and oua alter the lan/ua/e i ou want ' seletin/ theenu J9tions&reerenesK2 ollowed ' JAan/ua/eK(onl -n/lish or Deran ri/ht now) and ressin/ 9.Cavin/ altered the lan/ua/e ou have to restart theRo'otAoader4

    Oen a or - &in'ow"

    ou a now selet the FS> &ort. ,s lon/ as our&7 does not rovide another FS> Serial ,daterwith #T5 7ontroller2 the ort list will show onlone sin/le entr2 whih ou an selet. 5 thereare several orts2 ou an identi the orret one' loo*in/ or JR&6 FS> 5nteraeK (or J#T"3"R

    FS> F,RTK)2 ollowed ' a rero/raed serial nu'er.

    5 no ort is shown2 lease reresh the list ' seletin/ the enu ite JRo'otAoaderReresh &ort listK4

    Oen a or 9 #in*x

    Ainu$ handles the FS>Serial ,dater Hust li*e another standard oort. 5nstallin/ the "drivers on a Ainu$sste is not that eas andodern Ainu$ *ernels alread rovide the standard @irtual 7oort (@7&) drivers. 5n /eneral2 usa/e is siilar to

  • 8/19/2019 Rp6 v2 Robotersystem

    45/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    Ro'otAoader 'eore ou an oen it a/ain).

    The @irtual 7oorts will 'e la'elled JPdevPttFS>$K2 in whih $ reresents a nu'er2e./. JPdevPttFS>0K or JPdevPttFS>1K. ,lso the standard oorts la'elled JPdevPttS0K2 JPdevPttS1K will 'e shown as well.

    The Ro'otAoader ree'ers the reviousl seleted ort and will autoatiall reselet this ort at ro/ra start (ost o the resets and seletions areree'ered).

    Now li* on the J7onnetK'utton4 The Ro'otAoader will tr to oen the ort andhe* ouniation with the ro'otIs >ootloader. 5 everthin/ wor*s 92 the 'la* JStatusK ield will show J7onneted to: R&6 Ro'ot >ase ...K2 aoanied the easured 'atter volta/e. 5 this ails2 lease wait a seond2and retr it4 5 the retr ails2 aore serious error ourred4 5n this ase iediatel swith o the ro'ot and roeed ' readin/ the hater JTrou'leshootin/K in the aendi$4

    ,t low 'atter volta/e the ro/ra will show a warnin/ essa/e.

  • 8/19/2019 Rp6 v2 Robotersystem

    46/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    The seleted ile will now aear in the list. This wa ou a selet other Ce$ilesro our own ro/ras or ro the other e$ales and add the to the list(s. Sreenshot2 in whih we alread added a ew he$ iles). The Ro'otAoader is a'le toana/e several he$iles in order to a*e the uload oorta'le.

  • 8/19/2019 Rp6 v2 Robotersystem

    47/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    This warnin/ essa/e will 'e dislaed diretl 'eore test nu'er 8 and ust 'e a*nowled/ed 'eore the test will start.

    &lease enter the lowerase letter I$I in the terinal window and hit -nter (ou willhave to reeat this roedure whenever a siilar essa/e is dislaed or a test has

    to 'e a'orted...).,t this oint the ro/ra will outut the enu te$t shown on thelet. The te$t a han/e a 'it inuture releases4

    ou an selet and start the dierent test ro/ras ' enterin/the orresondin/ nu'er or letter and hit -nter.

  • 8/19/2019 Rp6 v2 Robotersystem

    48/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    >atter sensor test is ne$t. 5n at2 the sensor alread has 'een tested as the Ro'otAoader has shown the 'atter volta/e 'eore. The 'atter he* is now reeated toolete the list:

    =e$t S

    'oltage "en$or =e$t e $ure that 5ou are u$ing good accumulator$

    9nter JxJ and hit return when 5ou are read5

    &lease a*nowled/e ' enterin/ I$I4

    x,erforming 6B mea$urement$:Mea$urement 6: B7.B' -- OTMea$urement : B7.B' -- OTMea$urement S: B7.B' -- OTMea$urement E: B7.B' -- OTMea$urement : B7.B' -- OTMea$urement : B7.B' -- OTMea$urement 7: B7.B' -- OTMea$urement P: B7.B' -- OTMea$urement U: B7.B' -- OTMea$urement 6B: B7.B' -- OTDone

    This is li*e the outut should loo* li*e in /eneral ; values a var in the aeta'leran/e o !.! u to ?.!@. ,n error is shown i values are out o these liits. 5 an errorours2 lease he* the 'atteries ; the a not have 'een har/ed roerl or aredeet4 5 'atteries are 92 then the sensor (two resistors...) i/ht 'e daa/ed.

    =#R99: R(>=O"=&C*9: *9#=#R99: *9#=O"=&C*9: R(>=

    #R99: R(>=O"=&C*9: *9#=O"=&C*9: R(>=#R99: *9#=#R99: R(>=

    5 this was suessul2 ou a uit the test ' tin/ I$I + -nter

    Now we will he* the li/ht sensor. 5n order to test these sensors2 lease over eaho the su'seuentl with one hand2 ove our hand lose to these sensors andhe* or han/es o the easured values and the A-s ; dereasin/ li/ht intensitust result in dereasin/ easureent values4 The A-s will disla whih sensor issensin/ 'ri/hter li/ht. Fsuall2 dali/ht rodues values ran/in/ ro "00 to ?00.

    8

  • 8/19/2019 Rp6 v2 Robotersystem

    49/138

  • 8/19/2019 Rp6 v2 Robotersystem

    50/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    Ne$t one is the 5R79MM test roedure2 whih an 'e startet ' enterin/ I$I. The roedure starts transittin/ 5R dataa*ets2 dislas reeived a*ets in the terinaland autoatiall he*s i the reeived data is 9 (usin/ rather owerul 5Rdiodes2the 5R79MM usuall will reeive itIs own si/nals 'a*. 9nl in the a'sene o an reletin/ o'Hets or a eilin/ the sste a eventuall ail ; 'ut this would 'e a ver

    unusual ondition).

    The outut should loo* li*e this:

    =9"= 7

    RCOMM =e$tV...W

    =; RC ,acket: BR; RC ,acket -- =oggle it:B A Device &ddre$$:B A Te5 Code:B -- OT

    =; RC ,acket: SR; RC ,acket -- =oggle it:B A Device &ddre$$:S A Te5 Code:S -- OT=; RC ,acket: R; RC ,acket -- =oggle it:B A Device &ddre$$: A Te5 Code: -- OT=; RC ,acket: UR; RC ,acket -- =oggle it:B A Device &ddre$$:U A Te5 Code:U -- OT=; RC ,acket: 6R; RC ,acket -- =oggle it:B A Device &ddre$$:6 A Te5 Code:6 -- OTV...W=; RC ,acket: 7R; RC ,acket -- =oggle it:6 A Device &ddre$$: A Te5 Code:7 -- OT=; RC ,acket: BR; RC ,acket -- =oggle it:6 A Device &ddre$$:P A Te5 Code:B -- OT=; RC ,acket: SR; RC ,acket -- =oggle it:6 A Device &ddre$$:S6 A Te5 Code:S -- OT

    =e$t fini$hedDone

    The Test should ta*e a'out ! seonds.

    @ina$$! we wi$$ rocee' wi( (e oor an' Enco'er Te" o*m*" ic/ * (e RP6 wi( !o*r (an'" 9 (e caeri$$ar" m*"no o*c( (e )$oor or an! o(er obIec"

    O(erwi"e (e e" wi$$ mo" $i/e$! )ai$ 3) !o* * (e RP6 ono o) an obIec $i/e 'e"cribe' above4 $ea"e ma/e "*re (e

    RP6 canno acci'en$! )a$$ o)) (e ab$e.

    This test will not ta*e too lon/ ; aro$iatel 30 seonds. 7areull he* or erroressa/es in this test4 5t a haen that a sin/le easureent ails2 ausin/ the testseuene to end with an error essa/e. 5 the otors are startin/ as e$eted andthe test is a'orted soewhere in the iddle2 there is nothin/ to worr a'out. 5 thishaens2 lease retr ; ater readin/ the JTrou'leshootin/Khater in the aendi$4

    The test roedure will ra u 'oth otor seeds u to !0Q o the a$iu seedand will alternate the turnin/ diretion o the otors a ew ties. The sste will on

    !0

  • 8/19/2019 Rp6 v2 Robotersystem

    51/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    stantl 'e he*in/ and suervisin/ easureent values ro enoders and urrentsensors. 5 soethin/ /ot daa/ed durin/ the transort (e./. a short iruit in one othe otors or a 'lo*ed /ear ; whih should have 'een notied in the revious testin/hase ater insertin/ the 'atteries) the onitored urrent values will rise to hi/hlevels and ause the test to 'e a'orted iediatel.

    Sale test reort (a''reviated):

    =9"= P

    &utomatic $peed $peed regulation te$t

    &==93=O3 D&3(9R )&R33(Make $ure that the R, can 3O= move=he caterpillar track$ $hould 3O= touch the ground1hold it in 5our hand$ for example...2

    =>9 R, )** "=&R= MO'3( #&"= XO4 C&3 D&M&(9 = # XO4 DO 3O=M&T9 "4R9 =>&= = C&3 3O= MO'9Make $ure 0oth crawler track$ are #R99 R4333( DO 3O= *OCT =>9M-- O=>9R)"9 =>9 =9"= )** #&*

    9nter JxJ and hit return when =O "=&R= =>" =9"=Make $ure the R, can not move

    x=: BBB A'*: BBB A'R: BBB A,*: BBB A,R: BBB A*: BBB AR: BBS A4: B7.P'=: BBB A'*: BBB A'R: BBB A,*: BBB A,R: BBB A*: BB AR: BBS A4: B7.P'V...W"peed *eft: OT"peed Right: OT=: BB A'*: BBB A'R: BBB A,*: BBB A,R: BBB A*: BBB AR: BBS A4: B7.P'=: BB A'*: BBB A'R: BBB A,*: BBB A,R: BBB A*: BBB AR: BBS A4: B7.P'

    =: BB A'*: BBB A'R: BBB A,*: BBB A,R: BBB A*: BBB AR: BBS A4: B7.P'=: BB A'*: BBB A'R: BBB A,*: BB A,R: BB A*: BB AR: BBU A4: B7.'=: BB A'*: BB6 A'R: B6E A,*: BSU A,R: BSB A*: BB AR: BB A4: B7.7'V...W"peed *eft: OT"peed Right: OT=: BEB A'*: B6 A'R: B6U A,*: BS7 A,R: BP A*: B AR: B6 A4: B7.'=: BEB A'*: BB A'R: BB A,*: BS7 A,R: BU A*: B AR: B A4: B7.'=: BEB A'*: B6P A'R: BB A,*: BEE A,R: BS A*: BP AR: BS A4: B7.S'=: BEB A'*: BSP A'R: BSP A,*: B A,R: BEE A*: BS AR: BU A4: B7.S'=: BEB A'*: BS7 A'R: BE A,*: B A,R: BES A*: BSS AR: BP A4: B7.E'=: BEB A'*: BES A'R: BE6 A,*: B A,R: BE A*: BS AR: B A4: B7.S'=: BEB A'*: BES A'R: BE6 A,*: B A,R: BEB A*: BSB AR: BE A4: B7.E'=: BEB A'*: BS7 A'R: BE6 A,*: B A,R: BEB A*: BSB AR: BS A4: B7.E'=: BEB A'*: BES A'R: BEB A,*: BB A,R: BSU A*: BU AR: B A4: B7.E'"peed *eft: OT

    "peed Right: OT=: BB A'*: BEB A'R: BSU A,*: BS A,R: BEB A*: BSS AR: BE A4: B7.E'=: BB A'*: BS A'R: BEB A,*: BS A,R: BEB A*: BSE AR: B A4: B7.E'=: BB A'*: BE A'R: BSU A,*: B A,R: BE6 A*: BSE AR: B7 A4: B7.S'=: BB A'*: BE A'R: BEB A,*: BS A,R: B A*: BSP AR: BS A4: B7.'=: BB A'*: BP A'R: BB A,*: BP A,R: B A*: BSP AR: BS A4: B7.'=: BB A'*: B A'R: B A,*: B7 A,R: BE A*: BS7 AR: BU A4: B7.'=: BB A'*: BB A'R: B A,*: B7 A,R: BS A*: BSP AR: BP A4: B7.S'

    V...W

    "peed *eft: OT"peed Right: OT=: 6BB A'*: BP A'R: B7P A,*: BPB A,R: BP A*: BES AR: BS A4: B7.S'=: 6BB A'*: B7U A'R: B7U A,*: BP6 A,R: BU A*: BE7 AR: BSP A4: B7.'=: 6BB A'*: B7P A'R: BP A,*: BU A,R: B7P A*: BEU AR: BSU A4: B7.S'=: 6BB A'*: BU A'R: BUU A,*: 6B6 A,R: BP A*: B AR: BSU A4: B7.B'=: 6BB A'*: BUP A'R: 6BB A,*: 6BU A,R: BP6 A*: B AR: BEB A4: B7.6U'=: 6BB A'*: BU A'R: BUU A,*: 666 A,R: BP A*: B AR: BE A4: B7.6U'

    !1

  • 8/19/2019 Rp6 v2 Robotersystem

    52/138

    RP6 ROBOT SSTE - :. >ar'ware an' So)ware Se*

    =: 6BB A'*: 6B A'R: 6B6 A,*: 666 A,R: BP A*: BP AR: BE6 A4: B7.6'=: 6BB A'*: 6B A'R: 6B6 A,*: 6BU A,R: BP6 A*: B AR: BSU A4: B7.B'=: 6BB A'*: BUS A'R: 6BB A,*: 66S A,R: BP6 A*: BS AR: BSP A4: B7.B'=: 6BB A'*: 6BE A'R: BUU A,*: 66 A,R: BP A*: B AR: BE A4: B7.'"peed *eft: OT"peed Right: OT=: BPB A'*: BP A'R: B76 A,*: B A,R: BBB A*: BB AR: B6 A4: B7.P'

    =: BPB A'*: BBB A'R: BBB A,*: BBB A,R: BBB A*: BB6 AR: BBS A4: B7.P'=: BPB A'*: BBE A'R: B66 A,*: BPP A,R: BPE A*: B6 AR: BE A4: B7.6'=: BPB A'*: B7U A'R: 6B6 A,*: 6BS A,R: B77 A*: BE AR: BSU A4: B7.6'=: BPB A'*: BP A'R: B7 A,*: BUP A,R: B7 A*: B6 AR: BE6 A4: B7.6U'=: BPB A'*: BP6 A'R: BP6 A,*: BU A,R: B76 A*: B AR: BEB A4: B7.B'=: BPB A'*: BPB A'R: BP A,*: BU A,R: B7B A*: B7 AR: BSP A4: B7.6'=: BPB A'*: BP A'R: BPB A,*: BUE A,R: BU A*: BP AR: BS A4: B7.'=: BPB A'*: B77 A'R: BPB A,*: BU A,R: BU A*: B AR: BS A4: B7.S'"peed *eft: OT"peed Right: OT=: BB A'*: BP A'R: B7U A,*: BU A,R: BU A*: BE AR: BSP A4: B7.'=: BB A'*: B7U A'R: B7U A,*: BU A,R: B76 A*: BP AR: BEB A4: B7.6'=: BB A'*: BP A'R: BP6 A,*: BUS A,R: B7B A*: B AR: BSU A4: B7.6U'=: BB A'*: BU A'R: B7B A,*: BPB A,R: BE A*: BEP AR: BU A4: B7.S'=: BB A'*: BE A'R: BU A,*: B7 A,R: BE A*: BE AR: BU A4: B7.'=: BB A'*: BP A'R: B7 A,*: B7 A,R: B A*: BES AR: BS A4: B7.E'=: BB A'*: BU A'R: BU A,*: B7 A,R: B A*: BE AR: BSE A4: B7.S'

    =: BB A'*: BB A'R: BU A,*: B7 A,R: B A*: BE AR: BS A4: B7.S'=: BB A'*: B7 A'R: BB A,*: B7 A,R: B A*: BE7 AR: BSS A4: B7.'=: BB A'*: BP A'R: B6 A,*: B77 A,R: B A*: BE AR: BSB A4: B7.S'"peed *eft: OT"peed Right: OT=: BEB A'*: BE A'R: BS A,*: BES A,R: BS A*: B7 AR: B6P A4: B7.E'=: BEB A'*: BBB A'R: BBB A,*: B66 A,R: BBB A*: B6S AR: BB7 A4: B7.P'=: BEB A'*: BB A'R: BBB A,*: BSP A,R: BSP A*: B6 AR: B6E A4: B7.E'=: BEB A'*: BSP A'R: B6 A,*: BU A,R: B A*: BS AR: BS A4: B7.E'=: BEB A'*: BEE A'R: BES A,*: B7 A,R: BEE A*: BS AR: BP A4: B7.S'=: BEB A'*: BSP A'R: BSU A,*: B7 A,R: BEE A*: BS AR: B7 A4: B7.E'=: BEB A'*: BSU A'R: BE A,*: B A,R: BES A*: BSS AR: B A4: B7.S'=: BEB A'*: BES A'R: BE6 A,*: BS A,R: BE6 A*: BS AR: BS A4: B7.E'=: BEB A'*: BEB A'R: BE6 A,*: BE A,R: BE6 A*: BS AR: BS A4: B7.'"peed *eft: OT"peed Right: OT

    =: BB A'*: BS7 A'R: BEB A,*: BE A,R: BE6 A*: BS6 AR: BE A4: B7.E'=: BB A'*: B A'R: B6U A,*: B A,R: B6 A*: B67 AR: B6 A4: B7.P'=: BB A'*: BBB A'R: BBB A,*: BBB A,R: BBB A*: BBE AR: BB7 A4: B7.P'=: BB A'*: BBB A'R: BB A,*: BSB A,R: B7 A*: BB AR: BB A4: B7.E'=: BB A'*: B6S A'R: B6U A,*: BES A,R: BSB A*: BU AR: B A4: B7.E'=: BB A'*: B A'R: BB A,*: BSP A,R: BU A*: B7 AR: B A4: B7.E'=: BB A'*: BB A'R: B6 A,*: BSP A,R: BU A*: BP AR: BS A4: B7.'=: BB A'*: B6 A'R: BB A,*: BSP A,R: BU A*: BP AR: BS A4: B7.E'=: BB A'*: B6P A'R: B6U A,*: BSP A,R: BSB A*: B7 AR: BE A4: B7.E'=: BB A'*: B A'R: BB A,*: BS7 A,R: BU A*: B7 AR: BS A4: B7.S'"peed *eft: OT"peed Right: OT

    ***** MOTOR AND N!ODR T"T O#$ *****

    The easureent values reorted in this test are (ro let to ri/ht): T desiredseed2 @AP@R ; easured seed letPri/ht2 &AP&R ; & ; 'atter volta/e.

    5 the outut values loo* siilar to the a'ove reort ; everthin/ is 9.

      5 thin/s do not wor* roerl and error essa/es aear2 lease read the JTrou'leshootin/Khater in the aendi$4

    ThatIs it. 5 all sstes assed the test2 ou a now ontinue with the ne$t hater.9therwise /o to the trou'leshootin/ setion in the aendi$ ,.

    !"

  • 8/19/2019 Rp6 v2 Robotersystem

    53/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ;. Programming (e RP6,t last2 we have reahed the ro/rain/ setion.

    ;.1. 5on)ig*ring (e "o*rce co'e E'ior

  • 8/19/2019 Rp6 v2 Robotersystem

    54/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ou are now enterin/ the otionsdialo/2 whih allows ou tohan/e several settin/s. Coweverwe will onl add new entries tothe tools enu.

    To roeed2 selet J7P7++K in thedrodown list to the JShee:Kenu4

    7li* on J,ddK4

    The dialo/ on the let should aear.

    &lease e$atl enter the thin/sou see on the sreenshot.

    The hrase JQdK reers to thediretor o the seleted ile and JQdXa*eLall.'atK reers to the'ath ile2 whih an 'e ound inan o the sale R&6 roHets.

    ,s an e$ale o a Shortutentr ou a enter \STRD] +\M] with the *e'oard4

    This entr will start the Ja*eKtool ' allin/ the Ja*eLall.'atK 'athile2 whihinitiates the oilation Ho' oiles in the orresondin/ diretor o the seleted ile.

  • 8/19/2019 Rp6 v2 Robotersystem

    55/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ,s an alternative ethod to JQdPa*eLall.'atK ou a also sil enter Ja*eKinto the ield J7oandK and JallK into the J&araetersK ield.

    5n at2 the 'ath ile sil e$eutes e$atl these oands2 'ut the 'ath ile siliies startin/ the oiler ro the wa: the /enerated he$ile will not 'e deleted and astill 'e transerred to the ro'ot.,s entioned 'eore (alternativel to JQdPa*eLlean.'atK) ou a also enter Ja*eK into the J7oandK ield and JleanK into the J&araetersK ield.

    Aeave the otions enu ' li*in/ J9K.

    !!

  • 8/19/2019 Rp6 v2 Robotersystem

    56/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ;.1.2. 5on)ig*re S!nax >ig($ig(ing

    ,nother settin/ ou a han/e is the Snta$ Ci/hli/htin/. ou an add a ew JewordsK to the standard 7P7++ Shee. ou a diretl 7o &aste (\STRD]+\7] o2 \STRD]+\@] astePinsert) the into the dialo/ield:

    int8Lt int16Lt int3"Lt int6Lt uint8Lt uint16Lt uint3"Lt uint6Lt

    Then li* JSortK and 94

     Attention5 a!er versions of inAVR and Progra%%ers No!epad +inAVR-20040525

    or ne&er, alread" inlude !hese e"&ords in Progra%%ers No!epad3 .f "ou see !hesee"&ords alread" in !he lis! "ou do no! have !o %odif" !hese se!!ings3 $hese la!es!

    versions of Progra%%ers No!epad &ill also loo sligh!l" differen! fro% !he sreensho!sin !his %anual#

    !6

  • 8/19/2019 Rp6 v2 Robotersystem

    57/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ,ter ustoiGin/ and oenin/ a sale roHet aording !o !he ne*! se!ion  &N"should loo* li*e in the ollowin/ sreenshot:

    9n the let side ou see all sale roHets in a treeview2 the the soure editor (eaturin/ the reviousl disussed snta$ hi/hli/htin/) is on the ri/ht and and the tooloutut (in this ase the oiler outut) is on the 'otto.

    ou an ustoiGe &N" in various other was and it rovides a /reat nu'er o useuluntions.

    !

  • 8/19/2019 Rp6 v2 Robotersystem

    58/138

  • 8/19/2019 Rp6 v2 Robotersystem

    59/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    The oiler will /enerate a /reat nu'er o teorar iles (usin/ ile e$tensionsli*e J.o2 .lss2 .a2 .s2 .el2 .deK). ou do not have to loo* at an o these iles andou a use the newl reated tool Ja*e leanK to easil delete these iles4 9nl thehe$ile will is an iortant result or ou4 ,nd Ja*e leanK will not delete the he$ile.

    Startin/ the M,- ,AA oand in the enu will result in the ollowin/ outut (however the listin/ is a''reviated and a deviate ro this e$ale a 'it4):

    JmakeJ all-------- 0egin --------

    V...W

    Compiling: R,a$e*9D$.c

    avr-gcc -c -mmcuatmegaS -. -gdwarf- -O$ -fun$igned-char -fun$igned-0itfield$ -fpack-$truct-f$hort-enum$ -)all -)$trict-protot5pe$ -)aF-adhln$R,a$e*9D$.l$t -../../R,li0-../../R,li0/R,0a$e -../../R,li0/R,common -$tdgnuUU -MD -M, -M# .dep/R,a$e*9D$.o.d R,-a$e*9D$.c -o R,a$e*9D$.o

    Compiling: ../../R,li0/R,0a$e/R,Ro0ota$e*i0.cV...W

    Creating load file for #la$h: R,a$e*9D$.hexavr-o0cop5 -O ihex -R .eeprom R,a$e*9D$.elf R,a$e*9D$.hex

    V...W

    "i?e after:&'R Memor5 4$age

    ----------------

    Device: atmegaS

    ,rogram: PP 05te$ 1B.UY #ull2

    1.text G .data G .0ootloader2

    Data: 6EP 05te$ 17.Y #ull21.data G .0$$ G .noinit2

    -------- end -------- %rocess xit !o&e: ' =ime =aken: BB:B6

    ,n iortant line is J%rocess xit !o&e: 'K at the ver 'otto. 5t tells us that the oilin/ and lin*in/ roess has 'een oleted without an errors. ,n other odes indiate errors in the soure ode2 whih need to 'e orreted rior to suessul oilin/. 5 there are ista*es in the soure ode2 the oiler issues several error essa/es in the outut2 whih ontain ore ino a'out what auses the error.

    Cowever ou ust understand that the J&roess -$it 7ode: 0Kessa/e does not il an errorree ro/ra4 9 ourse the oiler will not 'e a'le to detet lo/ial errors in our ro/ra and it will not revent the ro'ot ro hittin/ the wall ^)

    3PORTA%T+ The outut an also ontain warnin/s2 whih i/ht 'e helul to identi iortant ro'les4 &lease loo* areull or warnin/ essa/es and tr to solvesuh ro'les diretl ater ou see the4 &N" uses olors to hi/hli/ht warnin/s anderrors. This allows ou to easil see iortant essa/es. The ro/ra will also listthe line nu'er reerrin/ to the error essa/e. ou an li* on the olored essa/e

    lines and &N" will autoatiall Hu to the reerened line in the soure ode.

    !?

  • 8/19/2019 Rp6 v2 Robotersystem

    60/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ,lso ver helul is an overview la'elled J,@R Meor Fsa/eK at the end:

    "i?e after:&'R Memor5 4$age----------------

    Device: atmegaS

    ,rogram: PP 05te$ 1B.UY #ull21.text G .data G .0ootloader2

    Data: 6EP 05te$ 17.Y #ull21.data G .0$$ G .noinit2

    This indiates that our ro/ra ouies 68!8 >tes in eor and reserves 18>tes R,M or stati varia'les (o ourse this does not inlude dnai values orCea and Sta*2 'ut e$lainin/ this would /o 'eond the soe o this anual. oushould alwas *ee at least a ew hundred 'tes o ree R,M). tes) #lash R9M and "> ("08 >tes) R,M. The >oot loader reuires " out o 3"> #lash R9M ; leavin/ 30> or ree use. ,lwas *ee anee on the ro/ra siGe2 to a*e sure that it its into the availa'le eor4

    (The Ro'otAoader will not transer to lar/e ro/ras4).The a'ove e$ale ro/ra will leave "368" ree 'tes in R9M. 5n at2 this rathershort e$ale ro/ra R&6>aseLA-s. is ouin/ so uh o the availa'leeor 'eause it ontains the whole R&6Ai'rar4 So donIt worr2 there is lent osae or our ro/ras and sall ro/ras do not reuire too uh eor. Theuntion li'rar alone ouies ore than 6.!> lash eor2 'ut it handles a lot oiortant wor* or ou alread. Fsuall our ro/ras will 'e saller than theR&6Ai'ar.

    ;.2. Program *$oa' o (e RP6

    The Ro'otAoader a now 'e used to uload the reentl oiled ro/ra to thero'ot. &lease add the /enerated he$ile to the Ro'otAoaderIs ile list ' li*in/ J,ddK2a*e sure the entr is seleted and then li* JFload4K2 Hust li*e ou did with theseltestro/ra. Now swith to the terinal ta' and he* the outut. 9 ourse2 ouwill have to start the ro/ra 'eore ou see an outut ro it. 5n the terinal thisis easil done ' ressin/ \STRD]+\S] on the *e'oard2 ' usin/ the enu ite JStartK or ' sendin/ a JsK ; o ourse ater a reset ou have to wait a seond or the J\R-,]K essa/e ro the >ootloader4 The *e o'ination \STRD]+\] an 'eused as well. ,ter the uload has inished2 the ro/ra is started strai/ht awa withthis shortut4

    The irst sale ro/ra is ver sile and will onl start a runnin/ A- lashli/ht

    and outut soe te$t throu/h the serial interae.

    >eore ou start writin/ our own ro/ras2 we will introdue the lan/ua/e 7 in aini 7rash7ourse...

    60

  • 8/19/2019 Rp6 v2 Robotersystem

    61/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ;.:. &(! 5G An' w(a8" ,55G

    The ro/rain/ lan/ua/e 7 is widel 'ein/ in use ; in at2 7 is the standard lan/ua/e2 whih anone interested in sotware develoent should have used at leastone. 7 oliers are availa'le or nearl ever iroontroller urrentl on the ar

    *et and or this reason2 all reent ro'ots ' ,R- -n/ineerin/ (,SFR92 -T5 andR&6) an 'e ro/raed in 7.

    The oularit o 7 leads to a vast aount o douentation on the internet and in literature2 allowin/ 'e/inners to easil stud the ro/rain/ lan/ua/e. >ut ree'er: 7 is a rather ole$ lan/ua/e2 whih annot 'e learned within a ew daswithout rior ro/rain/ e$eriene (so lease donIt throw the ro'ot out o thewindow i thin/s arenIt wor*in/ strai/ht awa ^) ).

    Au*il2 the 'asis are easil understood and ro/raers a ontinuousl develo*nowled/e and e$eriene. 5t reuires soe initial eort4 ou an not learn 7 autoatiall ; this ould 'e oared to learnin/ a orei/n lan/ua/e.

    >ut itIs worth the eort2 as 'asi 7 *nowled/e will sili learnin/ other ro/rain/ lan/ua/es as the onets are oten ver siilar.

    Eust li*e or our other ro'ots2 the R&6 reuires a seial version o the 7 oilerro the DNF 7oiler 7olletion (a''reviation: D77). The D77 is a universal oilin/ sste2 suortin/ a /reat variet o lan/ua/es suh as 72 7++2 Eava2 ,da and#9RTR,N.

    D77Is tar/et suort is not restrited to ,@R. 5t a 'e used or uh 'i//er sstesand *nows a ew doGen dierent tar/ets.

    The ost roinent roHet usin/ the D77 is the aous Ainu$ roHet2 o ourse.Most o the ro/ras or Ainu$ have 'een oiled ' D77. Thus it an 'e onsideredas a ver roessional and sta'le tool2 whih is 'ein/ used ' several 'i/ oanies.

    > the wa: 5 this anual is reerrin/ to JD77K we do not neessaril ean the olete 7oiler 7olletion2 'ut the 7 oiler onl. 9ri/inall JD77K had 'een in use asan a''reviation or JDNF 7 7oilerK ; the new eanin/ 'eae neessar ateraddin/ soe other lan/ua/es.

    5 ou would li*e to learn ore a'out D77 we invite ou to visit the oiial D77 we'site: http://gcc.gnu.org/

    D77 does not diretl suort the ,@R tar/et and ust 'e adated. The adated version o D77 is naed ,@RD77. The

  • 8/19/2019 Rp6 v2 Robotersystem

    62/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ;.;. 5 9 5ra"( 5o*r"e )or beginner"

    $his hap!er onl" provides a ery short introduction to 1$pro$ gra##ing  disussing onl" !he a'solu!el" re/uired %ini%u%a%oun! of !hings used for RP6# $his se!ion has !o 'e seen as an

    overvie& of general possi'ili!ies and %e!hods of C# e &ill presen! afe& e*a%ples and 'asis 'u! fur!her inves!iga!ion on !hese !opis isup !o !he reader3

    So this hater is not ore than a tin rash ourse. , com$ee introdution is ar'eond the soe o this %anual  and would reuire rather thi* te$t'oo*s. Au*il thear*et rovides a /reat nu'er o /ood 'oo*s on this toi.

    , ew1 a 'e viewed online ree o har/e.

    ;.;.1. #iera*re

    The ollowin/ 'oo*s and tutorials desri'e 7ro/rain/ ainl or &7 and other

    lar/e outers. , lot o details in these tutorials do not al to ,@R  %iroon!rol-lers > !he language is !he sa%e 'u! %os! li'raries for !"pial PC-usage are a 'i! !oolarge for s%all 9 'i! %iroon!rollers# $he 'es! e*a%ple %a" 'e !he prin!f fun!ion a

    %us! have on a PC3 $he prin!f fun!ion is availa'le for %iroon!rollers as &ell 'u!i! re/uires a lo! of %e%or" spae and e*eu!ion !i%e so &e do no! prefer !o use !his

    fun!ion# .ns!ead &e &ill sho& so%e %ore effe!ive al!erna!ives for our applia!ions#

    Soe C $u!orials )

  • 8/19/2019 Rp6 v2 Robotersystem

    63/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ,dditional inoration an also 'e ound on the ello )orldJ + 7arria/e Return P Aine #eed

    to the serial interae. This is a tial ro/rain/ e$ale2 whih a 'e ound inost 'oo*s (o ourse not with the initRo'ot>ase all at the 'e/innin/ ^) ).

    To /et ailiar with the new lan/ua/e2 ou a o this sall ro/ra into a te$t

    editor ' oursel and tr to oile it.

    63

    http://winavr.sourceforge.net/http://winavr.sourceforge.net/install_config_WinAVR.pdfhttp://www.nongnu.org/avr-libc/user-manual/index.htmlhttp://winavr.sourceforge.net/http://winavr.sourceforge.net/install_config_WinAVR.pdfhttp://www.nongnu.org/avr-libc/user-manual/index.html

  • 8/19/2019 Rp6 v2 Robotersystem

    64/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ,none eelin/ 'ored ' the tin sale ro/ra a ind a ore attrative %CelloaseAi'.h andR&6Ro'ot>aseAi'. ; this should lari the 'asi rinile.

  • 8/19/2019 Rp6 v2 Robotersystem

    65/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    untions2 'ut is not needed in a iroontroller sste. ut thatIs not neessar4 ou ould write the ro/ra te$t roline in listin/ 1 e./.:

    6 int main,voi& -initRo0ota$e,-write"tring,J>allo )elt!nJ-return B0

    This is an idential ro/ra2 'ut the te$t is rather onusin/. Cowever we onl deletedta's2 saes and line 'rea*s4 The oiler does not are or orattin/ stles at all4(9 ourse we will need a sae as a searator 'etween *ewords and varia'les li*e JintK and JainK ; and we are not allowed to use a line 'rea* 'etween two uotation ar*s (at least not without an esae seuene)4)

    The aolades b allow us to o'ine several assi/nents and oands to 'lo*s2whih will 'e needed or untions2 onditional stateents and loos.

    -ah assi/nent is to 'e terinated ' a seiolon I^I to allow the oiler to identi individual oands.

    >eore ou start tewritin/ and oin/ the ro/ra sniets ro this tutorial wewould li*e to /ive ou an iortant advie: ost 'e/inners do easil or/et to terinate oands ' a seiolon ; or use the seiolon at wron/ loations and wondera'out the stran/e ro/ra 'ehaviour4 #or/ettin/ to lae one sin/le seiolon at ertain ro/rain/ setions a result in a /reat nu'er o error essa/es ; even ithe real error is onl one sin/le error. 5n at2 the irst error essa/e will ost li*elidenti the real error loation.

    #or/ettin/ to lose one o several aolade airs or 'ad snta$ in sellin/ oands'elon/ to the oon error atterns or 'e/inners. 7oilers do not aet an snta$ errors4 5t ta*es tie /ettin/ used to all this rules2 'ut ou will ui*l learn ' trialand error.

    -ah and ever 7ro/ra starts in the ain untion. >asiall an ollowin/ oands will 'e e$euted ste ' ste2 seuentiall ro the 'e/innin/ to the end.

    The ,@R Miroontroller is una'le to e$eute several oands siultaneousl4 Thisrestrition is not ausin/ an ro'les as we will have ale otions to ontrol thero/ra low and Hu to other setions o the ro/ra (this will 'e disussed in alater hater).

    6!

    http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=linehttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=breakhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=quotationhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=markshttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=semicolonhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=typewritinghttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=takeshttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=gettinghttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=usedhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=tohttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=linehttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=breakhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=quotationhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=markshttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=semicolonhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=typewritinghttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=takeshttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=gettinghttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=usedhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=to

  • 8/19/2019 Rp6 v2 Robotersystem

    66/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ;.;.;. ?ariab$e"

    #irst weIll have a loo* at storin/ and readin/ data to and ro R,M. ata aess isdone throu/h varia'les. 7 *nows several data tes or varia'les. >asiall we will use82 16 or 3" >its inte/er data tes2 whih a 'e used either si/ned or unsi/ned.

    The deserved value ran/e deterines the reuired nu'er o 'its or deinin/ a stora/e loation or a varia'le.#or the R&6 we will use the ollowin/ data tes:

    Tpe Alternative ;alue rant   P it: ' ... 744   ZZ un$igned

    int int16>t   6 it: 23756 ... ?37565   5te$

    unsit   6 it: ' ... 64434   ZZ un$igned

    lon< int37>t   S it: @71536 ... ?715365 E 5te$

    unsint   S it: ' ... 78865784   ZZ un$igned

    > a la* o standardisation2 there are several varin/ siGes deined on dierent lators eseiall or the data te JintK : or our iroontroller the siGe is 16 'its2 'utits 3" 'its or (odern) &7Is. #or this reason we reerred the odern standard deinition: int16Lt

    These data tes are alwas ade u li*e: \u] int N Ltu : un$ignedint : nteger3 : 3um0er of 0it$F e.g. PF 6F S or Et : t for Kt5peL to prevent colli$ion$ to other $5m0ol$

    9n a sall iroontroller2 ever sin/le 'te ounts and learl deined data teswill hel to *ee tra* o eor onsution. ou an iediatel identi a 16'itdata te ' the nu'er 16 in the nae. The letter JuK at the 'e/innin/ ar*s an Junsi/nedK data te2 whereas this letter is oitted or a Jsi/nedK data te.

    #or the noral (lassi) datates we onl used the Jsi/nedK or Jsi/ned harK in the ta'le a'ove2 as int and lon/ are deined assi/ned tes anwa and har is unsi/ned2 even i ou do not e$liitl write this. The reason or these deinitions is an ,@RD77 oiler otion2 whih is ativated in ost ases.

    The data te JharK will 'e used or strin/s2 'eause an Juint8LtKdeinition would lead to a ew inoati'ilities with standard 7 li'raries and JharK is a lear and lo/ial nae or a haraterPstrin/ anwa.

  • 8/19/2019 Rp6 v2 Robotersystem

    67/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    5n order to use a varia'le in a ro/ra we have to delare it irst ' deinin/ the datate2 a nae and eventuall an initial value or this varia'le. The nae ust startwith an alha'eti harater (inludin/ the undersore JLK)2 and a ontain nu'ers. Cowever the varia'leIs nain/ onvention e*ludes a /reat nu'er o seialharaters2 e./. Jcf`I\]Bg[_+.2WQP()bjV=4kK.

    @aria'le naes are ase sensitive2 whih ilies a> and a'7 are dierent varia'les4Traditionall2 ro/raers use lower ase haraters at least or the leadin/ harater o varia'le naes.

    The ollowin/ *ewords are alread reserved and are N9T usea'le as varia'le naes2untion naes or an other s'ols:

    auto &eBault Bloat lon< siCeoB union

     brea= &o Bor reasi aritheti oerations a 'e used as usual:$igned char ?[ // plea$e note the K$ignedL in front of char? x G 5[ // ? get$ the value ? x G 5 6B G S S? x H 5[ // ? get$ the value ? 6B H S -ES? 6B G 6 G H [ // ? P? x[ // ? 6B B? x / [ // ? 6B /

    =he programming language al$o provide$ $ome u$eful a00reviation$:

    ? G 6B[ // corre$pond$ to: ? ? G 6B[ thi$ mean$ ? 6 in thi$ ca$e? [ // ? ? SB? - [ // ? ? - E? / E[ // ? ? / E P

    6

    http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=lowerhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=casehttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=lowerhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=casehttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=designatorhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=basichttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=arithmetichttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=operationhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=lowerhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=casehttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=lowerhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=casehttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=designatorhttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=basichttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=arithmetichttp://dict.leo.org/ende?lp=ende&p=eL4jU.&search=operation

  • 8/19/2019 Rp6 v2 Robotersystem

    68/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    ?GG[ // a00reviation for ? ? G 6[ which implie$ ? i$ now U?GG[ // ? 6B // ?GG i$ called Kincrementing ?L?GG[ // ? 66 ...?--[ // ? 6B // ?-- i$ called Kdecrementing ?L?--[ // ? U?--[ // ? P ...

  • 8/19/2019 Rp6 v2 Robotersystem

    69/138

    RP6 ROBOT SSTE - ;. Programming (e RP6

    9ne ore e$ale:

    6SE

    7PU6B

    uint16>t m5#avorite'aria0le  6EE7

    iB, m5#avorite'aria0le E 6BBB- // f m5#avorite'aria0le < 6BBB   // then:

      write"tring,Jm5#avorite'aria0le i$ le$$ than 6BBB!nJ-