From 5406cf8df6d1ac0409df5aa047ac7d27e92d49da Mon Sep 17 00:00:00 2001 From: ft-Demo <fischertechnik-team@fischer.de> Date: Mon, 22 Jul 2024 12:38:04 +0000 Subject: [PATCH] commit by robo pro coding --- lib/machine_learning.blockly | 1275 +++++++++++++++++----------------- lib/machine_learning.py | 3 +- 2 files changed, 635 insertions(+), 643 deletions(-) diff --git a/lib/machine_learning.blockly b/lib/machine_learning.blockly index d717321..8c0992d 100644 --- a/lib/machine_learning.blockly +++ b/lib/machine_learning.blockly @@ -22,7 +22,7 @@ <variable id="`HY5iB~)tSDfkSU6$x{J">key</variable> </variables> <block type="util_python_imports" id="+WMTM_##|ZppmmA/Vv1)" x="0" y="0"> - <field name="value">import base64&#10;import cv2&#10;import numpy as np&#10;from fischertechnik.camera.VideoStream import VideoStream&#10;import subprocess&#10;import datetime&#10;from datetime import datetime</field> + <field name="value">import base64&#10;import cv2&#10;import numpy as np&#10;from fischertechnik.camera.VideoStream import VideoStream&#10;import subprocess&#10;import datetime&#10;from datetime import datetime&#10;</field> </block> <block type="procedures_defnoreturn" id="O(u{V%63EG)8#o`:]GxN" x="0" y="235"> <field name="NAME">thread_blink</field> @@ -215,178 +215,198 @@ <block type="variables_set" id="~bXW+!i/XFB#XFz`/lf:"> <field name="VAR" id="@)jQYU/(*Lsqu6%g^@,h">detector</field> <value name="VALUE"> - <block type="ml_custom_object_detector" id=":O23gw/H]79%B3ef?$ib"> - <field name="path">/opt/ft/workspaces/machine-learning-user/models/sorting_line</field> - <field name="machine_learning_model">model.tflite</field> - <field name="machine_learning_label">labels.txt</field> + <block type="ml_object_detector" id="f%p[#:JHIRk!x;{b#1Kt"> + <field name="machine_learning_model">sorting_line</field> </block> </value> <next> - <block type="util_python" id="#l~-rt82w]n=OCrD}~e4"> - <field name="value">#your python code</field> + <block type="variables_set" id="b(rQ@OfMgaR$L:CVuHU!"> + <field name="VAR" id="*v3+i/mFj_(SiqXS;T4z">ts_process1</field> + <value name="VALUE"> + <block type="util_runtime_measurement" id="Q[I^C(n4ylqpU}8a`eLE"> + <field name="TIME">MILLISECOND</field> + </block> + </value> <next> - <block type="variables_set" id="b(rQ@OfMgaR$L:CVuHU!"> - <field name="VAR" id="*v3+i/mFj_(SiqXS;T4z">ts_process1</field> + <block type="variables_set" id="#*KFY85he=|#9(#[Z{C?"> + <field name="VAR" id="fv0q,}14uM9n|i$/[OPZ">led_on</field> <value name="VALUE"> - <block type="util_runtime_measurement" id="Q[I^C(n4ylqpU}8a`eLE"> - <field name="TIME">MILLISECOND</field> + <block type="logic_boolean" id="Un,JjJk4vB%X@`+lPC-E"> + <field name="BOOL">TRUE</field> </block> </value> <next> - <block type="variables_set" id="#*KFY85he=|#9(#[Z{C?"> - <field name="VAR" id="fv0q,}14uM9n|i$/[OPZ">led_on</field> + <block type="variables_set" id=":f=7C@36eK_|IFiP7N]K"> + <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> <value name="VALUE"> - <block type="logic_boolean" id="Un,JjJk4vB%X@`+lPC-E"> - <field name="BOOL">TRUE</field> + <block type="ml_process_image" id="aN2cKnglaid?@tBZVbzn"> + <value name="image_field"> + <shadow type="camera_get_frame" id="SY8)MnH-6iofu7bP}c-v"> + <field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-.[.Yo}=Loo#hh0Ws+A]i</field> + </shadow> + <block type="variables_get" id="G}KP@4[0,irjl_h-l%C/"> + <field name="VAR" id="CJ^MuI5;9fwX$M8[HX9-">frame</field> + </block> + </value> + <value name="name"> + <block type="variables_get" id="~3*[73P/u0|t(j-G4+(b"> + <field name="VAR" id="@)jQYU/(*Lsqu6%g^@,h">detector</field> + </block> + </value> </block> </value> <next> - <block type="variables_set" id=":f=7C@36eK_|IFiP7N]K"> - <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> + <block type="variables_set" id="FdaXr[Ctgh6iTJ+uSJ`E"> + <field name="VAR" id="fv0q,}14uM9n|i$/[OPZ">led_on</field> <value name="VALUE"> - <block type="ml_process_image" id="aN2cKnglaid?@tBZVbzn"> - <value name="image_field"> - <shadow type="camera_get_frame" id="SY8)MnH-6iofu7bP}c-v"> - <field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-.[.Yo}=Loo#hh0Ws+A]i</field> - </shadow> - <block type="variables_get" id="G}KP@4[0,irjl_h-l%C/"> - <field name="VAR" id="CJ^MuI5;9fwX$M8[HX9-">frame</field> - </block> - </value> - <value name="name"> - <block type="variables_get" id="~3*[73P/u0|t(j-G4+(b"> - <field name="VAR" id="@)jQYU/(*Lsqu6%g^@,h">detector</field> - </block> - </value> + <block type="logic_boolean" id="!QEsV]$0ZyChj,JKn7bf"> + <field name="BOOL">FALSE</field> </block> </value> <next> - <block type="variables_set" id="FdaXr[Ctgh6iTJ+uSJ`E"> - <field name="VAR" id="fv0q,}14uM9n|i$/[OPZ">led_on</field> + <block type="variables_set" id="aPsr-4{2xXNH}/)*o6q*"> + <field name="VAR" id="w(-[lMt2+)@cI?Cde[#v">ts_process</field> <value name="VALUE"> - <block type="logic_boolean" id="!QEsV]$0ZyChj,JKn7bf"> - <field name="BOOL">FALSE</field> + <block type="util_runtime_measurement" id="_5Z?!swR:?A_pV=NmS{L"> + <field name="TIME">MILLISECOND</field> </block> </value> <next> - <block type="variables_set" id="aPsr-4{2xXNH}/)*o6q*"> - <field name="VAR" id="w(-[lMt2+)@cI?Cde[#v">ts_process</field> - <value name="VALUE"> - <block type="util_runtime_measurement" id="_5Z?!swR:?A_pV=NmS{L"> - <field name="TIME">MILLISECOND</field> - </block> - </value> - <next> - <block type="text_print" id="(}TN#9`BM}e31Cq_3rv1"> - <value name="TEXT"> - <shadow type="text" id="{(xbw#p?TA#Kd(y`i8cj"> - <field name="TEXT"/> + <block type="text_print" id="(}TN#9`BM}e31Cq_3rv1"> + <value name="TEXT"> + <shadow type="text" id="{(xbw#p?TA#Kd(y`i8cj"> + <field name="TEXT"/> + </shadow> + <block type="text_format" id="9sZz4gFpj.3Vu@IaotX,"> + <mutation items="2"/> + <value name="value"> + <shadow type="text" id="!JX[zT^~WD4LPKnVbd:K"> + <field name="TEXT">processing time: {:.0f} ms {:.0f} ms</field> </shadow> - <block type="text_format" id="9sZz4gFpj.3Vu@IaotX,"> - <mutation items="2"/> - <value name="value"> - <shadow type="text" id="!JX[zT^~WD4LPKnVbd:K"> - <field name="TEXT">processing time: {:.0f} ms {:.0f} ms</field> - </shadow> + </value> + <value name="ADD0"> + <block type="math_arithmetic" id="t2)x:T^Vs:-_%hf0zLmS"> + <field name="OP">MINUS</field> + <value name="A"> + <block type="variables_get" id="1i.1;zTb#)mo}B@X+*b9"> + <field name="VAR" id="*v3+i/mFj_(SiqXS;T4z">ts_process1</field> + </block> </value> - <value name="ADD0"> - <block type="math_arithmetic" id="t2)x:T^Vs:-_%hf0zLmS"> - <field name="OP">MINUS</field> - <value name="A"> - <block type="variables_get" id="1i.1;zTb#)mo}B@X+*b9"> - <field name="VAR" id="*v3+i/mFj_(SiqXS;T4z">ts_process1</field> - </block> - </value> - <value name="B"> - <block type="variables_get" id="-.sVUsR]~c5ZT}3r*i{S"> - <field name="VAR" id="q9U7]4fo@I.#!kC|dqiJ">ts_process0</field> - </block> - </value> + <value name="B"> + <block type="variables_get" id="-.sVUsR]~c5ZT}3r*i{S"> + <field name="VAR" id="q9U7]4fo@I.#!kC|dqiJ">ts_process0</field> </block> </value> - <value name="ADD1"> - <block type="math_arithmetic" id="X;G4+xtjRYNh+7Rip!};"> - <field name="OP">MINUS</field> - <value name="A"> - <block type="variables_get" id="DF69Ag[C:rA;31[lhkX?"> - <field name="VAR" id="w(-[lMt2+)@cI?Cde[#v">ts_process</field> - </block> - </value> - <value name="B"> - <block type="variables_get" id="#P/ZX]T`et-,[)USL-}x"> - <field name="VAR" id="*v3+i/mFj_(SiqXS;T4z">ts_process1</field> - </block> - </value> + </block> + </value> + <value name="ADD1"> + <block type="math_arithmetic" id="X;G4+xtjRYNh+7Rip!};"> + <field name="OP">MINUS</field> + <value name="A"> + <block type="variables_get" id="DF69Ag[C:rA;31[lhkX?"> + <field name="VAR" id="w(-[lMt2+)@cI?Cde[#v">ts_process</field> + </block> + </value> + <value name="B"> + <block type="variables_get" id="#P/ZX]T`et-,[)USL-}x"> + <field name="VAR" id="*v3+i/mFj_(SiqXS;T4z">ts_process1</field> </block> </value> </block> </value> + </block> + </value> + <next> + <block type="variables_set" id="[!7]+9G{Mog!wDJaWleV"> + <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> + <value name="VALUE"> + <block type="procedures_callreturn" id="(ZH6.fWpqVI=ldMb.12#"> + <mutation name="get_color"/> + </block> + </value> <next> - <block type="variables_set" id="[!7]+9G{Mog!wDJaWleV"> - <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> - <value name="VALUE"> - <block type="procedures_callreturn" id="(ZH6.fWpqVI=ldMb.12#"> - <mutation name="get_color"/> - </block> + <block type="output_led_set_value" id="@bUwjq0)~R{1HLmTBRZx"> + <field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-:^baCXt_)quR(#FAUAv_</field> + <value name="value"> + <shadow type="output_number" id="p6Vq:R:u~G3jCOfmE{LU"> + <field name="OUTPUT_NUM">0</field> + </shadow> </value> <next> - <block type="output_led_set_value" id="@bUwjq0)~R{1HLmTBRZx"> - <field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-:^baCXt_)quR(#FAUAv_</field> - <value name="value"> - <shadow type="output_number" id="p6Vq:R:u~G3jCOfmE{LU"> - <field name="OUTPUT_NUM">0</field> + <block type="text_print" id="d~Guw=zs12NZv:gH|((e"> + <value name="TEXT"> + <shadow type="text" id="lW~COtg}*(gufDqoC_0P"> + <field name="TEXT"/> </shadow> + <block type="variables_get" id="s%=7$5Zp(Y|9a/rQiEBI"> + <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> + </block> </value> <next> - <block type="text_print" id="d~Guw=zs12NZv:gH|((e"> - <value name="TEXT"> - <shadow type="text" id="lW~COtg}*(gufDqoC_0P"> - <field name="TEXT"/> - </shadow> - <block type="variables_get" id="s%=7$5Zp(Y|9a/rQiEBI"> - <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> + <block type="controls_if" id="qd:Q7d,ad;:3b6BO7ZlS"> + <mutation elseif="0" else="1"/> + <value name="IF0"> + <block type="logic_compare" id="%?VLz{SnBWM*26lrKz_{"> + <field name="OP">GT</field> + <value name="A"> + <block type="lists_length" id="Y962._?XZ_bbI=BBKXf7"> + <value name="VALUE"> + <block type="variables_get" id="Uud53Z:IPu!(eO?oLV;f"> + <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> + </block> + </value> + </block> + </value> + <value name="B"> + <block type="math_number" id="5`W;$+tg6NoFe[JC:s!`"> + <field name="NUM">0</field> + </block> + </value> </block> </value> - <next> - <block type="controls_if" id="qd:Q7d,ad;:3b6BO7ZlS"> - <mutation elseif="0" else="1"/> - <value name="IF0"> - <block type="logic_compare" id="%?VLz{SnBWM*26lrKz_{"> - <field name="OP">GT</field> - <value name="A"> - <block type="lists_length" id="Y962._?XZ_bbI=BBKXf7"> + <statement name="DO0"> + <block type="variables_set" id="_Qg9=KJq8H{s:{[lGhS-"> + <field name="VAR" id="U?|s~I:}0om0E]fkgr!F">prob</field> + <value name="VALUE"> + <block type="ml_get_property_of_object" id="Hf#xw*+#.S/%rn6gy-7M"> + <field name="property_name">probability</field> + <value name="machine_learning_result"> + <block type="lists_getIndex" id="xN//_V%4W[m4m%)S17/m"> + <mutation statement="false" at="true"/> + <field name="MODE">GET</field> + <field name="WHERE">FROM_START</field> <value name="VALUE"> - <block type="variables_get" id="Uud53Z:IPu!(eO?oLV;f"> + <block type="variables_get" id="+uEC8][8*rTZy.[NGFEM"> <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> </block> </value> - </block> - </value> - <value name="B"> - <block type="math_number" id="5`W;$+tg6NoFe[JC:s!`"> - <field name="NUM">0</field> + <value name="AT"> + <block type="math_number" id="aXr1L,/})afryWp!,~+l"> + <field name="NUM">1</field> + </block> + </value> </block> </value> </block> </value> - <statement name="DO0"> - <block type="variables_set" id="_Qg9=KJq8H{s:{[lGhS-"> - <field name="VAR" id="U?|s~I:}0om0E]fkgr!F">prob</field> + <next> + <block type="variables_set" id="J_-MF$/F:pIId@Kfz[xN"> + <field name="VAR" id="SoO95v2EGel7E?4#$Hl0">pos</field> <value name="VALUE"> - <block type="ml_get_property_of_object" id="Hf#xw*+#.S/%rn6gy-7M"> - <field name="property_name">probability</field> + <block type="ml_get_property_of_object" id="8L[0(Nt?#~=D![r$-?-("> + <field name="property_name">position</field> <value name="machine_learning_result"> - <block type="lists_getIndex" id="xN//_V%4W[m4m%)S17/m"> + <block type="lists_getIndex" id="Tc_!VaimCYz=M$M($JhB"> <mutation statement="false" at="true"/> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> - <block type="variables_get" id="+uEC8][8*rTZy.[NGFEM"> + <block type="variables_get" id="9$)e(w0EcZT)iyhIFll:"> <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> </block> </value> <value name="AT"> - <block type="math_number" id="aXr1L,/})afryWp!,~+l"> + <block type="math_number" id=".Q==^0FJ6B(K,X3kUz=P"> <field name="NUM">1</field> </block> </value> @@ -395,23 +415,23 @@ </block> </value> <next> - <block type="variables_set" id="J_-MF$/F:pIId@Kfz[xN"> - <field name="VAR" id="SoO95v2EGel7E?4#$Hl0">pos</field> + <block type="variables_set" id="jr{g{orG)4~]_CNe|ejI"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> <value name="VALUE"> - <block type="ml_get_property_of_object" id="8L[0(Nt?#~=D![r$-?-("> - <field name="property_name">position</field> + <block type="ml_get_property_of_object" id="pi!X~`CDI()=J[bp,P2("> + <field name="property_name">label</field> <value name="machine_learning_result"> - <block type="lists_getIndex" id="Tc_!VaimCYz=M$M($JhB"> + <block type="lists_getIndex" id="q-W.mx}=|,7%P,fB6ph,"> <mutation statement="false" at="true"/> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> - <block type="variables_get" id="9$)e(w0EcZT)iyhIFll:"> + <block type="variables_get" id="=={2-q*HG2XAR8o5StYc"> <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> </block> </value> <value name="AT"> - <block type="math_number" id=".Q==^0FJ6B(K,X3kUz=P"> + <block type="math_number" id="Q^M|(gQsiQVb*[gZV3l3"> <field name="NUM">1</field> </block> </value> @@ -420,590 +440,563 @@ </block> </value> <next> - <block type="variables_set" id="jr{g{orG)4~]_CNe|ejI"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + <block type="variables_set" id="ly{NP*Lk1u@CGkR8|#3y"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> <value name="VALUE"> - <block type="ml_get_property_of_object" id="pi!X~`CDI()=J[bp,P2("> - <field name="property_name">label</field> - <value name="machine_learning_result"> - <block type="lists_getIndex" id="q-W.mx}=|,7%P,fB6ph,"> - <mutation statement="false" at="true"/> - <field name="MODE">GET</field> - <field name="WHERE">FROM_START</field> + <block type="text" id="7fnl_}#MltxvbtmKHUJV"> + <field name="TEXT"/> + </block> + </value> + <next> + <block type="controls_if" id="79^wiu[9@qS1WQJsM6f7"> + <mutation elseif="7" else="1"/> + <value name="IF0"> + <block type="logic_compare" id="te%=zEFb8Tg8_$}hPV}r"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="90Rkn^yqM${fGAsDE3R_"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + </block> + </value> + <value name="B"> + <block type="text" id="en~L9tx]lE6_}gcGop{{"> + <field name="TEXT">CRACK</field> + </block> + </value> + </block> + </value> + <statement name="DO0"> + <block type="variables_set" id="/epV!%Q].r29hk=`,qK{"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> <value name="VALUE"> - <block type="variables_get" id="=={2-q*HG2XAR8o5StYc"> - <field name="VAR" id="jt)/EBP];p:5yh1/0ti?">result</field> + <block type="text" id="a}=~QoC_fg(HRn6bB=Mo"> + <field name="TEXT">Cracks in Workpiece</field> </block> </value> - <value name="AT"> - <block type="math_number" id="Q^M|(gQsiQVb*[gZV3l3"> - <field name="NUM">1</field> + </block> + </statement> + <value name="IF1"> + <block type="logic_compare" id="6VXi5[1tNruXHC^o-Hg6"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="9LeZrtQaejGRY_~y++ON"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + </block> + </value> + <value name="B"> + <block type="text" id="7j!V(clHmz2iLEzN$$E6"> + <field name="TEXT">MIPO1</field> </block> </value> </block> </value> - </block> - </value> - <next> - <block type="variables_set" id="ly{NP*Lk1u@CGkR8|#3y"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="7fnl_}#MltxvbtmKHUJV"> - <field name="TEXT"/> + <statement name="DO1"> + <block type="variables_set" id="csg?,Vfd?~=BH$Z+F^Yw"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="text" id="_My{laH?Kflf3R]#7U_]"> + <field name="TEXT">1x milled pocket</field> + </block> + </value> + </block> + </statement> + <value name="IF2"> + <block type="logic_compare" id="TFWcj?)iJU;MDJ`Gf4r+"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="0KATCfM++x`?:MPrPXII"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + </block> + </value> + <value name="B"> + <block type="text" id="7X6pZrwhlJ-l58)9kdIw"> + <field name="TEXT">MIPO2</field> + </block> + </value> </block> </value> - <next> - <block type="controls_if" id="79^wiu[9@qS1WQJsM6f7"> - <mutation elseif="7" else="1"/> - <value name="IF0"> - <block type="logic_compare" id="te%=zEFb8Tg8_$}hPV}r"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="90Rkn^yqM${fGAsDE3R_"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="en~L9tx]lE6_}gcGop{{"> - <field name="TEXT">CRACK</field> - </block> - </value> + <statement name="DO2"> + <block type="variables_set" id=",%C/Ood]%Hf!:Y90xeD}"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="text" id="wiK!YRZp_BvYO8q8m@;z"> + <field name="TEXT">2x milled pocket</field> </block> </value> - <statement name="DO0"> - <block type="variables_set" id="/epV!%Q].r29hk=`,qK{"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="a}=~QoC_fg(HRn6bB=Mo"> - <field name="TEXT">Cracks in Workpiece</field> - </block> - </value> + </block> + </statement> + <value name="IF3"> + <block type="logic_compare" id="ZLD~EeKlf%YvR:R4Stg]"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="NI8bAQ/AR0c4aQ[s+-=m"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> - </statement> - <value name="IF1"> - <block type="logic_compare" id="6VXi5[1tNruXHC^o-Hg6"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="9LeZrtQaejGRY_~y++ON"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="7j!V(clHmz2iLEzN$$E6"> - <field name="TEXT">MIPO1</field> - </block> - </value> + </value> + <value name="B"> + <block type="text" id="|`gEI+!^yS^]gy:8cXpa"> + <field name="TEXT">BOHO</field> </block> </value> - <statement name="DO1"> - <block type="variables_set" id="csg?,Vfd?~=BH$Z+F^Yw"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="_My{laH?Kflf3R]#7U_]"> - <field name="TEXT">1x milled pocket</field> - </block> - </value> + </block> + </value> + <statement name="DO3"> + <block type="variables_set" id="YiKYa+gg:95%3DyK0SH#"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="text" id="h=F@=KSVvXH}7,aiW6G2"> + <field name="TEXT">Round hole</field> </block> - </statement> - <value name="IF2"> - <block type="logic_compare" id="TFWcj?)iJU;MDJ`Gf4r+"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="0KATCfM++x`?:MPrPXII"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="7X6pZrwhlJ-l58)9kdIw"> - <field name="TEXT">MIPO2</field> - </block> - </value> + </value> + </block> + </statement> + <value name="IF4"> + <block type="logic_compare" id="Z?gvO7v8A=_+oFlXw/=c"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="2K3P,oYHwrR5+t]kTh$~"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> </value> - <statement name="DO2"> - <block type="variables_set" id=",%C/Ood]%Hf!:Y90xeD}"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="wiK!YRZp_BvYO8q8m@;z"> - <field name="TEXT">2x milled pocket</field> - </block> - </value> + <value name="B"> + <block type="text" id="!/8K^{9!Su7f,d9`ELZV"> + <field name="TEXT">BOHOEL</field> </block> - </statement> - <value name="IF3"> - <block type="logic_compare" id="ZLD~EeKlf%YvR:R4Stg]"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="NI8bAQ/AR0c4aQ[s+-=m"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="|`gEI+!^yS^]gy:8cXpa"> - <field name="TEXT">BOHO</field> - </block> - </value> + </value> + </block> + </value> + <statement name="DO4"> + <block type="variables_set" id="qp70Xb2IE~SkP/%9eJ=C"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="text" id="hkl9zbs4,Dw$s{`j~D@_"> + <field name="TEXT">Hole elyptical</field> </block> </value> - <statement name="DO3"> - <block type="variables_set" id="YiKYa+gg:95%3DyK0SH#"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="h=F@=KSVvXH}7,aiW6G2"> - <field name="TEXT">Round hole</field> - </block> - </value> + </block> + </statement> + <value name="IF5"> + <block type="logic_compare" id="S`6ivv4XAV}@5QydqqvG"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="L{c2{q*GZB5YmZTqjBBz"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> - </statement> - <value name="IF4"> - <block type="logic_compare" id="Z?gvO7v8A=_+oFlXw/=c"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="2K3P,oYHwrR5+t]kTh$~"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="!/8K^{9!Su7f,d9`ELZV"> - <field name="TEXT">BOHOEL</field> - </block> - </value> + </value> + <value name="B"> + <block type="text" id=",rm}-];PFFm84w`,I=PF"> + <field name="TEXT">BOHOMIPO1</field> </block> </value> - <statement name="DO4"> - <block type="variables_set" id="qp70Xb2IE~SkP/%9eJ=C"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="hkl9zbs4,Dw$s{`j~D@_"> - <field name="TEXT">Hole elyptical</field> - </block> - </value> + </block> + </value> + <statement name="DO5"> + <block type="variables_set" id="iZr=lW@Sh.J$%_u@Hz+R"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="text" id="w152tku}irb]fKNS^7Jt"> + <field name="TEXT">Hole and 1x milled pocket</field> </block> - </statement> - <value name="IF5"> - <block type="logic_compare" id="S`6ivv4XAV}@5QydqqvG"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="L{c2{q*GZB5YmZTqjBBz"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id=",rm}-];PFFm84w`,I=PF"> - <field name="TEXT">BOHOMIPO1</field> - </block> - </value> + </value> + </block> + </statement> + <value name="IF6"> + <block type="logic_compare" id="71)pb^dX_V|b^8f4C!SA"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="I=)0YD80~vp9z52r|GLD"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> </value> - <statement name="DO5"> - <block type="variables_set" id="iZr=lW@Sh.J$%_u@Hz+R"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="w152tku}irb]fKNS^7Jt"> - <field name="TEXT">Hole and 1x milled pocket</field> - </block> - </value> + <value name="B"> + <block type="text" id="(M3B.I{$Y#k2aP5FM9_@"> + <field name="TEXT">BOHOMIPO2</field> </block> - </statement> - <value name="IF6"> - <block type="logic_compare" id="71)pb^dX_V|b^8f4C!SA"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="I=)0YD80~vp9z52r|GLD"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> + </value> + </block> + </value> + <statement name="DO6"> + <block type="variables_set" id="Y?$G{OE0V,-8yKQa^USI"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="text" id="ZTAcc1NKU)L%g|U8`!41"> + <field name="TEXT">Hole and 2x milled pocket</field> + </block> + </value> + </block> + </statement> + <value name="IF7"> + <block type="logic_compare" id="{U4)GKqk,ex?aRm{Exc1"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="WT5K]PLzHFrVx()n;(kv"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + </block> + </value> + <value name="B"> + <block type="text" id="1qUa*A}1}?.I!}}apv=l"> + <field name="TEXT">BLANK</field> + </block> + </value> + </block> + </value> + <statement name="DO7"> + <block type="variables_set" id="6olC]f[$#MMLnu7fGwTE"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="text" id="/sd/j!c~{^LdIK_5FxG."> + <field name="TEXT">Workpiece without features</field> + </block> + </value> + </block> + </statement> + <statement name="ELSE"> + <block type="variables_set" id="PG~ZY*9EAy5D}19Kz+|U"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> + <value name="VALUE"> + <block type="variables_get" id="Nnq{iqQVbKl{Z?H@Yhu?"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + </block> + </value> + </block> + </statement> + <next> + <block type="text_print" id="[@cK6p0_u_x}J(w_,|ig"> + <value name="TEXT"> + <shadow type="text" id="4gUGv2MQUq3uAwU%B?]e"> + <field name="TEXT"/> + </shadow> + <block type="text_format" id="@[cW|ed`ORS;w%:S}8fF"> + <mutation items="6"/> + <value name="value"> + <shadow type="text" id="IRi,$={Swle{?Nv!SM^)"> + <field name="TEXT">{} {} {} {} {} {}</field> + </shadow> </value> - <value name="B"> - <block type="text" id="(M3B.I{$Y#k2aP5FM9_@"> - <field name="TEXT">BOHOMIPO2</field> + <value name="ADD0"> + <block type="variables_get" id="C|A2N3nXAh6*|C#qhttZ"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> </value> - </block> - </value> - <statement name="DO6"> - <block type="variables_set" id="Y?$G{OE0V,-8yKQa^USI"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="ZTAcc1NKU)L%g|U8`!41"> - <field name="TEXT">Hole and 2x milled pocket</field> + <value name="ADD1"> + <block type="variables_get" id="D2_ZF8Amh)apk@kMkRqs"> + <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> </block> </value> - </block> - </statement> - <value name="IF7"> - <block type="logic_compare" id="{U4)GKqk,ex?aRm{Exc1"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="WT5K]PLzHFrVx()n;(kv"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + <value name="ADD2"> + <block type="variables_get" id="ss!@Qb4zjXd%A{$(20F%"> + <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> </block> </value> - <value name="B"> - <block type="text" id="1qUa*A}1}?.I!}}apv=l"> - <field name="TEXT">BLANK</field> + <value name="ADD3"> + <block type="variables_get" id="O/[y;]T_L5l~Q$.L`j?V"> + <field name="VAR" id="U?|s~I:}0om0E]fkgr!F">prob</field> </block> </value> - </block> - </value> - <statement name="DO7"> - <block type="variables_set" id="6olC]f[$#MMLnu7fGwTE"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="text" id="/sd/j!c~{^LdIK_5FxG."> - <field name="TEXT">Workpiece without features</field> + <value name="ADD4"> + <block type="variables_get" id="Z7.Yh[M(IlR{g|o!B(S|"> + <field name="VAR" id="SoO95v2EGel7E?4#$Hl0">pos</field> </block> </value> - </block> - </statement> - <statement name="ELSE"> - <block type="variables_set" id="PG~ZY*9EAy5D}19Kz+|U"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - <value name="VALUE"> - <block type="variables_get" id="Nnq{iqQVbKl{Z?H@Yhu?"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> + <value name="ADD5"> + <block type="variables_get" id="7k`FrT7G(iULpQeZtN$0"> + <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> </block> </value> </block> - </statement> + </value> <next> - <block type="text_print" id="[@cK6p0_u_x}J(w_,|ig"> - <value name="TEXT"> - <shadow type="text" id="4gUGv2MQUq3uAwU%B?]e"> - <field name="TEXT"/> - </shadow> - <block type="text_format" id="@[cW|ed`ORS;w%:S}8fF"> - <mutation items="6"/> - <value name="value"> - <shadow type="text" id="IRi,$={Swle{?Nv!SM^)"> - <field name="TEXT">{} {} {} {} {} {}</field> - </shadow> - </value> - <value name="ADD0"> - <block type="variables_get" id="C|A2N3nXAh6*|C#qhttZ"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="ADD1"> - <block type="variables_get" id="D2_ZF8Amh)apk@kMkRqs"> - <field name="VAR" id="wHWCF=ShzvKw(z[Su;%j">keytext</field> - </block> - </value> - <value name="ADD2"> - <block type="variables_get" id="ss!@Qb4zjXd%A{$(20F%"> - <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> - </block> - </value> - <value name="ADD3"> - <block type="variables_get" id="O/[y;]T_L5l~Q$.L`j?V"> - <field name="VAR" id="U?|s~I:}0om0E]fkgr!F">prob</field> - </block> - </value> - <value name="ADD4"> - <block type="variables_get" id="Z7.Yh[M(IlR{g|o!B(S|"> - <field name="VAR" id="SoO95v2EGel7E?4#$Hl0">pos</field> - </block> - </value> - <value name="ADD5"> - <block type="variables_get" id="7k`FrT7G(iULpQeZtN$0"> - <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> - </block> - </value> - </block> - </value> - <next> - <block type="controls_if" id=";a]y5_R#7-];k?vn%:5d"> - <mutation elseif="2" else="1"/> - <value name="IF0"> - <block type="logic_operation" id="}])j]GX8!(oH/QZNS$(8" inline="false"> - <field name="OP">AND</field> + <block type="controls_if" id=";a]y5_R#7-];k?vn%:5d"> + <mutation elseif="2" else="1"/> + <value name="IF0"> + <block type="logic_operation" id="}])j]GX8!(oH/QZNS$(8" inline="false"> + <field name="OP">AND</field> + <value name="A"> + <block type="logic_compare" id="+sGW*hc2Q``^K_Q8I6ka"> + <field name="OP">EQ</field> <value name="A"> - <block type="logic_compare" id="+sGW*hc2Q``^K_Q8I6ka"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="mnH6_fAs{9Z(r(v:WdCD"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="`sma9@uct(szFf?bvtlh"> - <field name="TEXT">BOHO</field> - </block> - </value> + <block type="variables_get" id="mnH6_fAs{9Z(r(v:WdCD"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> </value> <value name="B"> - <block type="logic_compare" id="OCqg)f@],X=6ln!SxQ3["> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="`ovjbyahzJ1c5jsN{WPd"> - <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> - </block> - </value> - <value name="B"> - <block type="math_number" id="YhqABH8SRQ^GHj(ney`E"> - <field name="NUM">1</field> - </block> - </value> + <block type="text" id="`sma9@uct(szFf?bvtlh"> + <field name="TEXT">BOHO</field> </block> </value> </block> </value> - <statement name="DO0"> - <block type="variables_set" id="S=w^glyt3hunu/2J!3YZ"> - <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> - <value name="VALUE"> - <block type="math_number" id="WE0A42NhQ4)`POylObZu"> + <value name="B"> + <block type="logic_compare" id="OCqg)f@],X=6ln!SxQ3["> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="`ovjbyahzJ1c5jsN{WPd"> + <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> + </block> + </value> + <value name="B"> + <block type="math_number" id="YhqABH8SRQ^GHj(ney`E"> <field name="NUM">1</field> </block> </value> + </block> + </value> + </block> + </value> + <statement name="DO0"> + <block type="variables_set" id="S=w^glyt3hunu/2J!3YZ"> + <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> + <value name="VALUE"> + <block type="math_number" id="WE0A42NhQ4)`POylObZu"> + <field name="NUM">1</field> + </block> + </value> + <next> + <block type="display_set_status_indicator_active" id="6$x,,/z2[p28^c+KU!ZY"> + <field name="instance_name">red</field> + <value name="value"> + <shadow type="logic_boolean" id="sCd4J#:_wQ{NCK3[#M]3"> + <field name="BOOL">TRUE</field> + </shadow> + </value> <next> - <block type="display_set_status_indicator_active" id="6$x,,/z2[p28^c+KU!ZY"> - <field name="instance_name">red</field> + <block type="display_set_label_text" id="!onbx=.a!{o,e6k8KlL+"> + <field name="instance_name">part_pass_fail</field> <value name="value"> - <shadow type="logic_boolean" id="sCd4J#:_wQ{NCK3[#M]3"> - <field name="BOOL">TRUE</field> + <shadow type="text" id="fT-z7Mw|Vw|u3d.GiR$L"> + <field name="TEXT">Workpiece PASSED</field> </shadow> - </value> - <next> - <block type="display_set_label_text" id="!onbx=.a!{o,e6k8KlL+"> - <field name="instance_name">part_pass_fail</field> - <value name="value"> - <shadow type="text" id="fT-z7Mw|Vw|u3d.GiR$L"> - <field name="TEXT">Workpiece PASSED</field> - </shadow> - <block type="procedures_callreturn" id="n?bM|@kx3H;wMT4[e}6~"> - <mutation name="containInHTML"> - <arg name="tag"/> - <arg name="value"/> - </mutation> - <value name="ARG0"> - <block type="text" id="NKO?-]!W;,=^u5][J4$M"> - <field name="TEXT">b</field> - </block> - </value> - <value name="ARG1"> - <block type="text" id="glzi!G/pxa!ZP#*rOkR^"> - <field name="TEXT">Workpiece <font color='#88ff88'> PASSED</font></field> - </block> - </value> + <block type="procedures_callreturn" id="n?bM|@kx3H;wMT4[e}6~"> + <mutation name="containInHTML"> + <arg name="tag"/> + <arg name="value"/> + </mutation> + <value name="ARG0"> + <block type="text" id="NKO?-]!W;,=^u5][J4$M"> + <field name="TEXT">b</field> + </block> + </value> + <value name="ARG1"> + <block type="text" id="glzi!G/pxa!ZP#*rOkR^"> + <field name="TEXT">Workpiece <font color='#88ff88'> PASSED</font></field> </block> </value> </block> - </next> + </value> </block> </next> </block> - </statement> - <value name="IF1"> - <block type="logic_operation" id="}8*{@lrrRqzN2e_o@MvC" inline="false"> - <field name="OP">AND</field> + </next> + </block> + </statement> + <value name="IF1"> + <block type="logic_operation" id="}8*{@lrrRqzN2e_o@MvC" inline="false"> + <field name="OP">AND</field> + <value name="A"> + <block type="logic_compare" id="|topJc$Kakx`o$KvMxiK"> + <field name="OP">EQ</field> <value name="A"> - <block type="logic_compare" id="|topJc$Kakx`o$KvMxiK"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="nQJ~A%+4L41JU$A8)kZ,"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="8[tDXl:f+fES-:3!v)em"> - <field name="TEXT">MIPO2</field> - </block> - </value> + <block type="variables_get" id="nQJ~A%+4L41JU$A8)kZ,"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> </value> <value name="B"> - <block type="logic_compare" id="0|?p=`_:0n(pe-9]n+%C"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id=")]wKGM?Jx+o8~3,[0Myy"> - <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> - </block> - </value> - <value name="B"> - <block type="math_number" id="2srnFl}l#6FvJ1~dctI1"> - <field name="NUM">2</field> - </block> - </value> + <block type="text" id="8[tDXl:f+fES-:3!v)em"> + <field name="TEXT">MIPO2</field> </block> </value> </block> </value> - <statement name="DO1"> - <block type="variables_set" id="Y`-5O)u-lfIP=%8j-Q=|"> - <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> - <value name="VALUE"> - <block type="math_number" id="in)j.vhx:.}_uDU|-%~?"> + <value name="B"> + <block type="logic_compare" id="0|?p=`_:0n(pe-9]n+%C"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id=")]wKGM?Jx+o8~3,[0Myy"> + <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> + </block> + </value> + <value name="B"> + <block type="math_number" id="2srnFl}l#6FvJ1~dctI1"> <field name="NUM">2</field> </block> </value> + </block> + </value> + </block> + </value> + <statement name="DO1"> + <block type="variables_set" id="Y`-5O)u-lfIP=%8j-Q=|"> + <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> + <value name="VALUE"> + <block type="math_number" id="in)j.vhx:.}_uDU|-%~?"> + <field name="NUM">2</field> + </block> + </value> + <next> + <block type="display_set_status_indicator_active" id="Yf_En3*V+~@QwZ6wc3E*"> + <field name="instance_name">red</field> + <value name="value"> + <shadow type="logic_boolean" id="bRS92`MVPI[--8?40=]+"> + <field name="BOOL">TRUE</field> + </shadow> + </value> <next> - <block type="display_set_status_indicator_active" id="Yf_En3*V+~@QwZ6wc3E*"> - <field name="instance_name">red</field> + <block type="display_set_label_text" id="yI6VZytg9HieFLhUi7p{"> + <field name="instance_name">part_pass_fail</field> <value name="value"> - <shadow type="logic_boolean" id="bRS92`MVPI[--8?40=]+"> - <field name="BOOL">TRUE</field> + <shadow type="text" id="W#}dNagDigU%u.XYoURs"> + <field name="TEXT">Workpiece PASSED</field> </shadow> - </value> - <next> - <block type="display_set_label_text" id="yI6VZytg9HieFLhUi7p{"> - <field name="instance_name">part_pass_fail</field> - <value name="value"> - <shadow type="text" id="W#}dNagDigU%u.XYoURs"> - <field name="TEXT">Workpiece PASSED</field> - </shadow> - <block type="procedures_callreturn" id="},C(.H*E*$Y.fJz9_]JP"> - <mutation name="containInHTML"> - <arg name="tag"/> - <arg name="value"/> - </mutation> - <value name="ARG0"> - <block type="text" id="z[FrF/gm7p9b-[l#+Nyf"> - <field name="TEXT">b</field> - </block> - </value> - <value name="ARG1"> - <block type="text" id="o7UFIi_z7nz{#e$k@)=`"> - <field name="TEXT">Workpiece <font color='#88ff88'> PASSED</font></field> - </block> - </value> + <block type="procedures_callreturn" id="},C(.H*E*$Y.fJz9_]JP"> + <mutation name="containInHTML"> + <arg name="tag"/> + <arg name="value"/> + </mutation> + <value name="ARG0"> + <block type="text" id="z[FrF/gm7p9b-[l#+Nyf"> + <field name="TEXT">b</field> + </block> + </value> + <value name="ARG1"> + <block type="text" id="o7UFIi_z7nz{#e$k@)=`"> + <field name="TEXT">Workpiece <font color='#88ff88'> PASSED</font></field> </block> </value> </block> - </next> + </value> </block> </next> </block> - </statement> - <value name="IF2"> - <block type="logic_operation" id="|7]zdsU-pOqAF@5I]8A}" inline="false"> - <field name="OP">AND</field> + </next> + </block> + </statement> + <value name="IF2"> + <block type="logic_operation" id="|7]zdsU-pOqAF@5I]8A}" inline="false"> + <field name="OP">AND</field> + <value name="A"> + <block type="logic_compare" id="NoZ5SkQ?aHF84I+ZPV/D"> + <field name="OP">EQ</field> <value name="A"> - <block type="logic_compare" id="NoZ5SkQ?aHF84I+ZPV/D"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="AN_$Q]*3q|VPvUFF|{0f"> - <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> - </block> - </value> - <value name="B"> - <block type="text" id="z{Ii*`*iWD4YlKOnQ2::"> - <field name="TEXT">BOHOMIPO2</field> - </block> - </value> + <block type="variables_get" id="AN_$Q]*3q|VPvUFF|{0f"> + <field name="VAR" id="`HY5iB~)tSDfkSU6$x{J">key</field> </block> </value> <value name="B"> - <block type="logic_compare" id="$9k42Z0o{!}kguFJEzeU"> - <field name="OP">EQ</field> - <value name="A"> - <block type="variables_get" id="6MFPvOXSe{U5Y{tgSCD5"> - <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> - </block> - </value> - <value name="B"> - <block type="math_number" id="bwf)4l9kA29]5C_S?U$z"> - <field name="NUM">3</field> - </block> - </value> + <block type="text" id="z{Ii*`*iWD4YlKOnQ2::"> + <field name="TEXT">BOHOMIPO2</field> </block> </value> </block> </value> - <statement name="DO2"> - <block type="variables_set" id="={1ViIfvtz:9b}(Hl7ip"> - <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> - <value name="VALUE"> - <block type="math_number" id="1kgE8YvJD;iJ^|vp-KX4"> + <value name="B"> + <block type="logic_compare" id="$9k42Z0o{!}kguFJEzeU"> + <field name="OP">EQ</field> + <value name="A"> + <block type="variables_get" id="6MFPvOXSe{U5Y{tgSCD5"> + <field name="VAR" id="HwpTlkZeV6W7{(QQ1TNz">color</field> + </block> + </value> + <value name="B"> + <block type="math_number" id="bwf)4l9kA29]5C_S?U$z"> <field name="NUM">3</field> </block> </value> + </block> + </value> + </block> + </value> + <statement name="DO2"> + <block type="variables_set" id="={1ViIfvtz:9b}(Hl7ip"> + <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> + <value name="VALUE"> + <block type="math_number" id="1kgE8YvJD;iJ^|vp-KX4"> + <field name="NUM">3</field> + </block> + </value> + <next> + <block type="display_set_status_indicator_active" id="BS~/7~sLM5oW(`@S(eq/"> + <field name="instance_name">blue</field> + <value name="value"> + <shadow type="logic_boolean" id="3HVV%$_B|}+vy.2S-Eij"> + <field name="BOOL">TRUE</field> + </shadow> + </value> <next> - <block type="display_set_status_indicator_active" id="BS~/7~sLM5oW(`@S(eq/"> - <field name="instance_name">blue</field> + <block type="display_set_label_text" id="NFR;[Z|Dbp:41sIDk:o3"> + <field name="instance_name">part_pass_fail</field> <value name="value"> - <shadow type="logic_boolean" id="3HVV%$_B|}+vy.2S-Eij"> - <field name="BOOL">TRUE</field> + <shadow type="text" id="]KJi/aIDClm7kts~O7Px"> + <field name="TEXT">Workpiece PASSED</field> </shadow> - </value> - <next> - <block type="display_set_label_text" id="NFR;[Z|Dbp:41sIDk:o3"> - <field name="instance_name">part_pass_fail</field> - <value name="value"> - <shadow type="text" id="]KJi/aIDClm7kts~O7Px"> - <field name="TEXT">Workpiece PASSED</field> - </shadow> - <block type="procedures_callreturn" id="qZUNEk5^c(#kfK/7L)YF"> - <mutation name="containInHTML"> - <arg name="tag"/> - <arg name="value"/> - </mutation> - <value name="ARG0"> - <block type="text" id="AZ_-SD5t_)}IB)!|/W4V"> - <field name="TEXT">b</field> - </block> - </value> - <value name="ARG1"> - <block type="text" id="SG@,R]=9r8zct3`60@6b"> - <field name="TEXT">Workpiece <font color='#88ff88'> PASSED</font></field> - </block> - </value> + <block type="procedures_callreturn" id="qZUNEk5^c(#kfK/7L)YF"> + <mutation name="containInHTML"> + <arg name="tag"/> + <arg name="value"/> + </mutation> + <value name="ARG0"> + <block type="text" id="AZ_-SD5t_)}IB)!|/W4V"> + <field name="TEXT">b</field> + </block> + </value> + <value name="ARG1"> + <block type="text" id="SG@,R]=9r8zct3`60@6b"> + <field name="TEXT">Workpiece <font color='#88ff88'> PASSED</font></field> </block> </value> </block> - </next> + </value> </block> </next> </block> - </statement> - <statement name="ELSE"> - <block type="variables_set" id=";A*Ggh?5s{_VJ=pSFPFS"> - <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> - <value name="VALUE"> - <block type="math_number" id="7*%xfqy%*]OX%nS+,a{="> - <field name="NUM">4</field> - </block> + </next> + </block> + </statement> + <statement name="ELSE"> + <block type="variables_set" id=";A*Ggh?5s{_VJ=pSFPFS"> + <field name="VAR" id="X4AobCaY/GR}=bot/6?q">num</field> + <value name="VALUE"> + <block type="math_number" id="7*%xfqy%*]OX%nS+,a{="> + <field name="NUM">4</field> + </block> + </value> + <next> + <block type="display_set_status_indicator_active" id="2.PT/@x]P*.DxH5n)n-1"> + <field name="instance_name">fail</field> + <value name="value"> + <shadow type="logic_boolean" id="L8mkZPj(5bs2.OElDH:G"> + <field name="BOOL">TRUE</field> + </shadow> </value> <next> - <block type="display_set_status_indicator_active" id="2.PT/@x]P*.DxH5n)n-1"> - <field name="instance_name">fail</field> + <block type="display_set_label_text" id="6Oh[ihY6SlkCxcDClX1["> + <field name="instance_name">part_pass_fail</field> <value name="value"> - <shadow type="logic_boolean" id="L8mkZPj(5bs2.OElDH:G"> - <field name="BOOL">TRUE</field> + <shadow type="text" id=")qIkm$J`+o*5N@AX[#HF"> + <field name="TEXT">Workpiece FAILED</field> </shadow> - </value> - <next> - <block type="display_set_label_text" id="6Oh[ihY6SlkCxcDClX1["> - <field name="instance_name">part_pass_fail</field> - <value name="value"> - <shadow type="text" id=")qIkm$J`+o*5N@AX[#HF"> - <field name="TEXT">Workpiece FAILED</field> - </shadow> - <block type="procedures_callreturn" id="Qg_$#aGPx-0DQ5/-]p6*"> - <mutation name="containInHTML"> - <arg name="tag"/> - <arg name="value"/> - </mutation> - <value name="ARG0"> - <block type="text" id="mmzz,NZ)PHn}y:.A?$N?"> - <field name="TEXT">b</field> - </block> - </value> - <value name="ARG1"> - <block type="text" id="1CNTg_M?_aP-hc`l-Y8Z"> - <field name="TEXT">Workpiece <font color='#ff8888'>FAILED</font></field> - </block> - </value> + <block type="procedures_callreturn" id="Qg_$#aGPx-0DQ5/-]p6*"> + <mutation name="containInHTML"> + <arg name="tag"/> + <arg name="value"/> + </mutation> + <value name="ARG0"> + <block type="text" id="mmzz,NZ)PHn}y:.A?$N?"> + <field name="TEXT">b</field> + </block> + </value> + <value name="ARG1"> + <block type="text" id="1CNTg_M?_aP-hc`l-Y8Z"> + <field name="TEXT">Workpiece <font color='#ff8888'>FAILED</font></field> </block> </value> </block> - </next> + </value> </block> </next> </block> - </statement> + </next> </block> - </next> + </statement> </block> </next> </block> @@ -1015,56 +1008,56 @@ </block> </next> </block> - </statement> - <statement name="ELSE"> - <block type="display_set_label_text" id="^2Wp253v{^iIga{VFC$Z"> - <field name="instance_name">part_pass_fail</field> - <value name="value"> - <shadow type="text" id="!gYS%Exz[qq={nF-~aXi"> - <field name="TEXT">Workpiece FAILED</field> - </shadow> - <block type="procedures_callreturn" id="BDDY.H-7!89v/kl=zr#K"> - <mutation name="containInHTML"> - <arg name="tag"/> - <arg name="value"/> - </mutation> - <value name="ARG0"> - <block type="text" id="3w5d|4QKR5oh1!@Kav/H"> - <field name="TEXT">b</field> - </block> - </value> - <value name="ARG1"> - <block type="text" id="B45VGJ]0T[m]39k9,[Z2"> - <field name="TEXT">Workpiece <font color='#ff8888'>FAILED</font></field> - </block> - </value> + </next> + </block> + </statement> + <statement name="ELSE"> + <block type="display_set_label_text" id="^2Wp253v{^iIga{VFC$Z"> + <field name="instance_name">part_pass_fail</field> + <value name="value"> + <shadow type="text" id="!gYS%Exz[qq={nF-~aXi"> + <field name="TEXT">Workpiece FAILED</field> + </shadow> + <block type="procedures_callreturn" id="BDDY.H-7!89v/kl=zr#K"> + <mutation name="containInHTML"> + <arg name="tag"/> + <arg name="value"/> + </mutation> + <value name="ARG0"> + <block type="text" id="3w5d|4QKR5oh1!@Kav/H"> + <field name="TEXT">b</field> + </block> + </value> + <value name="ARG1"> + <block type="text" id="B45VGJ]0T[m]39k9,[Z2"> + <field name="TEXT">Workpiece <font color='#ff8888'>FAILED</font></field> </block> </value> </block> - </statement> - <next> - <block type="variables_set" id="4_BqI1:-uMo|hH=N@`L7"> - <field name="VAR" id="lRvcX#xabG?F:$)4BU6W">duration</field> - <value name="VALUE"> - <block type="math_arithmetic" id="Ovqt_({l:i(_I8ImJcHC"> - <field name="OP">MINUS</field> - <value name="A"> - <block type="util_runtime_measurement" id="4{fM#}SEE^!p}%]ysFpt"> - <field name="TIME">MILLISECOND</field> - </block> - </value> - <value name="B"> - <block type="variables_get" id="GFUp.S.))VQ,jj{YSyQ#"> - <field name="VAR" id="lRvcX#xabG?F:$)4BU6W">duration</field> - </block> - </value> + </value> + </block> + </statement> + <next> + <block type="variables_set" id="4_BqI1:-uMo|hH=N@`L7"> + <field name="VAR" id="lRvcX#xabG?F:$)4BU6W">duration</field> + <value name="VALUE"> + <block type="math_arithmetic" id="Ovqt_({l:i(_I8ImJcHC"> + <field name="OP">MINUS</field> + <value name="A"> + <block type="util_runtime_measurement" id="4{fM#}SEE^!p}%]ysFpt"> + <field name="TIME">MILLISECOND</field> </block> </value> - <next> - <block type="procedures_callnoreturn" id="Af5U~UZ`Je-J2_GDW)e5"> - <mutation name="saveFileandPublish"/> + <value name="B"> + <block type="variables_get" id="GFUp.S.))VQ,jj{YSyQ#"> + <field name="VAR" id="lRvcX#xabG?F:$)4BU6W">duration</field> </block> - </next> + </value> + </block> + </value> + <next> + <block type="procedures_callnoreturn" id="Af5U~UZ`Je-J2_GDW)e5"> + <mutation name="saveFileandPublish"/> </block> </next> </block> @@ -1125,7 +1118,7 @@ </block> </value> </block> - <block type="procedures_defnoreturn" id="F@f@v^pR#?_8P}+B#yjS" x="0" y="3708"> + <block type="procedures_defnoreturn" id="F@f@v^pR#?_8P}+B#yjS" x="33" y="3730"> <field name="NAME">reset_inteface</field> <statement name="STACK"> <block type="display_set_label_text" id="Gb347lK3X2ZCZe`V6fnK"> diff --git a/lib/machine_learning.py b/lib/machine_learning.py index 33dd3a1..1dbacef 100644 --- a/lib/machine_learning.py +++ b/lib/machine_learning.py @@ -65,8 +65,7 @@ def MakePictureRunKiReturnFoundPart(): hue = color[0] # range 0-180 sat = color[2] # range 0-255 ts_process0 = (time.time() * 1000) - detector = ObjectDetector('/opt/ft/workspaces/machine-learning-user/models/sorting_line/model.tflite', '/opt/ft/workspaces/machine-learning-user/models/sorting_line/labels.txt') - #your python code + detector = ObjectDetector('/opt/ft/workspaces/machine-learning/object-detection/sorting_line/model.tflite', '/opt/ft/workspaces/machine-learning/object-detection/sorting_line/labels.txt') ts_process1 = (time.time() * 1000) led_on = True result = detector.process_image(frame) -- GitLab