
Chapter 21 Vision Control (Option)
21-63
Example
VISSCREEN 1,0,1 'Instantaneously draws on drawing screen 0.
VISPLNOUT 0 '
VISCLS 0 '
WINDMAKE R,1,300,20,0,0 'Sets window 1 to rectangle.
CAMIN 2 'Obtains a camera image from the storage memory.
VISWORKPLN 0 'Designates the object to storage memory 0.
VISPLNOUT 0 '
VISEDGE 1,100,100,1,0,128 'Measures an edge.
WINDDISP 1 '
I1 = VISSTATUS(0) '
IF I1 = 0 THEN '
FORI1=0TOVISSTATUS(1)-1
'
VISCROSS VISPOSX(I1), VISPOSY(I1)
'
NEXT I1 '
I1 = VISSTATUS(1) '
IF I1 = 0 THEN '
VISLOC 10,10 '
VISPRINT “An edge cannot be found.”
'
END IF '
ELSEIF I1 <> 0 THEN '
VISLOC 10,10 '
VISPRINT “Measurement cannot be done.”
'
END IF '
Kommentare zu diesen Handbüchern