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)
    n
    Item
    0
    Execution result 0= Normal, -1= Abnormal
    1
    Number of characters (Unit of byte)
    2
    Execution time

  • For this instruction, a µVision board (option) is required.
    VISGETNUM (a, b)
    b
    a = 0
    a = 1
    a = 2
    a = 3
    0
    Number of characters (Unit of byte)
    unknown
    unknown
    unknown
    1
    Coordinate X value
    Reference mark 1 X coordinate value
    Reference mark 2 X coordinate value
    Reference mark 3 X coordinate value
    2
    Coordinate Y value
    Reference mark 1 Y coordinate value
    Reference mark 2 Y coordinate value
    Reference mark 3 Y coordinate value
    3
    Angle
    unknown
    unknown
    unknown
    4
    Width
    unknown
    unknown
    unknown
    5
    Height
    unknown
    unknown
    unknown
    6
    Version
    unknown
    unknown
    unknown
    7
    Cell size
    unknown
    unknown
    unknown
    8
    Model identification [V1.4 or later]
    unknown
    unknown
    unknown
    9
    unknown
    unknown
    unknown
    unknown




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


Top