SsiInputTemperature


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
Bit Number

Summary

Description

Bit 0

Valid

Indicate whether the Temperature result is valid or invalid.

1: Temperature result is valid.
0: The temperature result is invalid. Please discard the temperature result.

Bit 1

ADC out of range fault

Indicate whether the input voltage exceeds the ADC input range.

1: ADC input range exceeded. Please discard the temperature result.
0: There is no ADC input range.

Bit 2

Sensor lower limit exceeded fault

Indicate whether the thermocouple reading is below measurement temperature range.

1: The thermocouple reading is below measurement temperature range. Please discard the Temperature result.
0: The thermocouple reading is not below measurement temperature range.

Bit 3

Sensor upper limit exceeded fault

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.
0: The thermocouple reading is not above the measurement temperature range.

Bit 4

CJ soft fault

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.
0: The CJ sensor result is within measurement temperature range.

Bit 5

CJ hard fault

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℃.
0: The CJ sensor is working properly.

Bit 6

ADC hard fault

Indicate whether an invalid ADC read has occurred.

1: An invalid ADC read has occurred. Temperature result will be -999℃.
   This may be due to a large external noise event.
0: ADC reading is working properly.

Bit 7

Sensor hard fault

Indicate whether a sensor abnormality has occurred.

1: A sensor abnormality has occurred. Temperature result will be -999℃.
   This may be due to an open circuit (burnout, etc.), an ADC fault, or CJ fault.
0: The sensor is working properly.

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;
float TemperatureUnit;
unsigned int InputStatus;
Ret = SsiInputTemperature(Id, 1 , &Temperature , &InputStatus );
 

Python

Ret = ctypes.c_long()
TemperatureUnit = ctypes.c_float()

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