Repeat the measurement until the result is OK
Overview
Repeat the measurement until the result is OK.
However, it ends as NG when measuring it ten times.
It uses it for the measurement assumed to measure two or more times, and to only have to become OK even by one time.
Specification of this example
Behavior
Repeat the measurement([Camera Image Input] -> [Search]) until measuring it ten times or becoming of the result of "Search" OK.
How to try this example
1.When cleck the link of file, open the folder.
File
2.The zip file is stored in the folder. When drug & drops on the screen of FJ, read the scene data and the image data.
3.When measure, Repeat the measurement until the result is OK.
How to implement
Scene data
Unit No.
|
Processing Item
|
0.
|
Camera Image Input
|
1.
|
Search
|
2.
|
Macro
|
The Macro Program below segment is to be set in '2.Macro'.
Macro Program
*MEASUREPROC
MYUNIT& = UnitNo
For LP& = 0 To 8 '(1)
RECGJDG& = UnitData(MYUNIT& - 1, "JG")
If RECGJDG& = JUDGE_NG Then '(2)
MeasureProc 0
MeasureProc 1
Else
Exit For '(3)
EndIf
Next
Return
The macro program is in
this link.
Explanation
(1)It loops nine times.
(2)When the measurement result is NG, run [Camera Image Input] -> [Search].
(3)When the measurement result is OK, processing is ended.