labbCAN Controller API

Overview

Controller specific functions.

This module defines all labbCAN controller specific functions, identifiers and data types for control of measurement and control devices attached to the labbCAN bus. Controller modules are used for closed loop control like heating, cooling or something else. The control is performed by an internal control algorithm like PID or Fuzzy control. The labbCAN controller module offers a device independent API for access to all supported labbCAN measurement and control devices.

See also
See Controller Library for a detailed introduction and general overview of controller library.
+ Collaboration diagram for labbCAN Controller API:

Modules

 Channel Initialisation
 Controller module channel initialisation functions This group defines all functions to initialise controller channels properly.
 
 Common Channel Functions
 Common channel specific auxiliary functions.
 
 Control Channel Access
 Control channel access functions This group defines all functions for access to control parameters like setpoint or actual value.
 

Enumerations

enum  LoopOutType { ANALOG, DIGITAL, DIGITAL_PWM, PUMP_FLOW }
 Control loop output type This enumeration defines the output types for dynamic control channels. More...
 
enum  PIDParameterId {
  PID_PARAM_K = 0, PID_PARAM_T_I, PID_PARAM_T_D, PID_PARAM_DERIVATIVE_GAIN_LIMIT,
  PID_PARAM_T_T, PID_PARAM_MAX_U, PID_PARAM_MIN_U, PID_PARAM_DISABLED_U,
  PID_PARAM_INITIAL_SETPOINT, PID_PARAM_SAMPLE_TIME, PID_PARAM_COUNT
}
 ID parameter identifier Identifier for all PID control loop parameter that can be changed via LCC_SetPIDParameter. More...
 

Enumeration Type Documentation

Control loop output type This enumeration defines the output types for dynamic control channels.

See also
LCC_CreatePIDControlChannel
Enumerator
ANALOG 

plain analog output channel that can output an analog value

DIGITAL 

digital output that can output 0 or 1 - e.g. to switch a heating on / off

DIGITAL_PWM 

uses a digital output to generate a PWM by switching the channel on / off

PUMP_FLOW 

uses a pump a control loop output - e.g. for pressure controlled dosage

ID parameter identifier Identifier for all PID control loop parameter that can be changed via LCC_SetPIDParameter.

Before your can use a control loop, you should properly set all control loop parameters. You can use the QmixElements software for PID parameter testing and PID tuning.

See also
LCC_CreatePIDControlChannel
Enumerator
PID_PARAM_K 

proportional gain K

PID_PARAM_T_I 

integral time constant Ti

PID_PARAM_T_D 

differential time constant Td.

PID_PARAM_DERIVATIVE_GAIN_LIMIT 

the value the derivative gain is limited to. The derivative gain is computed from control loop error K and Td.

PID_PARAM_T_T 

value for dead time correction

PID_PARAM_MAX_U 

maximum control value

PID_PARAM_MIN_U 

minimum control value

PID_PARAM_DISABLED_U 

fixed control value that is set when the control loop is disabled.

PID_PARAM_INITIAL_SETPOINT 

the initial setpoint if no setpoint has been set (default 0)

PID_PARAM_SAMPLE_TIME 

sample time of pid control loop in milliseconds

PID_PARAM_COUNT 

this is just a delimter and not a real param