Omron FZ4 Series User Manual page 224

Vision sensor
Table of Contents

Advertisement

GetUnitData 1,"CR",RESULT&
If RESULT>=80 Then
DrawTextG "Excellent",100,100,0
Elseif RESULT>=60 Then
DrawTextG "Good",100,100,0
Else
DrawTextG "Bad",100,100,0
EndIf
Gets processing unit figure format
4
ImageFormat(<unitNo>, <measureImageNo>)
Parameters
<unitNo>
<measureImageNo>
Return Value
Returns the value of the integer.
The content of the value is the processing unit figure format of the specified image.
0Binary image
1Monochrome image
2RGB color image
100User-defined image
101User-defined data
-1invalid image
Description
Gets processing unit figure format.
Example
Get the image format of image number 0 of processing unit 2 and display character string according to
an image.
'Gets the image format
Image& = ImageFormat(2, 0)
If Image& = 2 Then
   'RGB color image
   DrawText "Object", 1, 1
Elseif Image& = 1 Then
   'Monochrome image
   DrawText "Non-object", 1, 1
Endif
222
Using Custom Command
Processing unit number (integer type)
Image number of image at the time of register for processing (integer type)
FZ4 User's Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents