Oc_getinputimage updatecounter, Oc_getinputimageupdatecounter -20 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 80

Publication 1747-UM002A-US-P - June 2000
6-20 Library of Routines
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
OCEXTERR
exterr;
int
retcode;
retcode = OC_GetExtendedError( Handle, &exterr );
OC_GetInputImage
UpdateCounter
OC_GetInputImageUpdateCounter reads the value of the input image
update counter from the scanner and places it into
count
.
Syntax:
int
OC_GetInputImageUpdateCounter(HANDLE handle,
BYTE *count);
Parameters:
Description:
The input image update counter is incremented by the scanner after
each input scan.
The input image update counter is only incremented if the scanner is
in Scan mode, input scans are enabled, and inputs are present. Use
the counter to determine whether a change occurred; the value of the
counter is not important. It is possible to configure a system with no
inputs; in this case, the input image update counter would not be
incremented.
Return Value:
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
count
Contains the value of the input image update counter
Name:
Value:
Description:
SUCCESS
0
input image update counter was read successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner