Function
Input the temperature from the specified channel.
Format
Ret = SsiInputTemperature ( Id , ChannelNo , &Temperature , &InputStatus )
Parameters
Id
[ C: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved from SsiInit.
ChannelNo
[ C: short ] [ Python: ctypes.c_short ]
Specify the channel number.
Temperature
[ C: float *] [ Python: ctypes.POINTER(ctypes.c_float) ]
Specify the address of the variable that stores the temperature.
InputStatus
[ C:unsigned int *] [ Python: ctypes.POINTER(ctypes.c_uint) ]
Specify the address of the variable that stores the input status.
This input status has meaning on a bit-by-bit basis.
Lower 2 bytes
InputStatus |
Bit 15 |
Bit 14 |
Bit 13 |
Bit 12 |
Bit 11 |
Bit 10 |
Bit 9 |
Bit 8 |
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
- |
Sensor hard |
ADC hard |
CJ hard |
CJ soft |
Sensor upper limit exceeded |
Sensor lower limit exceeded |
ADC out of range |
Valid |
Upper 2 bytes
InputStatus |
Bit 31 |
Bit 30 |
Bit 29 |
Bit 28 |
Bit 27 |
Bit 26 |
Bit 25 |
Bit 24 |
Bit 23 |
Bit 22 |
Bit 21 |
Bit 20 |
Bit 19 |
Bit 18 |
Bit 17 |
Bit 16 |
Signal Name |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
Details of each bit
InputStatus |
Summary |
Description |
Bit 0 |
Valid |
Indicate whether the Temperature result is valid or invalid. 1: Temperature result is valid. |
Bit 1 |
Indicate whether the input voltage exceeds the ADC input range. 1: ADC input range exceeded. Please discard the temperature result. |
|
Bit 2 |
Indicate whether the thermocouple reading is below measurement temperature range. 1: The thermocouple reading is below measurement temperature range. Please discard the Temperature result. |
|
Bit 3 |
Indicate whether the thermocouple reading is above measurement temperature range. 1: The thermocouple reading is above the measurement temperature range. Please discard the Temperature result. |
|
Bit 4 |
Indicate whether the cold junction (CJ) sensor result is outside of measurement temperature range. 1: The CJ sensor result is outside of measurement temperature range. Please discard the Temperature result. |
|
Bit 5 |
Indicate whether an error has occurred in the cold junction (CJ) sensor. 1: An error has occurred in the CJ sensor. Temperature result will be -999â. |
|
Bit 6 |
Indicate whether an invalid ADC read has occurred. 1: An invalid ADC read has occurred. Temperature result will be -999â. |
|
Bit 7 |
Sensor hard fault |
Indicate whether a sensor abnormality has occurred. 1: A sensor abnormality has occurred. Temperature result will be -999â. |
Return Value
Ret [ Cīŧ long ] [ Python: ctypes.c_long ]
Definition |
Value [Dec] |
Description |
SSI_ERR_SUCCESS |
0 |
Succeeded |
SSI_ERR_DLL_INVALID_ID |
10001 |
Invalid device id. |
SSI_ERR_DLL_CALL_DRIVER |
10002 |
Can not call driver (ioctl failed). |
SSI_ERR_DLL_BUFF_ADDRESS |
10100 |
Invalid data buffer address. |
SSI_ERR_SYS_CH_NO |
20100 |
Channel No. is outside the setting range. |
SSI_ERR_SYS_DISABLE_CH |
20104 |
Disabled channel number. |
SSI_ERR_SYS_SENSOR_FAULT |
20105 |
Sensor input data is abnormal. |
The others (See also: Details of Error Code)
Remarks
Input the temperature and status from the specified channel.
Example
Input the temperature from 1ch.
C |
long
Ret; |
Python |
Ret = ctypes.c_long() InputStatus = ctypes.c_uint() Ret = cssi.SsiInputTemperature(Id,
1 , ctypes.byref(Temperature) , ctypes.byref(InputStatus)) |
See Also
SsiMultiInputTemperature, ADC fault, CJ fault, Sensor exceeded fault