Description, Return value: considerations, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 83

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-23

Description:

When the scanner faults, an extended error is generated. The error
code and slot number of the most recent fault is retained and returned
by this function. The fault cause is a duplicate of the most recent
extended error.

The OC_ClearFault function clears the fault in the scanner but does
not clear the cause of the last fault.

See Appendix A for error codes.

Return Value:

Considerations:

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

Example:

HANDLE

Handle;

BYTE

status, FaultCause;

int

FaultSlot;

int

retcode;

OC_GetScannerStatus ( Handle, &status );

if ( status = SCANSTS_FAULT )

{

retcode = OC_GetLastFaultCause ( Handle,

&FaultCause, &FaultSlot );

}

Name:

Value:

Description:

SUCCESS

0

fault was cleared successfully

ERR_OCACCESS

2

handle

does not have access to scanner

ERR_OCINIT

5

scanner has not been initialized, see OC_InitScanner

Advertising
This manual is related to the following products: