| Volume BaseComponent | |
| Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class CompModePID
|
||
|---|---|---|
| Version | 1.0 | |
| Modified | 29-JUN-2006 13:22:18.35 | |
| Code | rt_plc_bcomp.c | |
Used to select control modes (MANUAL / AUTO / CASCADE)
or forced control of CompPid objects.
The control modes are:
- MANUAL -- when the 'operator' sets the output of the
Pid object
- AUTO -- when the 'operator' chooses the set point
value
- CASCADE -- the output from a Pid object is used to
adjust the set point value in a
secondary Pid object.
Forced control means that the control signal from the
Pid object is not taken from the PID-algorithm but from
the XForcVal-attribute in the Mode object. See control
examples at the CompPid object.
Object graph
Plc coding
For plc coding the function object CompModePID_Fo is used.

Create a function object in the plc editor and connect it to the current object with the connect function.See also
| RtBody attributes pwr_sClass_CompModePID | |||
|---|---|---|---|
| String104 | Description | Optional description. |
|
| Float32 | XSetVal | External set point value. This value is used only in the control mode CASCADE in such a way that SetVal = XSetVal. |
|
| Float32 | ProcVal | Process value. Only used to show the process value in the object display of the Mode object. |
|
| Float32 | XForcVal | External forced control value. This value is used only at forced control (i.e. Force1 or Force2 is set) in such a way that ForceVal = XForceVal. |
|
| Boolean | Forc1 | Specifies whether to enable or disable unconditional forced control; see figure 3-29, p. 3-209. FALSE disables the unconditional forced control function; TRUE means that ForcVal = XForceVal and Force is set. In a usual configuration the value of ForcVal is used as control signal by the Pid object. |
|
| Boolean | Forc2 | Specifies whether to enable or disable forced control when OpMod = AUTO or CASCADE. FALSE disables the conditional forced control function; TRUE means that ForcVal = XForceVal and Force is set -- if, and only if, -- OpMod = AUTO or CASCADE. In a usual configuration the value of ForcVal is used as control signal by the Pid object in this case. |
|
| Float32 | OutVal | The value of the last set control signal. Is usually fetched by means of an analog feedback connection to the OutVal of the Pid object. When the controlled loop is switched to MANUAL control, the process will "bump" unless ForcVal is aligned with the present process value. To avoid this ForcVal is set equal to OutVal at the switching to MANUAL control. |
|
| Float32 | SetVal | Current set point value used in the control modes AUTO and CASCADE. The value may be changed in the control modes MANUAL and AUTO, e.g. from the object display of the Mode object. At CASCADE control SetVal is internally assigned the value of XSetVal; i.e. SetVal = XSetVal. |
|
| Float32 | ForcVal | In the usual configuration the value of ForcVal is used as control signal by the Pid object in the following cases: 1 unconditional forced control, i.e. Forc1 is set. ForceVal = XForceVal. 2 conditional forced control when Force2 is set and OpMod = AUTO or CASCADE. ForceVal = XForceVal. 3 OpMod = MANUAL. ForcVal is manipulated by the operator, e.g. from the object display of the Mode object. |
|
| Boolean | Force | Specifies, for instance, to a subsequent Pid object, whether to use the result of the algorithm or not as a control signal. FALSE means AUTO or CASCADE control, i.e. the control signal depends on the result of the algorithm. TRUE means forced control or MANUAL control. |
|
| Boolean | AutMode | Indicates if the control mode AUTO is selected or not. FALSE means that AUTO is not the control mode; TRUE means that AUTO is the control mode. A subsequent Pid object does not have to make any distinction between AUTO or CASCADE, so this attribute is often used only as information. |
|
| Boolean | CascMod | Indicates if the control mode CASCADE is selected or not. FALSE means that CASCADE is not the control mode; TRUE means that CASCADE is the control mode. A subsequent Pid object does not have to make any distinction between AUTO or CASCADE, so this attribute is often used only as information. |
|
| Boolean | ManMode | Indicates if the control mode MANUAL is selected or not. FALSE means that MANUAL is not the control mode; TRUE means that MANUAL is the control mode. This attribute is used only as information. |
|
| PidOpModeEnum | OpMod | Specifies the actual control mode. The value is changed from the object display of the Mode object. = 1 MANUAL. The operator selects the control signal of the controller. The control signal is forced to the value of ForceVal. MinOut and MaxOut define the valid interval of the control signal. = 2 AUTO. The operator selects and sets the set point value, SetVal. MinSet and MaxSet define the valid interval of SetVal. The controller uses SetVal as set point value and calculates the control signal. = 4 CASCADE. The controller uses XSetVal as set point value and calculates the control signal. Illustrates the Connection between Forced Control and Control Modes |
|
| PidModeEnum | AccMod | The operator's authorities to change OpMod. The possible bit map values allow the following modes: 1 -- Only MANUAL 2 -- Only AUTO 3 -- MANUAL / AUTO 4 -- Only CASCADE 5 -- CASCADE / MANUAL 6 -- CASCADE / AUTO 7 -- MANUAL / AUTO / CASCADE |
|
| Int32 | AccOut | The operator's authorities to change ForcVal. 0 -- Changes not allowed. = 0 -- Changes allowed. |
|
| Float32 | MinOut | The choice of the operator of ForcVal is checked against the interval { MinOut, MaxOut}. ForcVal may be changed in the control mode MANUAL from the display of the Mode object. |
|
| Float32 | MaxOut | ||
| Float32 | SetMinShow | The lower respectively upper limits in the bar graphs at presentation of process and set point values in the Mode object display. The values may be changed in the more info form of the Mode object. |
|
| Float32 | SetMaxShow | ||
| String16 | SetEngUnit | Specifies the engineering unit of SetVal / XSetVal / SetMinShow / SetMaxShow, e.g. kg. Used in the Mode object display. OutEngUnit |
|
| FloatPrecisionEnum | SetPrecision | Specifies the number of characters displayed after the decimal point for set value and process value in the object graph. |
|
| Float32 | OutMinShow | The lower respectively upper limits in the bar graph at presentation of the control signal, OutVal, of the Pid object in the Mode display. The values may be changed in the more info form of the Mode object. |
|
| Float32 | OutMaxShow | ||
| String16 | OutEngUnit | Specifies the engineering unit of OutVal / Force / OutMinShow / OutMaxShow e.g. %. Used in the Mode object display. |
|
| FloatPrecisionEnum | OutPrecision | Specifies the number of characters displayed after the decimal point for output value in the object graph. |
|
| Float32 | Error | The difference between process value and set value. | |
| Float32 | ErrorMinShow | The lower respectively upper limits in the graphical display of the error in the object graph. |
|
| Float32 | ErrorMaxShow | ||
| Boolean | AdjustableRanges | Specifies that the ranges for set value, process value and output in the object graph can be adjusted. |
|
| Int32 | AccSet | The operator's authorities to change SetVal. 0 -- Changes not allowed. = 0 -- Changes allowed. |
|
| Float32 | MinSet | The choice of the operator of SetVal is checked against the interval { MinSet, MaxSet}. The value may be changed in the control modes MANUAL and AUTO from the display of the Mode object. |
|
| Float32 | MaxSet | ||
| AttrRef | PidObjDid | Specifies the complete name of the Pid object associated to this Mode object. The attribute makes it possible to start the object display of the associated Pid from a button in the object display of the Mode |
|
| AttrRef | PlcConnect | The plc function object connected to this object. | |
| Template Object | |
|---|---|
| OpMod | 1 |
| AccMod | 3 |
| AccOut | 15 |
| MaxOut | 1.000000e+02 |
| SetMaxShow | 1.000000e+02 |
| SetEngUnit | % |
| SetPrecision | 1 |
| OutMaxShow | 1.000000e+02 |
| OutEngUnit | % |
| OutPrecision | 1 |
| ErrorMinShow | -1.000000e+01 |
| ErrorMaxShow | 1.000000e+01 |
| AccSet | 15 |
| MaxSet | 1.000000e+02 |
| Description Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | String104 | |
| Flags | ||
| Body | RtBody | |
Optional description.
| XSetVal Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
External set point value. This value is used only in the control mode CASCADE in such a way that SetVal = XSetVal.
| ProcVal Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
Process value. Only used to show the process value in the object display of the Mode object.
| XForcVal Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
External forced control value. This value is used only at forced control (i.e. Force1 or Force2 is set) in such a way that ForceVal = XForceVal.
| Forc1 Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Boolean | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
Specifies whether to enable or disable unconditional forced control; see figure 3-29, p. 3-209. FALSE disables the unconditional forced control function; TRUE means that ForcVal = XForceVal and Force is set. In a usual configuration the value of ForcVal is used as control signal by the Pid object.
| Forc2 Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Boolean | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
Specifies whether to enable or disable forced control when OpMod = AUTO or CASCADE. FALSE disables the conditional forced control function; TRUE means that ForcVal = XForceVal and Force is set -- if, and only if, -- OpMod = AUTO or CASCADE. In a usual configuration the value of ForcVal is used as control signal by the Pid object in this case.
| OutVal Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
The value of the last set control signal. Is usually fetched by means of an analog feedback connection to the OutVal of the Pid object. When the controlled loop is switched to MANUAL control, the process will "bump" unless ForcVal is aligned with the present process value. To avoid this ForcVal is set equal to OutVal at the switching to MANUAL control.
| SetVal Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
Current set point value used in the control modes AUTO and CASCADE. The value may be changed in the control modes MANUAL and AUTO, e.g. from the object display of the Mode object. At CASCADE control SetVal is internally assigned the value of XSetVal; i.e. SetVal = XSetVal.
| ForcVal Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
In the usual configuration the value of ForcVal is used
as control signal by the Pid object in the following
cases:
1 unconditional forced control, i.e. Forc1 is set.
ForceVal = XForceVal.
2 conditional forced control when Force2 is set and
OpMod = AUTO or CASCADE. ForceVal = XForceVal.
3 OpMod = MANUAL. ForcVal is manipulated by the
operator, e.g. from the object display of the Mode
object.
| Force Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Boolean | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
Specifies, for instance, to a subsequent Pid object, whether to use the result of the algorithm or not as a control signal. FALSE means AUTO or CASCADE control, i.e. the control signal depends on the result of the algorithm. TRUE means forced control or MANUAL control.
| AutMode Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Boolean | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
Indicates if the control mode AUTO is selected or not. FALSE means that AUTO is not the control mode; TRUE means that AUTO is the control mode. A subsequent Pid object does not have to make any distinction between AUTO or CASCADE, so this attribute is often used only as information.
| CascMod Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Boolean | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
Indicates if the control mode CASCADE is selected or not. FALSE means that CASCADE is not the control mode; TRUE means that CASCADE is the control mode. A subsequent Pid object does not have to make any distinction between AUTO or CASCADE, so this attribute is often used only as information.
| ManMode Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Boolean | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
Indicates if the control mode MANUAL is selected or not. FALSE means that MANUAL is not the control mode; TRUE means that MANUAL is the control mode. This attribute is used only as information.
| OpMod Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | PidOpModeEnum | |
| Flags | ReduTransfer | |
| Body | RtBody | |
Specifies the actual control mode. The value is changed
from the object display of the Mode object.
= 1 MANUAL. The operator selects the control signal
of the controller. The control signal is forced
to the value of ForceVal. MinOut and MaxOut define
the valid interval of the control signal.
= 2 AUTO. The operator selects and sets the set
point value, SetVal.
MinSet and MaxSet define the valid interval of SetVal.
The controller uses SetVal as set point value and
calculates the control signal.
= 4 CASCADE. The controller uses XSetVal as set
point value and calculates the control signal.

Illustrates the Connection between Forced Control and Control Modes
| AccMod Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | PidModeEnum | |
| Flags | ||
| Body | RtBody | |
The operator's authorities to change OpMod. The possible bit map values allow the following modes: 1 -- Only MANUAL 2 -- Only AUTO 3 -- MANUAL / AUTO 4 -- Only CASCADE 5 -- CASCADE / MANUAL 6 -- CASCADE / AUTO 7 -- MANUAL / AUTO / CASCADE
| AccOut Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Int32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
The operator's authorities to change ForcVal. 0 -- Changes not allowed. = 0 -- Changes allowed.
| MinOut Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
The choice of the operator of ForcVal is checked
against the interval { MinOut, MaxOut}. ForcVal may be
changed in the control mode MANUAL from the display of
the Mode object.
| MaxOut Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
| SetMinShow Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
The lower respectively upper limits in the bar graphs at presentation of process and set point values in the Mode object display. The values may be changed in the more info form of the Mode object.
| SetMaxShow Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
| SetEngUnit Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | String16 | |
| Flags | ||
| Body | RtBody | |
Specifies the engineering unit of SetVal / XSetVal / SetMinShow / SetMaxShow, e.g. kg. Used in the Mode object display. OutEngUnit
| SetPrecision Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | FloatPrecisionEnum | |
| Flags | ||
| Body | RtBody | |
Specifies the number of characters displayed after the decimal point for set value and process value in the object graph.
| OutMinShow Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
The lower respectively upper limits in the bar graph at presentation of the control signal, OutVal, of the Pid object in the Mode display. The values may be changed in the more info form of the Mode object.
| OutMaxShow Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
| OutEngUnit Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | String16 | |
| Flags | ||
| Body | RtBody | |
Specifies the engineering unit of OutVal / Force / OutMinShow / OutMaxShow e.g. %. Used in the Mode object display.
| OutPrecision Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | FloatPrecisionEnum | |
| Flags | ||
| Body | RtBody | |
Specifies the number of characters displayed after the decimal point for output value in the object graph.
| Error Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer|State|Noedit | |
| Body | RtBody | |
The difference between process value and set value.
| ErrorMinShow Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
The lower respectively upper limits in the graphical display of the error in the object graph.
| ErrorMaxShow Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
| AdjustableRanges Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Boolean | |
| Flags | ReduTransfer | |
| Body | RtBody | |
Specifies that the ranges for set value, process value and output in the object graph can be adjusted.
| AccSet Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Int32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
The operator's authorities to change SetVal. 0 -- Changes not allowed. = 0 -- Changes allowed.
| MinSet Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
The choice of the operator of SetVal is checked against
the interval { MinSet, MaxSet}. The value may be
changed in the control modes MANUAL and AUTO from the
display of the Mode object.
| MaxSet Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | Float32 | |
| Flags | ReduTransfer | |
| Body | RtBody | |
| PidObjDid Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | AttrRef | |
| Flags | ||
| Body | RtBody | |
Specifies the complete name of the Pid object associated to this Mode object. The attribute makes it possible to start the object display of the associated Pid from a button in the object display of the Mode
| PlcConnect Attribute | ||
|---|---|---|
| Class | Attribute | |
| Type | AttrRef | |
| Flags | ||
| Body | RtBody | |
The plc function object connected to this object. This attribute is set when the function object is connected from the plc editor by the connect function.