VISREADQR
(Statement)
Read the QR code.
VISREADQR <Window number>, <Coordinate X>, <Coordinate Y>, <Mode> [, <Binary lower limit>[, <Binary upper limit>] ]
<window number>
Specifies the window number (0 to 511).
<coordinate X>
Specifies the X coordinate (0 to 511).
<coordinate Y>
Specifies the Y coordinate (0 to 479).
<mode>
Specifies the method for binarization.
0: Automatic binarization (Binarizes the process range with the decision analysis method.)
1: Designated value binarization (Binarizes based on the binarization level in the instructions.)
<Binary lower limit>
Specifies the lower limit for binarization (0 to 254 lower limit < upper limit).
If ignored, 0 is set.
<Binary upper limit>
Specifies the upper limit for binarization (1 to 255 lower limit < upper limit).
If ignored, 255 is set.
-
Designate the process range with a window.
-
The only window shape that can be specified is a rectangle with 0 degrees. If another window shape is designated, an error will result.
-
The processing object is the screen designated with VISWORKPLN.
-
The memory board stores the contents of the codes and you can obtain them with VISGETSTR.
-
If the code has an error and it cannot be read, the result of VISSTATUS (0) will be -1.
-
The following data can be obtained with the processing result obtaining function.VISSTATUS (n)nItem0Execution result 0= Normal, -1= Abnormal1Number of characters (Unit of byte)2Execution time
-
For this instruction, a µVision board (option) is required.VISGETNUM (a, b)ba = 0a = 1a = 2a = 30Number of characters (Unit of byte)unknownunknownunknown1Coordinate X valueReference mark 1 X coordinate valueReference mark 2 X coordinate valueReference mark 3 X coordinate value2Coordinate Y valueReference mark 1 Y coordinate valueReference mark 2 Y coordinate valueReference mark 3 Y coordinate value3Angleunknownunknownunknown4Widthunknownunknownunknown5Heightunknownunknownunknown6Versionunknownunknownunknown7Cell sizeunknownunknownunknown8Model identification [V1.4 or later]unknownunknownunknown9unknownunknownunknownunknown
VISSCREEN 1,0,1
|
|
VISCLS
|
|
WINDMAKE R,1,512,480,0,2
|
'Set window 1 to a rectangle
|
CAMIN 1
|
'Obtain a camera image from storage memory
|
VISPLNOUT 0
|
|
VISREADQR 1,0,0,0
|
'Read the QR code
|
I1 = VISSTATUS(0)
|
|
VISPRINT I1, VISSTATUS(1)
|
|
IF I1 = 0 THEN
|
|
VISLOC 10,10
|
|
VISPRINT VISGETSTR(1, VISSTATUS(1))
|
|
END IF
|
|
VISCAMOUT 1
|
|