领胜LDS 键盘AOI检测项目
patrick.xu
2022-02-24 3322022068ab818912d6f5d9e5eb31f51cc639c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<hdevelop file_version="1.1" halcon_version="12.0">
<procedure name="M071_Max_Min">
<interface>
<ic>
<par name="INPUT_Params" base_type="ctrl" dimension="0"/>
</ic>
<oc>
<par name="OUTPUT_Result" base_type="ctrl" dimension="0"/>
</oc>
</interface>
<body>
<c>*判断是否有-999</c>
<l>for Index := 0 to |INPUT_Params| - 1 by 1</l>
<l>    if (INPUT_Params[Index] == -999)</l>
<l>        OUTPUT_Result := -999</l>
<l>        return ()</l>
<l>    endif</l>
<l>endfor</l>
<c>*求值</c>
<l>tuple_max (INPUT_Params, Max)</l>
<l>tuple_min (INPUT_Params, Min)</l>
<l>OUTPUT_Result := Max - Min</l>
<l>return ()</l>
</body>
<docu id="M071_Max_Min">
<parameters>
<parameter id="INPUT_Params"/>
<parameter id="OUTPUT_Result"/>
</parameters>
</docu>
</procedure>
</hdevelop>