Display the measurement result by other symbols
Overview
This example displays the measurement result by other symbols, instead of OK/NG.
It enables to show the measurement result in easier way.
Specification of this example
Behavior
This example stores three models in classification unit, in different level of quality.
And it displays the measurement result by following symbols: "Excellent", "Very Good", "Good".
Screenshot
How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
File
2.Right-click and hold on the zip file, and drop it on working window of FJ system. The images and scene data in zip file are loaded on the program automatically.
3.Re-measure the images. Then the measurement result is shown on Image Window using the defined simbols.
How to implement
Scene data
Unit No.
|
Processing Item
|
0.
|
Camera Image Input
|
1.
|
Classification
|
2.
|
Macro
|
The Macro Program below segment is to be set in '2.Macro'.
Macro Program
*MEASUREPROC
MYUNIT& = UnitNo
MODELNO& = UnitData((MYUNIT& - 1), "NO") '(1)
Return
*MEASUREDISPG
Select MODELNO& '(2)
Case 0
RANK$ = "Excellent"
Case 1
RANK$ = "Very Good"
Case 2
RANK$ = "Good"
END SELECT
If MODELNO& >= 0 Then
SetTextStyle 40, TA_TOP, JUDGE_OK, 0, FONTSTYLE_BOLD + FONTSTYLE_UNDERLINE
DrawTextG "Measurement Result F " + RANK$, 10, 10, 0
EndIf
Return
The macro program is in
this link.
Explanation
(1)Get the measurement result (model no) of backword unit via external reference data.
(2)Set message by model no and display it in Image Window.