WWW.NNC.IR
Basic Knowledge For Macro Customize
Functions
219
5
Optimizing Scenes (Measurement Flows) (Macro Customize
Functions)
Vision System FH/FZ5 Series
User’s Manual (Z340)
• Format of Figure Data
Figure data is specified using an array variable. The elements of the array are described below.
• Acquisition of Data
Figure data is acquired by the method below.
Example:Acquiring Figure Data No. 1 (region figure) of the Unit No. 1 Search processing unit
Array element Description Description
figure(0)
Figure data header
information
This is figure data header information. Includes the number of figures and
figure data size information.
Upper 16 bits: Number of figures
Lower 16 bits: Number of bytes of figure data size (figure array length x 4)
Figure data header information = Number of bytes of figure data size +
Number of figure data x 65536
Number of figures:Sets the number of figures included in the figure data.
Normally 1 should be set. If you are combining multiple figures, set the
number of figures that are combined (2 or more).
Number of bytes of figure data size:
Set the figure data size converted into bytes. Set the value that is 4 times the
number of array elements.
Example: One rectangle
Array length = 5, Number of figure data items = 1
Number of bytes of figure data size = 5 x 4 = 20
Figure data header information = 20 + 1 x 65536 = 65556
figure(1)
Figure 0 type
information
Type information of figure 0 data. Includes drawing mode and figure type
information.
Upper 16 bits: Drawing mode
Lower 16 bits: Figure type
Figure type information = Figure type + Drawing mode x 65536
Drawing mode:Set whether the figure drawing mode is OR mode or NOTE
mode. Normally 0 (OR mode) should be set. When multiple figures are used
and you want to exclude some of the figures, set 1 (NOT mode) for the 2nd or
later figures.
Figure type:Set the figure type (line, rectangle, etc.).
Example: One rectangle (drawing mode is OR)
Figure type = 8, Drawing mode = 0
Figure type information = 8 + 0 x 65536 = 8
figure(2) Figure 0 data Figure data of figure 0. The size and content depends on the figure type.
figure(M)
Figure 1 type
information
Type information of figure 1 data.
figure(M+1) Figure 1 data Figure data of figure 1. The size and content depends on the figure type.
...
...
...
figure(N*M)
Figure N type
information
Type information of figure N data.
figure(N*M+1) Figure N data Figure data of figure N. The size and content depends on the figure type.
Dim FIGURE&(5)
GetUnitFigure 1, 1, FIGURE&()
If the number of array elements is insufficient for the figure data to be set or acquired, an error will occur when
setting or acquiring is attempted.