ScanWait

Description

Starts a scan operation that returns only after the scan data has been read or the scan timeout period has expired.

Applies to

BarcodeScanner objects

Syntax

Integer scanner.ScanWait (timeout )

Argument

Description

scanner

The scanner object for which you want to perform the scan

timeout

Integer value for the time period in seconds after which scan data is returned

Returns

Integer. Returns 1 for success or one of the following negative values if an error occurs:

Usage

For a synchronous scan operation, the scanner object returns data either immediately upon expiration of the timeout period set in the ScanWait call, or when a new scan is started.

NoteSocket bar code scanner ScanWait is not supported by the Socket bar code scanner.

Examples

Example 1

The following example starts a scan and reads the data:

li_rtn = l_scanner.ScanWait(30)

li_rtn = l_scanner.RetrieveData( )

ls_value = l_scanner.ScannedData

See also