<xml xmlns="http://www.w3.org/1999/xhtml"><block type="text_print" id="JBvb;lliv`j|w|kbx0Or" x="188" y="-513"><value name="TEXT"><shadow type="text" id="SQa0]);|VOx47u~*L)5K"><field name="TEXT">[SETTING UP] Place Dobot Magician near by the motor of conveyor belt, make sure the conveyor belt is in front of the Dobot, the two sensor is close by the motor. </field></shadow></value><next><block type="text_print" id="/f}N0W}}`])ZTSQ9eK:O"><value name="TEXT"><shadow type="text" id="FISWq7XC;3fZ*HF=%Cni"><field name="TEXT">[HOME] Restore to home position at first launch, please wait 30 seconds after turnning on the Dobot.</field></shadow></value><next><block type="text_print" id="g|3_zjuJ`l,eIG3;bY[V"><value name="TEXT"><shadow type="text" id="U:!]j38hM-WrWSJSy3[6"><field name="TEXT">[SET HOME] Open the Teaching and Playback module, save one point, and right click to set the home position.</field></shadow></value><next><block type="text_print" id="]tU{;=F11t.:fJZ3WqH`"><value name="TEXT"><shadow type="text" id="*)|c|zbw|]gw/uAxW[c_"><field name="TEXT">[COLOR RECOGNIZING] After start the sorting blockly demo, Dobot Magician will move to the top of the color sensor and hold a while. Please adjust the position if it is not correct.</field></shadow></value><next><block type="text_print" id="=6~reQinlY2L5)FZa58t"><value name="TEXT"><shadow type="text" id="KHnuXC:X+.^~]=E]Z1vU"><field name="TEXT">[DIRECTION] Standing behind the Dobot Magician facing its front direction, X is front and back direction, Y is right and left direction.</field></shadow></value><next><block type="text_print" id="VZ[7cgkGiU}MP+-gO4]("><value name="TEXT"><shadow type="text" id="R;.Ks-{(Cj4Ml8xPK=3="><field name="TEXT">[COLOR SENSOR] Please connect the color sensor to GP4.</field></shadow></value><next><block type="text_print" id="0Ys@#yNVUPmfnG=y4W!8"><value name="TEXT"><shadow type="text" id="glwK:=Za?lMi^cPQWA|h"><field name="TEXT">[PHOTOELECTRIC SENSOR]Please connect the photoelectric sensor to GP2.</field></shadow></value><next><block type="variables_set" id="[i.@Mh#7)m(y^q*sjH.}"><field name="VAR">Grab_X</field><value name="VALUE"><block type="math_number" id="a-Ua0aZD%tFB]c,KQOFb"><field name="NUM">273.2</field></block></value><next><block type="variables_set" id="9(dD(HumbmUkLY*5!z:;"><field name="VAR">Grab_Y</field><value name="VALUE"><block type="math_number" id="k*s!OIdri,zMEtpY7!_h"><field name="NUM">79.8</field></block></value><next><block type="variables_set" id="u/;(E:a%I1H~hNnBWkdD"><field name="VAR">Grab_Z</field><value name="VALUE"><block type="math_number" id="%wP@y~qQLNj)G}AikWR."><field name="NUM">5</field></block></value><next><block type="variables_set" id="vxysc1k:(Iqmh2)SVC=a"><field name="VAR">ColorSensor_X</field><value name="VALUE"><block type="math_number" id="kbty:TOceLP0Tl^[#Z20"><field name="NUM">195.8</field></block></value><next><block type="variables_set" id="ZVT`v2=DX3oq=:G/c0[-"><field name="VAR">ColorSensor_Y</field><value name="VALUE"><block type="math_number" id="E{LoBSNP,G?R5+LZ_f8Y"><field name="NUM">125</field></block></value><next><block type="variables_set" id="RQN=?E_No4cRcbHV1=eY"><field name="VAR">ColorSensor_Z</field><value name="VALUE"><block type="math_number" id="VHZUB=@?baGw8i!)Kx^2"><field name="NUM">27</field></block></value><next><block type="variables_set" id="J9VX[%t+,e^kC[1.WG!A"><field name="VAR">Place_X</field><value name="VALUE"><block type="math_number" id="C[oNMw60tQW3z?gcP{##"><field name="NUM">173</field></block></value><next><block type="variables_set" id="f56]pg=JP*%_gUw(yxz0"><field name="VAR">Place_Y</field><value name="VALUE"><block type="math_number" id="UV+920ru[|DxX=BSrx@I"><field name="NUM">-150</field></block></value><next><block type="variables_set" id=".6?{xusTSp4D]#__XY^|"><field name="VAR">Place_Z</field><value name="VALUE"><block type="math_number" id="j,]K00DwyW`Svss]RK]@"><field name="NUM">-49</field></block></value><next><block type="variables_set" id="%P3cxf2PS4I/AcN1CTvo"><field name="VAR">PlacingInterval</field><value name="VALUE"><block type="math_number" id="BUK]@OXs=Zo0V[X7kQA{"><field name="NUM">40</field></block></value><next><block type="dobot_selectendtype" id="_EuKKQ)(Nl@#RI#hK]F_"><field name="type">59.7</field><next><block type="variables_set" id="R|_323#2,=]rbCoE8%L:"><field name="VAR">RedCount</field><value name="VALUE"><block type="math_number" id="mnR1Mjqx=Kqn{3?b,O=r"><field name="NUM">0</field></block></value><next><block type="variables_set" id="Af]~]H,WWdn4^Lix4aDb"><field name="VAR">BlueCount</field><value name="VALUE"><block type="math_number" id="N@^l6PFUwh},o~^o_=.I"><field name="NUM">0</field></block></value><next><block type="variables_set" id="T8/%eJvxAoBy}tq|cQ.D"><field name="VAR">GreenCount</field><value name="VALUE"><block type="math_number" id="[_2WGi-I9V4QLQIata#^"><field name="NUM">0</field></block></value><next><block type="dobot_set_colorseneor" id="?}6TzuWQu4t^tZdbcd`F"><field name="io">1</field><field name="port">2</field><next><block type="dobot_SetInfraredSensor" id="7=jPZdV800wUbzFNHvDM"><field name="io">1</field><field name="port">1</field><next><block type="dobot_delaytime" id="ziM=DBWI:,e^1AjZsWk^"><value name="time"><shadow type="math_number" id="l)8Wv}hSiCKQLt2^(@gy"><field name="NUM">1</field></shadow></value><next><block type="dobot_setptpjointparams" id="o+55!0kzwF*/Kfek#ee/"><value name="Velocity"><block type="math_number" id="K2~xWeWB^,-!q_(Kf@kn"><field name="NUM">400</field></block></value><value name="Acceleration"><block type="math_number" id="vT@@*#*muHD7,2G=hOf1"><field name="NUM">400</field></block></value><next><block type="dobot_setlinearspeed" id="o0H?hm!kt;S1JIZ05_of"><value name="velocity"><shadow type="math_number" id="sAI}`J]u(FL!d!,D[=Eb"><field name="NUM">100</field></shadow></value><value name="acceleration"><shadow type="math_number" id="^tU?dvStuZ,p*KLy80FL"><field name="NUM">100</field></shadow></value><next><block type="dobot_setjumpheight" id="d++e/:FV^W4*6eF7K[(e"><value name="height"><shadow type="math_number" id="luB^KqH+Ix{B7_duNO)r"><field name="NUM">50</field></shadow></value><next><block type="dobot_goto" id="spWw0e?,?r!:o31`AQa,"><value name="xBias"><shadow type="math_number" id="L})..@A9}V}IilK(g8p|"><field name="NUM">200</field></shadow><block type="variables_get" id="VHSNbZ313x]|~7-^d=}J"><field name="VAR">ColorSensor_X</field></block></value><value name="yBias"><shadow type="math_number" id="y`wop~MUBY,G@QRR?2ww"><field name="NUM">0</field></shadow><block type="variables_get" id="QLsEiBv{K(hNn*kIQX(E"><field name="VAR">ColorSensor_Y</field></block></value><value name="zBias"><shadow type="math_number" id="Jx`El1hQQ3b%],vlt]aV"><field name="NUM">0</field></shadow><block type="variables_get" id="RbJ}e,f(6o=qjY_1Z8=M"><field name="VAR">ColorSensor_Z</field></block></value><next><block type="dobot_pump" id="3;cfZ8y/ri)_m]rVq~kK"><field name="io">0</field><next><block type="controls_whileUntil" id="Hcovx0y8eGgv8tuZahL:"><field name="MODE">WHILE</field><value name="BOOL"><block type="logic_boolean" id="1J;;l~5)jg]o^0FpGFN]"><field name="BOOL">TRUE</field></block></value><statement name="DO"><block type="controls_if" id="I%To@)#4kQMVf;?9F3y]"><value name="IF0"><block type="logic_compare" id="b;N,%h!Ot(em,+vQm+L|"><field name="OP">EQ</field><value name="A"><block type="dobot_GetInfraredSensor" id="Sx!|C;z)pNowpm`!KuB["><field name="port">1</field></block></value><value name="B"><block type="math_number" id="p=5ap`dO8zw3]329vvit"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="dobot_pump" id="N0y%{d/z?_!WZ;Vb[@cu"><field name="io">1</field><next><block type="dobot_jumpto" id="cL:PJ{`1@J+W4{AW(c3r"><value name="xBias"><shadow type="math_number" id="x9)ZTjwcYChCSCj!RtI;"><field name="NUM">200</field></shadow><block type="variables_get" id="{V4M=a|XR!_zhpl`,.6+"><field name="VAR">Grab_X</field></block></value><value name="yBias"><shadow type="math_number" id="6qKtK~#3;RxLSx4y`SdJ"><field name="NUM">0</field></shadow><block type="variables_get" id="u3[%{4UlxEY9][gr:J:x"><field name="VAR">Grab_Y</field></block></value><value name="zBias"><shadow type="math_number" id="i|7aBih7!?i0k/Y(`IYF"><field name="NUM">10</field></shadow><block type="variables_get" id="D@~+@mq`UCnp|2vD}MHL"><field name="VAR">Grab_Z</field></block></value><next><block type="procedures_callnoreturn" id="_bv]W~43U!wOHl%og(`K"><mutation name="getcoler"></mutation><next><block type="dobot_jumpto" id="@r-W2s{pfSjR:)kUKl[L"><value name="xBias"><shadow type="math_number" id="+LS`;}2:V`ql.A5`0W9Z"><field name="NUM">200</field></shadow><block type="variables_get" id="Oz`{.?2AZyJ_r;7{DnCY"><field name="VAR">Grab_X</field></block></value><value name="yBias"><shadow type="math_number" id="9z9[~(5|HEpPS:|sFjCN"><field name="NUM">0</field></shadow><block type="variables_get" id="=v?v2:NfBj-k^5A(49IG"><field name="VAR">Grab_Y</field></block></value><value name="zBias"><shadow type="math_number" id="5M%u}F;XhD.j%h[HTjbP"><field name="NUM">0</field></shadow><block type="variables_get" id="3iTlcl)hx)smSZm:c[!B"><field name="VAR">ColorSensor_Z</field></block></value></block></next></block></next></block></next></block></statement></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block><block type="procedures_defnoreturn" id="Xw#~N5dWE3?*B=;:.a8F" x="912" y="-212"><field name="NAME">getcoler</field><comment pinned="false" h="80" w="160">描述该功能...</comment><statement name="STACK"><block type="dobot_jumpto" id="1Zb*yXR6F{}{@;iK5j~P"><value name="xBias"><shadow type="math_number" id="EdIl@VvcGpPc0Vyd?Rpv"><field name="NUM">137.5</field></shadow><block type="variables_get" id="|m~OAgpp1V)`t3~uFECP"><field name="VAR">ColorSensor_X</field></block></value><value name="yBias"><shadow type="math_number" id="rY7gHWj5Zbe{Ef`-g?WP"><field name="NUM">-138</field></shadow><block type="variables_get" id="oMX#RdUZ@%]dnFt,WmgV"><field name="VAR">ColorSensor_Y</field></block></value><value name="zBias"><shadow type="math_number" id="%JBv%KZMLl~M{23=x@Bn"><field name="NUM">-30</field></shadow><block type="variables_get" id="KT}!ZOEcG)39#r+/{;YU"><field name="VAR">ColorSensor_Z</field></block></value><next><block type="dobot_delaytime" id="^?9Tvr9=*O[zTpGP.n/7"><value name="time"><shadow type="math_number" id="=Zx;wlpy_)`Yc0G{X4r1"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="r4wN[@48buD2[J?e4uht"><field name="VAR">R</field><value name="VALUE"><block type="dobot_get_colorseneor" id="74pL~y;**ez8BncyFiOt"><field name="NAME">0</field></block></value><next><block type="variables_set" id="=0p`ZLe~yCW;eQ7.=gmA"><field name="VAR">G</field><value name="VALUE"><block type="dobot_get_colorseneor" id="=9RL^*RC`;Uh9d=s(xRZ"><field name="NAME">1</field></block></value><next><block type="variables_set" id="@+k72aLA5#ZP)c=OB{s6"><field name="VAR">B</field><value name="VALUE"><block type="dobot_get_colorseneor" id="ThP+V_izMpc(xpJ(XLJJ"><field name="NAME">2</field></block></value><next><block type="variables_set" id="2yGmz0}4u7INHyq;LW@1"><field name="VAR">MAX</field><value name="VALUE"><block type="math_on_list" id="KQ--D4Q_u0zcZ-a(HC(D"><mutation op="MAX"></mutation><field name="OP">MAX</field><value name="LIST"><block type="lists_create_with" id="_BpY%6tYTZRXE=kG(AV?"><mutation items="3"></mutation><value name="ADD0"><block type="variables_get" id=";A8yCvS#vxk1WTDu/V,_"><field name="VAR">R</field></block></value><value name="ADD1"><block type="variables_get" id="/T^:QR@k=d,B3,Li:EAe"><field name="VAR">G</field></block></value><value name="ADD2"><block type="variables_get" id="!f-69D~:P%Q2G%_ZfdFF"><field name="VAR">B</field></block></value></block></value></block></value><next><block type="controls_if" id="f-]Nvz-R6m?@?f:N2w.C"><mutation elseif="1" else="1"></mutation><value name="IF0"><block type="logic_compare" id="Fi5DW+YYYO2{MGq?O+K|"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="jm;g|aE[v;z2lC5oK0Lj"><field name="VAR">MAX</field></block></value><value name="B"><block type="variables_get" id="fyT-09m^!dLwVGgRDFKp"><field name="VAR">R</field></block></value></block></value><statement name="DO0"><block type="text_print" id="esoC#8!6KDg5Rbb^*{~*"><value name="TEXT"><shadow type="text" id="v]Uj`#M.M/24/n{lMB~c"><field name="TEXT">Red</field></shadow></value><next><block type="dobot_jumpto" id="FH9y#?Vh:a@zM*|9@ceR"><value name="xBias"><shadow type="math_number" id="a^Al13r?GVf42XQ7B:2^"><field name="NUM">50</field></shadow><block type="math_arithmetic" id="!(xDi{P/b(y9FEEMhR]H"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="tiVYYAstzk@^:#{BmrY*"><field name="NUM">1</field></shadow><block type="variables_get" id="YFu|z40#;~Dl#c6]I9+s"><field name="VAR">Place_X</field></block></value><value name="B"><shadow type="math_number" id="1.=Lb/Z9PT6J%r@?8%H_"><field name="NUM">1</field></shadow><block type="variables_get" id="Zz^gSyR7_g!UPivzQ[!e"><field name="VAR">PlacingInterval</field></block></value></block></value><value name="yBias"><shadow type="math_number" id="+d-.tBehU3;+fP_?PV#g"><field name="NUM">-200</field></shadow><block type="variables_get" id="D~?Uc7(iNtyEv7,JE0Li"><field name="VAR">Place_Y</field></block></value><value name="zBias"><shadow type="math_number" id="nvS+h;-7%aI./ZXAUQ~A"><field name="NUM">7.3</field></shadow><block type="math_arithmetic" id="|kPz|JOPGco%U/,rYd}C"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="Jn=sm(9#DgbM4jb:eXXT"><field name="NUM">-43</field></shadow><block type="variables_get" id="^S7jGV:vXx2-OsO48.0G"><field name="VAR">Place_Z</field></block></value><value name="B"><shadow type="math_number" id="C69T:[dVurB*n_AW6T1O"><field name="NUM">1</field></shadow><block type="variables_get" id="mctwdEFt)OJ=*tVWVHAR"><field name="VAR">RedCount</field></block></value></block></value><next><block type="variables_set" id="HO}n{)WY0yvR[e?gr6Ac"><field name="VAR">RedCount</field><value name="VALUE"><block type="math_arithmetic" id="dDhl%_+SKHeAeR-eRU0r"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="2@HCVbFl{yd`f5sTVbHU"><field name="NUM">1</field></shadow><block type="variables_get" id=")oe=9(dQQc;OqRI0Ao.b"><field name="VAR">RedCount</field></block></value><value name="B"><shadow type="math_number" id="HFX%??|jM|L,0CW-IIlU"><field name="NUM">25</field></shadow></value></block></value></block></next></block></next></block></statement><value name="IF1"><block type="logic_compare" id="Y+)BIjI^l1+Dy]G-wb4B"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="v@{2+s-aW[n7Tbq;ZprQ"><field name="VAR">MAX</field></block></value><value name="B"><block type="variables_get" id="5n{^bc6-AcL;tt@%P9br"><field name="VAR">G</field></block></value></block></value><statement name="DO1"><block type="text_print" id="Zfgt9e%,jTbLb^lO|iy;"><value name="TEXT"><shadow type="text" id="sh4oG+1wu0%@Z4VQ~Lwc"><field name="TEXT">Green</field></shadow></value><next><block type="dobot_jumpto" id="~wF*XRM)[~Ryn~f)n#?R"><value name="xBias"><shadow type="math_number" id="56g{sVRLNsq/bfuQiX2Y"><field name="NUM">0</field></shadow><block type="variables_get" id="sK;u%C6GDy,HD.P`=_Co"><field name="VAR">Place_X</field></block></value><value name="yBias"><shadow type="math_number" id="jV/hd!_}qI#7A+4@:hvm"><field name="NUM">-200</field></shadow><block type="variables_get" id="nMDXIK31V;Hu0(**_B7R"><field name="VAR">Place_Y</field></block></value><value name="zBias"><shadow type="math_number" id="nvS+h;-7%aI./ZXAUQ~A"><field name="NUM">7.3</field></shadow><block type="math_arithmetic" id="o^cYm^scQkz{2j2NkzX#"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="CzaQAb-JIZ1Mne#R`1pj"><field name="NUM">-43</field></shadow><block type="variables_get" id="BA8C*H`/S4s-Ko}l+RuT"><field name="VAR">Place_Z</field></block></value><value name="B"><shadow type="math_number" id="C69T:[dVurB*n_AW6T1O"><field name="NUM">1</field></shadow><block type="variables_get" id="5QpP]qUAU%XI!4n=uRI3"><field name="VAR">GreenCount</field></block></value></block></value><next><block type="variables_set" id="{%Fd#`Hd%x2?r.DP4o(*"><field name="VAR">GreenCount</field><value name="VALUE"><block type="math_arithmetic" id="fXnLK7%VoU[9c[rr%q-X"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="2@HCVbFl{yd`f5sTVbHU"><field name="NUM">1</field></shadow><block type="variables_get" id="7/e|cVwB)nm0ZB1:6IKx"><field name="VAR">GreenCount</field></block></value><value name="B"><shadow type="math_number" id="Qs0I_J.L|_rpwpwV;1Cs"><field name="NUM">25</field></shadow></value></block></value></block></next></block></next></block></statement><statement name="ELSE"><block type="text_print" id=":T`nQYgj9d{iYen7,dJ,"><value name="TEXT"><shadow type="text" id="Jk*CrDT][hzHk%*q@Ia`"><field name="TEXT">Blue</field></shadow></value><next><block type="dobot_jumpto" id="~h13aXTd9%)p{4Fvz#RJ"><value name="xBias"><shadow type="math_number" id="[ncB?63K8,4fmv^O|inD"><field name="NUM">-50</field></shadow><block type="math_arithmetic" id="voxHTPUJ*AMu{*@prFR#"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="tiVYYAstzk@^:#{BmrY*"><field name="NUM">1</field></shadow><block type="variables_get" id="HJAwDk7Jz!KPLCXn)-1D"><field name="VAR">Place_X</field></block></value><value name="B"><shadow type="math_number" id="1.=Lb/Z9PT6J%r@?8%H_"><field name="NUM">1</field></shadow><block type="variables_get" id="RoaFIPSeCwho_|:*JIJs"><field name="VAR">PlacingInterval</field></block></value></block></value><value name="yBias"><shadow type="math_number" id="wjf,]zW^`!;n)x;#4S?*"><field name="NUM">-200</field></shadow><block type="variables_get" id="S_(l%tcV-R4y:./zFF{e"><field name="VAR">Place_Y</field></block></value><value name="zBias"><shadow type="math_number" id="nvS+h;-7%aI./ZXAUQ~A"><field name="NUM">7.3</field></shadow><block type="math_arithmetic" id="6)Y:5g^R;=SmoIs,0Yd_"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="}#u{NI5??_ozJ,%g7?Y]"><field name="NUM">-43</field></shadow><block type="variables_get" id="Y%4).`2B3bSK9^U*P/6["><field name="VAR">Place_Z</field></block></value><value name="B"><shadow type="math_number" id="C69T:[dVurB*n_AW6T1O"><field name="NUM">1</field></shadow><block type="variables_get" id=",2*=V`z?[6.AJ=AMACA4"><field name="VAR">BlueCount</field></block></value></block></value><next><block type="variables_set" id="e%6%x[l]=Pf{Jtuw-GC."><field name="VAR">BlueCount</field><value name="VALUE"><block type="math_arithmetic" id="{.X.|ZZe%vOCewV`w1S~"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="2@HCVbFl{yd`f5sTVbHU"><field name="NUM">1</field></shadow><block type="variables_get" id="d!||iy%H}@6x%+,yi6AS"><field name="VAR">BlueCount</field></block></value><value name="B"><shadow type="math_number" id="M.fbF}iw~7lM)}CKvE[7"><field name="NUM">25</field></shadow></value></block></value></block></next></block></next></block></statement><next><block type="dobot_pump" id=",,~W9cK6Htq=P^pP[|+h"><field name="io">0</field><next><block type="dobot_delaytime" id="%]A%=w(2wOzO8Uy#?3Ot"><value name="time"><shadow type="math_number" id="^gRcCFDB8Y`ApU|v,8De"><field name="NUM">1</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></xml>