Overview
Control channel access functions This group defines all functions for access to control parameters like setpoint or actual value.
Functions | |
long | LCC_EnableControlLoop (dev_hdl ChanHdl, int Enable) |
Enables / disables a control loop. More... | |
long | LCC_GetSetPoint (dev_hdl ChanHdl, double *pfSetPointValue) |
Query setpoint value from device object. More... | |
long | LCC_GetSwScalingParam (dev_hdl ChanHdl, double *pfScalingFactor, double *pfScalingOffset) |
Read software scaling parameters. More... | |
long | LCC_IsControlLoopEnabled (dev_hdl ChanHdl) |
Query if a control loop is enabled. More... | |
long | LCC_ReadActualValue (dev_hdl ChanHdl, double *pfActualValue) |
Read actual value from device. More... | |
long | LCC_ReadActualValueUnscaled (dev_hdl ChanHdl, double *pfActualValueRaw) |
Read actual value from device - bypass scaling. More... | |
long | LCC_ReadStatus (dev_hdl ChanHdl, unsigned long *pdwStatus) |
Read additional status information from device. More... | |
long | LCC_SetPIDParameter (dev_hdl ChanHdl, int PIDParamId, double Value) |
Set the PID parameters of a certain control channel. More... | |
long | LCC_SetSwScalingOn (dev_hdl ChanHdl, int ScalingOn) |
Enable / disable software scaling. More... | |
long | LCC_SetSwScalingParam (dev_hdl ChanHdl, double fScalingFactor, double fScalingOffset) |
Set software scaling parameters. More... | |
long | LCC_WriteSetPoint (dev_hdl ChanHdl, double fSetPointValue) |
Write setpoint value to controller device. More... | |
long | LCC_WriteSetPointUnscaled (dev_hdl ChanHdl, double SetPointValueRaw) |
Write setpoint value to controller device - bypass scaling stage. More... | |
Function Documentation
long LCC_EnableControlLoop | ( | dev_hdl | ChanHdl, |
int | Enable | ||
) |
Enables / disables a control loop.
If the control loop is enabled, then the output value is calculated periodically.
- Parameters
-
ChanHdl Valid handle of a controller channel Enable 1 = enable, 0 = disable
- Returns
- Error code - ERR_NOERR indicates success
- See also
- LCC_IsControlLoopEnabled()
long LCC_GetSetPoint | ( | dev_hdl | ChanHdl, |
double * | pfSetPointValue | ||
) |
Query setpoint value from device object.
This function does not return the real setpoint value of the device but only the cached setpoint value entered by writeSetPoint()
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [in] pfSetPointValue The setpoint value read from device
- Returns
- Error code - ERR_NOERR indicates success
long LCC_GetSwScalingParam | ( | dev_hdl | ChanHdl, |
double * | pfScalingFactor, | ||
double * | pfScalingOffset | ||
) |
Read software scaling parameters.
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [out] pfScalingFactor The scaling factor multiplied with field value [out] pfScalingOffset The scaling offset added to field value
- See also
- LCC_SetSwScalingParam()
- 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 LCC_IsControlLoopEnabled | ( | dev_hdl | ChanHdl | ) |
Query if a control loop is enabled.
If the control loop is enabled, then the output value is calculated periodically.
- Parameters
-
ChanHdl Valid handle of a controller channel
- Return values
-
1 - Control channel is enabled 0 - Control channel is disabled <0 - Error code
- See also
- LCC_EnableControlLoop()
- Examples:
- capi_qmixqplus_test.cpp.
long LCC_ReadActualValue | ( | dev_hdl | ChanHdl, |
double * | pfActualValue | ||
) |
Read actual value from device.
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [out] pfActualValue Returns the actual controller value
- Returns
- Error code - ERR_NOERR indicates success
long LCC_ReadActualValueUnscaled | ( | dev_hdl | ChanHdl, |
double * | pfActualValueRaw | ||
) |
Read actual value from device - bypass scaling.
Reads the actual value from the device bypassing the scaling stage of the channel. Reads the unprocessed value directly.
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [out] pfActualValueRaw Unprocessed actual value (no scaling)
- Returns
- Error code - ERR_NOERR indicates success
long LCC_ReadStatus | ( | dev_hdl | ChanHdl, |
unsigned long * | pdwStatus | ||
) |
Read additional status information from device.
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [out] pdwStatus Stores the status read from device
- Returns
- Error code - ERR_NOERR indicates success
long LCC_SetPIDParameter | ( | dev_hdl | ChanHdl, |
int | PIDParamId, | ||
double | Value | ||
) |
Set the PID parameters of a certain control channel.
- See also
- PIDParameterId for a list of all available parameters. If you create a dynamic control channel, the you need to set all PID parameters before you enable the channel via LCC_EnableControlLoop().
- Parameters
-
ChanHdl Valid handle of a controller channel PIDParamId PID parameter identifier -
- See also
- PIDParameterId for a list of all PID parameters
- Parameters
-
Value The value for the PID parameter given in PIDParamId
- Returns
- Error code - ERR_NOERR indicates success
- Examples:
- capi_dynamic_controller_test.cpp, and capi_pressure_control_test.cpp.
long LCC_SetSwScalingOn | ( | dev_hdl | ChanHdl, |
int | ScalingOn | ||
) |
Enable / disable software scaling.
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [in] ScalingOn 1 = Scaling on, 0 = Scaling off
- Returns
- Error code - ERR_NOERR indicates success
long LCC_SetSwScalingParam | ( | dev_hdl | ChanHdl, |
double | fScalingFactor, | ||
double | fScalingOffset | ||
) |
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] ChanHdl Valid handle of open controller channel [in] fScalingFactor The scaling factor to multiply with field value [in] fScalingOffset 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)
- See also
- LCC_GetSwScalingParam()
long LCC_WriteSetPoint | ( | dev_hdl | ChanHdl, |
double | fSetPointValue | ||
) |
Write setpoint value to controller device.
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [in] fSetPointValue The setpoint value to write
- Returns
- Error code - ERR_NOERR indicates success
long LCC_WriteSetPointUnscaled | ( | dev_hdl | ChanHdl, |
double | SetPointValueRaw | ||
) |
Write setpoint value to controller device - bypass scaling stage.
- Parameters
-
[in] ChanHdl Valid handle of open controller channel [in] SetPointValueRaw Unprocessed set point value (no scaling)
- Returns
- Error code - ERR_NOERR indicates success