Oc_setscantime, Oc_setscantime -64, Syntax – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 124: Parameters: description, Return value: considerations, Example

Publication 1747-UM002A-US-P - June 2000
6-64 Library of Routines
OC_SetScanTime
OC_SetScanTime sets the I/O scan time and I/O scan interval of
the scanner.
Syntax:
int
OC_SetScanTime(HANDLE handle, int mode,
int time);
Parameters:
Description:
A scan time change will take effect when the scanner transitions from
Idle mode to Scan mode.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
int
retcode;
retcode = OC_SetScanTime( Handle, SCAN_PERIODIC, 20 );
/* Scan set to start every 5 msec. */
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
mode
time
If
mode
is:
SCAN_PERIODIC
time
determines the frequency of I/O
scans in multiples of 250us and must
contain a value between 1 and 255.
SCAN_DELAYED
time
determines the delay between I/O
scans in multiples of 10us and must
contain a value between 1 and 256.
The default
mode
is SCAN_PERIODIC and the default
time
is 10 if
OC_SetScanTime is not used to change the scan time.
Name:
Value:
Description:
SUCCESS
0
scan time was set successfully
ERR_OCACCESS
2
handle
does not have access to the scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner
ERR_OCPARAM
8
parameter contains invalid value