Control channel access functions This group defines all functions for access to control parameters like setpoint or actual value.
|
LCC_Func long LCC_CALL | LCC_EnableControlLoop (dev_hdl ChanHdl, int Enable) |
| Enables / disables a control loop. More...
|
|
LCC_Func long LCC_CALL | LCC_GetSetPoint (dev_hdl ChanHdl, double *pfSetPointValue) |
| Query setpoint value from device object. More...
|
|
LCC_Func long LCC_CALL | LCC_GetSwScalingParam (dev_hdl ChanHdl, double *pfScalingFactor, double *pfScalingOffset) |
| Read software scaling parameters. More...
|
|
LCC_Func long LCC_CALL | LCC_IsControlLoopEnabled (dev_hdl ChanHdl) |
| Query if a control loop is enabled. More...
|
|
LCC_Func long LCC_CALL | LCC_ReadActualValue (dev_hdl ChanHdl, double *pfActualValue) |
| Read actual value from device. More...
|
|
LCC_Func long LCC_CALL | LCC_ReadActualValueUnscaled (dev_hdl ChanHdl, double *pfActualValueRaw) |
| Read actual value from device - bypass scaling. More...
|
|
LCC_Func long LCC_CALL | LCC_ReadStatus (dev_hdl ChanHdl, unsigned long *pdwStatus) |
| Read additional status information from device. More...
|
|
LCC_Func long LCC_CALL | LCC_SetPIDParameter (dev_hdl ChanHdl, int PIDParamId, double Value) |
| Set the PID parameters of a certain control channel. More...
|
|
LCC_Func long LCC_CALL | LCC_SetSwScalingOn (dev_hdl ChanHdl, int ScalingOn) |
| Enable / disable software scaling. More...
|
|
LCC_Func long LCC_CALL | LCC_SetSwScalingParam (dev_hdl ChanHdl, double fScalingFactor, double fScalingOffset) |
| Set software scaling parameters. More...
|
|
LCC_Func long LCC_CALL | LCC_WriteSetPoint (dev_hdl ChanHdl, double fSetPointValue) |
| Write setpoint value to controller device. More...
|
|
LCC_Func long LCC_CALL | LCC_WriteSetPointUnscaled (dev_hdl ChanHdl, double SetPointValueRaw) |
| Write setpoint value to controller device - bypass scaling stage. More...
|
|
◆ LCC_EnableControlLoop()
LCC_Func long LCC_CALL LCC_EnableControlLoop |
( |
dev_hdl |
ChanHdl, |
|
|
int |
Enable |
|
) |
| |
◆ LCC_GetSetPoint()
LCC_Func long LCC_CALL 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
◆ LCC_GetSwScalingParam()
LCC_Func long LCC_CALL 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) |
◆ LCC_IsControlLoopEnabled()
LCC_Func long LCC_CALL 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.
◆ LCC_ReadActualValue()
LCC_Func long LCC_CALL LCC_ReadActualValue |
( |
dev_hdl |
ChanHdl, |
|
|
double * |
pfActualValue |
|
) |
| |
◆ LCC_ReadActualValueUnscaled()
LCC_Func long LCC_CALL 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
◆ LCC_ReadStatus()
LCC_Func long LCC_CALL 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
◆ LCC_SetPIDParameter()
LCC_Func long LCC_CALL 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.
◆ LCC_SetSwScalingOn()
LCC_Func long LCC_CALL 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
◆ LCC_SetSwScalingParam()
LCC_Func long LCC_CALL 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()
◆ LCC_WriteSetPoint()
LCC_Func long LCC_CALL LCC_WriteSetPoint |
( |
dev_hdl |
ChanHdl, |
|
|
double |
fSetPointValue |
|
) |
| |
◆ LCC_WriteSetPointUnscaled()
LCC_Func long LCC_CALL 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