Structure Definitions
ST_ControllerParameter
TYPE ST_ParaControlValue :
STRUCT
(***********************************************************************)
(* general parameters *)
iMode : E_ControlMode; (* 1=heating, 2=cooling,
3=heating&cooling *)
iReactionOnFailure : E_ReactionOnFailure; (* 0=controller off,
1=manual op, 2=yMin, 3=yMax *)
fYTune : LREAL; (* step change while tuning operation *)
fYStable : LREAL; (* tuning operation *)
dwAlarmSupp : DWORD; (* alarm suppression *)
tCtrlCycleTime : TIME; (* controller cycle time *)
tTaskCycleTime : TIME; (* plc task cycle time *)
(***********************************************************************)
(* setpoint parameters *)
fWMin : LREAL; (* lower limit *)
fWMax : LREAL; (* upper limit *)
(* start up *)
fWStartUp : LREAL; (* soft start plateau setpoint *)
tStartUp : TIME; (* soft start waiting time*)
bStartUpRamping : BOOL; (* enable ramping while start up phase
*)
fWStartUpVeloPos : LREAL; (* max gradient for increasing
setpoint in start up phase*)
fWStartUpVeloNeg : LREAL; (* max gradient for decreasing
setpoint in start up phase *)
fWVeloPos : LREAL; (* max gradient for increasing setpoint
*)
fWVeloNeg : LREAL; (* max gradient for decreasing setpoint
*)
(***********************************************************************)
(* actual value parameters *)
bFilter : BOOL;
tFilter : TIME;
(***********************************************************************)
(* control value parameters *)
fYMin : LREAL; (* lower limit *)
fYMax : LREAL; (* upper limit *)
fYManual : LREAL; (* manual operation*)
fYOnFailure : LREAL; (* control value on failure *)
tPWMCycleTime : TIME; (* PWM *)
(***********************************************************************)
(* controller settings *)
bEnablePreController : BOOL; (* enable precontroller *)
bEnableZones : BOOL; (* enable zone around setpoint with open
loop control *)
bEnableCVFilter : BOOL; (* enable filter for CV (type see
iFilterType) *)
iFilterType : E_FilterType; (* filtertype of CV filter *)
iControllerType : E_ControllerType; (* used controller normally
PID *)
(***********************************************************************)
(* min max temperatures *)
TempLow : LREAL;
TempLowLow : LREAL;
TempHigh : LREAL;
TempHighHigh : LREAL;
TempAbsoluteHigh : LREAL;
TempAbsoluteLow : LREAL;
(***********************************************************************)
(* internal tuning parameters *)
fTuneKp : LREAL := 1.2;
fTuneTn : LREAL := 2.0;
fTuneTv : LREAL := 0.42;
fTuneTd : LREAL := 0.25;
END_STRUCT
END_TYPE
Description
Name | Unit | Value range | Description |
---|---|---|---|
| none | INT | Controller operation mode (1 = heating, 2 = cooling, 3 = heating & cooling) (see below) |
| none | INT | Parameterizable reaction to errors (see below) |
| none | LREAL | Control value during the self-tuning (normally 100%) |
| none | LREAL | Control value during the settling phase (normally 0%) |
| none | DWORD | Masks out the alarms (see below) |
| s | TIME | Controller's sampling time. In the course of the sampling time the controller re-calculates the control value. |
| s | TIME | Task cycle time. The FB is called with this time interval. |
| K | LREAL | Minimum setpoint. |
| K | LREAL | Maximum setpoint. |
| K/s | LREAL | Rate of rise (of ramp). |
| K/s | LREAL | Rate of fall (of ramp). |
| K | LREAL | Setpoint at start-up. |
| s | TIME | Time with the fWStartUp setpoint. |
| none | [TRUE,FALSE] | Switches on ramping during the start-up phase. |
| K/s | LREAL | Rate of rise (of ramp) during the start-up phase. |
| K/s | LREAL | Rate of fall (of ramp) during the start-up phase |
| none | LREAL | Minimum value of the control value. |
| none | LREAL | Maximum value of the control value. |
| none | LREAL | Control value in manual operation. |
| none | LREAL | Control value in case of error (parameterizable). |
| s | TIME | Cycle time of the PWM signal. |
| s | TIME | Time constant of the actual value filter (first order P-T1 filter) |
| none | [TRUE,FALSE] | The actual value filter is actuated if TRUE. |
| none | [TRUE,FALSE] | Switches pre-controller on. |
| none | [TRUE,FALSE] | Switches open loop characteristic on until close to setpoint. |
| none | [TRUE,FALSE] | Switches on control value filter following the main controller. |
| none | ENUM | Selection of a filter type for the control value filter following the main controller (see below). |
| none | ENUM | Selection of a control algorithm (see below) |
| K | LREAL | Relative lower temperature limit in the first band. |
| K | LREAL | Relative lower temperature limit in the second band. |
| K | LREAL | Relative upper temperature limit in the first band. |
| K | LREAL | Relative upper temperature limit in the second band. |
| K | LREAL | Absolute upper temperature limit. |
| K | LREAL | Absolute lower temperature limit. |
| none | LREAL | FineTuning parameters for the PID controller (only for advanced users) |
| none | LREAL | FineTuning parameters for the PID controller (only for advanced users) |
| none | LREAL | FineTuning parameters for the PID controller (only for advanced users) |
| none | LREAL | FineTuning parameters for the PID controller (only for advanced users) |
Description
ST_ParaController
TYPE ST_ParaController :
STRUCT
(* Main Controller parameter set *)
KpMain : LREAL;
TnMain : LREAL;
TvMain : LREAL;
TdMain : LREAL;
(* Pre Controller parameter set *)
KpPre : LREAL;
TvPre : LREAL;
TdPre : LREAL;
END_STRUCT
END_TYPE
Description
Name | Unit | Value range | Description |
---|---|---|---|
| none | LREAL | Amplification factor for the main controller. |
| s | TIME | Integral action time for main controller (I component). |
| s | TIME | Derivative action time for main controller (D component). |
| s | TIME | Damping time for the main controller. |
| none | LREAL | Amplification factor for the pre-controller. |
| s | TIME | Derivative action time for pre-controller (D component). |
| s | TIME | Damping time for the pre-controller. |
ENUM: error codes
Name | Description |
---|---|
| No error. |
| Invalid parameter. |
| Missing function block initialization. |
| No inflection was found during self-tuning. No parameters could be determined. |
| Invalid parameter. |
| Invalid combination of cycle times (sampling times and PWM cycle times). |
| A valid value for the Tu parameter could not be found due to faulty or aborted self-tuning. |
ENUM: ReactionOnFailure
Name | Description |
---|---|
| No error. |
| If there is an error (an alarm) the controller will stop. |
| If there is an error (an alarm) the controller will switch to manual operation. |
| If there is an error (an alarm) set the control value to its maximum. |
| If there is an error (an alarm) set the control value to its minimum. |
ENUM: ST_ControlMode
Name | Description |
---|---|
| Heating only. |
| Cooling only. |
| Heating and cooling. |
ENUM: states
Name | Description |
---|---|
| Controller switched off. |
| Controller is being initialized. |
| Controller switched off, was previously switched on. |
| Controller in tuning / self-tuning state. |
| Controller in manual operation. |
| Controller in automatic operation. |
| Tuning started but not yet running. Waiting for idle. |
| Pulse for determination of dead time. |
| Step for determination of dead time and maximum velocity. |
| Self-tuning complete. |
| Error (logical error). |
ENUM: E_FilterType
Name | Description |
---|---|
| First order filter. |
| Mean value filter. |
ENUM: E_ControllerType
Name | Description |
---|---|
| Standard PID control algorithm. |
| Planned serial PID control algorithm. |
Bit-masks for alarms
Name | Mask | Description |
---|---|---|
nAlarmOpenThermocouple | 2#0000_0000_0000_0000_0000_0000_0000_0001 | Hardware: open temperature sensor |
nAlarmReverseThermocouple | 2#0000_0000_0000_0000_0000_0000_0000_0010 | Hardware: reverse connected temperature sensor |
nAlarmBackVoltage | 2#0000_0000_0000_0000_0000_0000_0000_0100 | Hardware: excessive voltage at temperature sensor |
nAlarmLeakageCurrent | 2#0000_0000_0000_0000_0000_0000_0000_1000 | Hardware: leakage current measured |
nAlarmShortCircuit | 2#0000_0000_0000_0000_0000_0000_0001_0000 | Hardware: short circuit |
nAlarmOpenCircuit | 2#0000_0000_0000_0000_0000_0000_0010_0000 | Hardware: no current |
nAlarmLimitLow | 2#0000_0000_0000_0000_0000_0001_0000_0000 | Software: fallen below first lower relative temperature |
nAlarmLimitLowLow | 2#0000_0000_0000_0000_0000_0010_0000_0000 | Software: fallen below second lower relative temperature |
nAlarmLimitHigh | 2#0000_0000_0000_0000_0000_0100_0000_0000 | Software: first upper relative temperature exceeded |
nAlarmLimitHighHigh | 2#0000_0000_0000_0000_0000_1000_0000_0000 | Software: second upper relative temperature exceeded |
nAlarmAbsoluteHigh | 2#0000_0000_0000_0000_0001_0000_0000_0000 | Software: upper absolute temperature exceeded |
nAlarmAbsoluteLow | 2#0000_0000_0000_0000_0010_0000_0000_0000 | Software: fallen below lower absolute temperature |