Display the measurement results of multiple processing units at once

Overview

This sample displays the measurement results of multiple processing units at once.

Specification of this example


Behavior
This sample displays the measurement results of multiple processing units ([Search], [ECM Search], [Edge Position]) at once in Image Window.

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 displays the measurement results of multiple processing units ([Search], [ECM Search], [Edge Position]) at once in Image Window.

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
    Dim POSX#(UnitNo), POSY#(UnitNo)

    MYUNIT& = UnitNo
    For CNT& = 1 To (MYUNIT& - 1) Step 1         '(1)
        GetUnitData CNT&, "X", POSX#(CNT&)
        GetUnitData CNT&, "Y", POSY#(CNT&)
    Next

Return

*MEASUREDISPG

    SetDrawStyle PS_SOLID, 3, JUDGE_OK
    For CNT& = 1 To (MYUNIT& - 1) Step 1         '(2)
        DrawCursor POSX#(CNT&), POSY#(CNT&), 0
    Next

Return

The macro program is in refthis link.
Explanation
(1)Get position X, and Y from measurement results of [Search], [ECM Search], [Edge Position].
(2)Display cursors on the positions of the measurement results in Image Window.