Oc_gettemperature -41 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 95
OC_GetTemperature
Library of Routines
6–41
Publication 1747-6.5.3 June 1998
OC_GetTemperature
OC_GetTemperature reads the current temperature of the 1746 I/O PCI Interface’s
built-in thermometer.
Syntax:
int
OC_GetTemperature(HANDLE handle, BYTE*temp);
Parameters:
Description:
The temperature is updated every 10 seconds by the scanner.
The optimal operating temperature range for the 1746 I/O PCI Interface is 0° to 60°C. When
OC_GetTemperature returns a value of 75_ C or higher, the 1746 I/O PCI Interface is operating beyond its
optimal operating temperature range and you need to correct the situation.
The scanner must be initialized before you can monitor the temperature.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
BYTE
temp;
int
retcode;
retcode = OC_GetTemperature( Handle, &temp );
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
temp
Returns the temperature in degrees Celsius
Name:
Value:
Description:
SUCCESS
0
temperature was read successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner