Oc_clearfault, Oc_clearfault -2, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 62: Syntax, Parameters: description, Return value: considerations

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

6-2 Library of Routines

Example:

BYTE

buffer[100];

WORD

buffer_crc;

int

retcode;

retcode = OC_CalculateCRC( buffer, 100, &buffer_crc );

OC_ClearFault

OC_ClearFault clears any fault condition of the scanner.

Syntax:

int

OC_ClearFault(HANDLE handle);

Parameters:

Description:

All extended error information must be retrieved before the fault can
be cleared.

If the scanner encounters an error condition, it generates an extended
error and faults. The fault forces the scanner into Idle mode. The
scanner cannot be placed into Scan mode until the fault is cleared.

Return Value:

Considerations:

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

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_ClearFault( Handle );

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

Name:

Value:

Description:

SUCCESS

0

fault was cleared successfully

ERR_OCACCESS

2

handle

does not have access to the scanner

ERR_OCEXTERR

11

scanner extended error message, see OC_GetExtendedError

ERR_OCINIT

5

scanner has not been initialized, see OC_InitScanner

ERR_OCRESPONSE

10

scanner did not respond to request

Advertising
This manual is related to the following products: