beautypg.com

1 input/output functions, Data entry to readresult and imageresult, 2 data acquisition functions – KEYENCE SR-700 Series User Manual

Page 10: Functions used in readresult(idx), Functions used in imageresult(idx), Input/output functions, Data acquisition functions, Readresult(idx), Imageresult(idx)

background image

10

E SR SCRIPT RM

5-1

Input/Output functions

This section describes basic functions for editing data of SR-1000/D100/750/700.

Edit read data

*1 The number of arrays can be obtained using the common function

"readCount()".
If idx is omitted, the first code is specified.

Edit image file name

*2 The number of arrays can be obtained using the common function

"imageCount()".
If idx is omitted, the first code is specified.

Data entry to readResult and imageResult

Reference

• The imageResult function cannot be used with the SR-700 Series.
• The functions that can be used vary depending on the model.

From section 5-2 to section 5-4, the applicable models are listed as
shown below.

: SR-1000 Series
: SR-D100 Series
: SR-750 Series
: SR-700 Series

readResult(idx)

Argument

idx

: Index for read information array

*1

Return value

return : Read value

imageResult(idx)

Argument

idx

: Index for image name information array

*2

Return value

return : Image file name

Example 1

Example 2

When "Single read" is performed on SR-1000/D100/750/700 by registering 3
parameter banks for which alternate reading is enabled.

• Read OK
When reading is successful with the first bank

When reading is successful with the second and third banks

• Read error
When reading fails

Read error image

readResult(1)

imageResult(1)

readResult(1)

imageResult(1)

readResult(1)

imageResult(1)

imageResult(2)

imageResult(3)

When 4 "Multi read" are set for "Bank 1 Code Settings" on SR-750/D100 by
registering 1 parameter bank for which alternate reading is enabled.

If 4 codes are read with Multi read set to Enable, the result is 1 image and 4
read data.

readResult(1)

readResult(2)

readResult(3)

readResult(4)

imageResult(1)

5-2

Data acquisition functions

This describes the functions to obtain data of codes read by SR-1000/D100/750/700.

Functions used in readResult(idx)

These functions obtain information of read data. Use as readResult(n):***

Example) readResult(n):readData()

*1 The functions of the code reader main unit must be enabled beforehand.
*2 When using the script for the edit image file name, the file name after the image

file is changed is output. When multiple image files exist, the value of the Inter-
delimiter is the same value set for the SR-1000/D100/750/700.

Functions used when reading the GS1 composite

*3 When reading the GS1 composite (JAN/EAN/UPC), the 1D code and 2D code

are connected with a composite delimiter and then output.

*4 When reading the GS1 composite code, values of the 1D code and 2D code

are obtained separately, connected with a partition mark, and then output.

Functions used in imageResult(idx)

These functions obtain information of captured images. Use as imageResult(n):***

Example) imageResult(1):bankNo()

*1 If the script is not used with the SR-D100 Series, information called A:\IMAGE is

appended to the beginning of the image name, however, if imageFileNames()
is used, this information is not appended.

Function name

Argu-

ment

Return value

Applicable model

readData()

None

Read data

symbolType()

None

Code type (Refer to

"8-3

Code type" (Page 19).)

symbolIdentifier()

None

Symbol identifier (3 characters)
(Refer to

"8-3 Code type"

(Page 19).)

bankNo()

None

Bank number

scanTimes()

None

Scan count

positonStableLevel()

None

Position measurement level

cornerCoordinates()

None

Code top coordinates:
"X1/Y1:X2/Y2:X3/Y3:X4/Y4"

centerCoordinate()

None

Code center coordinates: "X1/
Y1"

eccQuality()

None

Unused error correction (0 to
100)

matchingLevel()

None

Matching Level (0-100)

*1

i15415Verification()

None

ISO/IEC15415 verification
result

*1

aimVerification()

None

ISO/IEC TR 29158(AIM DPM-1-
2006) verification result

*1

as9132Verification()

None

SAE AS9132 verification result

*1

semiT10Verification()

None

SEMI T10-070 verification
result

*1

japanMedicalVerification
()

None

Verification result of the Japan
ethical drug barcode

*1

imageFileNames()

None

Image file name

*2

readingDuration()

None

Reading duration [ms]

burstNum()

None

Burst number when reading is
successful

errCode()

None

Detail error code
This is output only for burst.

*1

outonEvent(n)

n:
Output
terminal
number

None
(The corresponding output
terminal turns on.)

Function name

Argu-

ment

Return value

Applicabl

e model

readData()

None

Read data

*3

symbolIdentifier()

None

Symbol identifier

*3

cornerCoordinates()

None

Code top coordinates:

*4

"X1/Y1:X2/Y2:X3/Y3:X4/Y4:
X1/Y1:X2/Y2:X3/Y3:X4/Y4"

centerCoordinate()

None

Code center coordinates:

*4

matchingLevel()

None

Matching Level (0-100)

readDataCompositeLen
1D()

None

Data length of the GS1
composite 1D code

Function name

Argu-

ment

Return value

Applicable model

bankNo()

None

Bank number or nil

burstNum()

None

Burst number of a captured
image

imageFileName()

None

Image file name

*1

readDatas()

None

Character string data of the
barcode itself or nil
(Concatenated when multiple
data are present.)

readResultIdx()

None

Index table of append data
(readResult(n)) or nil

This manual is related to the following products: