Oc_getmeasuredscan time, Oc_getmeasuredscan time -24 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 84
Publication 1747-UM002A-US-P - June 2000
6-24 Library of Routines
OC_GetMeasuredScan
Time
OC_GetMeasuredScanTime returns the maximum and last observed I/
O scan times.
Syntax:
int
OC_GetMeasuredScanTime(HANDLE Handle, WORD
*maxtime, WORD *lasttime);
Parameters:
Description:
The scanner calculates these values at the end of each I/O scan. The
values are represented in units of 250 microseconds.
The scan times are reset to zero when changing to Scan mode, and
are not valid until the end of the second I/O scan. Only the timed I/O
scans are measured; the demand input or output scans are not.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
WORD
max_time, last_time;
int
retcode;
retcode = OC_GetMeasuredScanTime( Handle, &max_time,
&last_time );
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
maxtime
Returns the maximum scan time
lasttime
Returns the last scan time
Name:
Value:
Description:
SUCCESS
0
measured scan time was read successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner