Draw the graphic of measurement result of any processing unit

Overview

This example draws the graphic of measurement result of any processing unit.

Specification of this example


Behavior
At first this example finds the first OK unit, and draws the graphic of it in ImageWindow.

Screenshot


How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
refFile

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 image. Then System automatically show the graphic of first OK unit for selected image.

How to implement

Scene data
Unit No.
Processing Item
0.
Camera Image Input
1.
Search
2.
ECM Search
3.
Edge Position
4.
Macro
The Macro Program below segment is to be set in '4.Macro'.
Macro Program
*MEASUREPROC

    MYUNIT& = UnitNo
    DISPUNIT& = 0

    For CNT& = 1 To (MYUNIT& - 1) Step 1         '(1)
        JUDGE& = UnitJudge(CNT&)
        If JUDGE& = JUDGE_OK Then
        DISPUNIT& = CNT&
        Exit For
        EndIf
    Next

Return

*MEASUREDISPG

    MeasureDispG DISPUNIT&, 0         '(2)

Return

The macro program is in refthis link.
Explanation
(1)Get the UnitNo which is the first unit whose judgement result is OK.
(2)Display the result of it in Image Window.