SsiMultiInputTemperature


Function

Input the temperatures from multiple channels.

Format

Ret = SsiMultiInputTemperature ( Id , &ChannelNo , ChannelNum , &Temperature , &InputStatus )

Parameters

Id [ C:short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved from SsiInit.

ChannelNo [ C:short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Store the input channel number in an array and specify the base address of that array.

ChannelNum [ C:short ] [ Python: ctypes.c_short ]
Set the number of elements in the array (number of channels) specified by ChannelNo.

Temperature [ C: float *] [ Python: ctypes.POINTER(ctypes.c_float) ]
Specify the address of an array that stores the temperatures.

InputStatus [ C:unsigned int *] [ Python: ctypes.POINTER(ctypes.c_uint) ]
Specify the address of an array that stores the input status.

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 temperatures and status from multiple channels at once.

Example

Input the temperatures and status for Ch0 to Ch3 at once.

C

long Ret;
shortChannelNo[4];
float Temperature[4];
unsigned int InputStatus[4];

 

ChannelNo[0] = 0;

ChannelNo[1] = 1;
ChannelNo[2] = 2;
ChannelNo[3] = 3;
Ret = SsiMultiInputTemperature(Id, &ChannelNo[0] , 4 , &Temperature[0] , &InputStatus[0] );
 

Python

Ret = ctypes.c_long()
ChannelNoType = ctypes.c_short() * 4
ChannelNo = ChannelNoType()
TemperatureType = ctypes.c_float() * 4
Temperature = TemperatureType()

InputStatusType = ctypes.c_uint() * 4
InputStatus = InputStatus()

 

ChannelNo[0] = 0
ChannelNo[1] = 1
ChannelNo[2] = 2
ChannelNo[3] = 3
Ret = cssi.SsiMultiInputTemperature(Id, ChannelNo , ChannelNum , Temperature , InputStatus )
 

See Also

SsiInputTemperature