Oc_resetscanner, Oc_resetscanner -54 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 114

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

6-54 Library of Routines

OC_ResetScanner

OC_ResetScanner generates a hard or soft reset to the scanner.

Syntax:

int

OC_ResetScanner(HANDLE handle, int mode);

Parameters:

Description:

After the reset is generated, the scanner begins to execute its POST.

Return Value:

Considerations:

Supported in the DOS API library and the Windows NT API library

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_ResetScanner( Handle, OCWAIT );

ATTENTION

!

This call stops scanning and resets outputs.

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

mode

If

mode

is:

OCNOWAIT

OC_ResetScanner returns after releasing the
reset signal to the scanner.

OCWAIT

OC_ResetScanner returns after POST is completed.

OCSOFTRESET

OC_ResetScanner reinitializes while avoiding the
7-second POST delay. In this mode, the scanner performs
a warm-boot and bypasses the POST. The dual-port RAM
can be epartitioned quickly.
The scanner stops scanning, resets all outputs, and
returns to the power-on condition. After the reset is
complete, you must call OC_InitScanner to initialize the
shared memory interface.

Name:

Value:

Description:

SUCCESS

0

scanner was reset successfully

ERR_OCACCESS

2

handle

does not have access to the scanner

ERR_OCPOST

7

scanner POST failed

Advertising
This manual is related to the following products: