Analog Input
Overview
Analog input channel functions This group defines all functions to measure analog input signals via various analog input channels.
Collaboration diagram for Analog Input:
Functions | |
long | LCAIO_GetInputSwScalingParam (dev_hdl InChanHdl, double *pScalingFactor, double *pScalingOffset) |
Query software scaling parameters. More... | |
long | LCAIO_ReadInput (dev_hdl InChanHdl, double *pfValue) |
Read analog input of this channel. More... | |
long | LCAIO_ReadStatus (dev_hdl InChanHdl, unsigned long *pdwStatus) |
Read additional status information from analog channel. More... | |
long | LCAIO_SetInputSwScalingOn (dev_hdl InChanHdl, int ScalingOn) |
Enable / disable software scaling. More... | |
long | LCAIO_SetInputSwScalingParam (dev_hdl InChanHdl, double ScalingFactor, double ScalingOffset) |
Set software scaling parameters. More... | |
Function Documentation
long LCAIO_GetInputSwScalingParam | ( | dev_hdl | InChanHdl, |
double * | pScalingFactor, | ||
double * | pScalingOffset | ||
) |
Query software scaling parameters.
- Parameters
-
[in] InChanHdl Valid handle of analog input channel [out] pScalingFactor The scaling factor multiplied with field value [out] pScalingOffset The scaling offset added to field value
- Return values
-
ERR_NOERR indicates success -ERR_NOTSUP Linear scaling not supported (i.e. if channel uses a different kind of scaling like PT100 scaling)
long LCAIO_ReadInput | ( | dev_hdl | InChanHdl, |
double * | pfValue | ||
) |
Read analog input of this channel.
- Parameters
-
[in] InChanHdl Valid handle of analog input channel [out] pfValue Return analog input value
- Returns
- Error code - ERR_NOERR indicates success
long LCAIO_ReadStatus | ( | dev_hdl | InChanHdl, |
unsigned long * | pdwStatus | ||
) |
Read additional status information from analog channel.
- Parameters
-
[in] InChanHdl Valid handle of analog input channel [out] pdwStatus Returns the status read from the channel
- Returns
- Error code - ERR_NOERR indicates success
long LCAIO_SetInputSwScalingOn | ( | dev_hdl | InChanHdl, |
int | ScalingOn | ||
) |
Enable / disable software scaling.
- Parameters
-
[in] InChanHdl Valid handle of analog input channel [in] ScalingOn 1 = Scaling on, 0 = Scaling off
- Returns
- Error code - ERR_NOERR indicates success
long LCAIO_SetInputSwScalingParam | ( | dev_hdl | InChanHdl, |
double | ScalingFactor, | ||
double | ScalingOffset | ||
) |
Set software scaling parameters.
These parameters are used to scale the measured value from device. These scaling parameters are independent from the device scaling parameters and the scaling is performed on the local machine. Scaled Value = (Process Value * Scaling Factor) + Scaling Offset. The default value for Scaling Factor is 1 and for Scaling Offset is 0.
- Parameters
-
[in] InChanHdl Valid handle of analog input channel [in] ScalingFactor The scaling factor to multiply with field value [in] ScalingOffset The scaling offset ro add to field value
- Return values
-
ERR_NOERR indicates success -ERR_NOTSUP Linear scaling not supported (i.e. if channel uses a different kind of scaling like PT100 scaling)