Change the parameter of the same processing unit name collectively
Overview
The parameter of the same processing unit name in the scene is changed collectively.
Specification of this example
Behavior
The parameter "Upper limit of the corr." and "Lower limit of the corr." of which the processing unit name is "Search_A" is changed collectively.
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 image. Then System automatically sets the parameter "Upper limit of the corr." and "Lower limit of the corr." of which the processing unit name is "Search_A".
When change the set value described in the macro, the parameter of the processing unit change it.
How to implement
Scene data
Unit No.
|
Processing Item
|
0.
|
Camera Image Input
|
1.
|
Macro
|
2.
|
Search
|
3.
|
Search
|
4.
|
Search
|
The Macro Program below segment is to be set in '1.Macro'.
Macro Program
*MCRINIT
MAXUNIT& = 4
TARGET$ = "Search_A"
CORRELATION_MIN& = 70 '(1)
CORRELATION_MAX& = 100
Return
*MEASUREPROC
For I& = 1 To MAXUNIT&
TITLE$ = UnitTitle$(I&) '(2)
If TITLE$ = TARGET$ Then '(3)
SetUnitData I&,142,CORRELATION_MAX&
SetUnitData I&,143,CORRELATION_MIN&
EndIf
Next
Return
The macro program is in
this link.
Explanation
(1)Initialize the parameter.
(2)Get the processing unit name.
(3)Set the parameter, if the name is "Search_A".