Volume pwrb | |
Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class Filter | ||
---|---|---|
Version | 1.0 | |
Modified | 26-MAY-2023 14:29:26.00 | |
Code | rt_plc_arithm.c |
First Order Lag Filter.
The input signal gets an exponential smoothing. VAL = a * In + (1 - a) * X = X + a * (In - X) , where X = FeedB, if FeedB is connected, ActVal[t-1] otherwise a = 1 - 1 / (1 + ScanTime / FiltCon) An external signal may also be used as feedback; e.g.
Example
If a (= ScanTime / FiltCon) is small, 0.1 - 0.2, the output gets a character of a slowly moving average.
RtBody attributes pwr_sClass_filter | |||
---|---|---|---|
Float32 | In | IN | Value of the input signal. |
Float32 | FeedB | FB | External feedback. If the input is left open the VAL-output will be used as an internal input signal. |
Float32 | ActVal | VAL | Output signal, see above. |
Pointer to Float32 | ScanTime | ScanTime | The program cycle period (= sampling interval), in seconds, is stored automatically at the compilation. |
Float32 | FiltCon | FiltCon | The filter constant, in seconds, can be fixed or adjustable. FiltCon > ScanTime is a valid value. FiltCon = ScanTime makes no filtering. |
Int32 | AccCon | AccCon | The operator's authorities to change FiltCont. 0 -- Changes not allowed. != 0 -- Changes allowed. |
Float32 | MinCon | MinCon | The minimum and maximum allowed value of FiltCon at changes made by an operator. |
Float32 | MaxCon | MaxCon |
DevBody attributes | |||
---|---|---|---|
PlcNode | PlcNode |
GraphPlcNode | |
---|---|
object_type | 127 |
parameters[0] | 2 |
parameters[1] | 0 |
parameters[2] | 1 |
parameters[3] | 0 |
subwindows | 0 |
graphmethod | 0 (standard, individual attributes) |
graphindex | 0 |
default_mask[0] | 1 |
default_mask[1] | 1 |
segname_annotation | 1 |
compmethod | 32 |
compindex | 0 |
tracemethod | 0 |
traceindex | 0 |
executeordermethod | 2 |
objname | Filter |
graphname | Filter |
debugpar |
In Input | ||
---|---|---|
Class | Input | |
Type | Float32 | |
Flags | REDUTRANSFER | |
GraphName | IN | |
Body | RtBody |
Value of the input signal.
FeedB Input | ||
---|---|---|
Class | Input | |
Type | Float32 | |
Flags | STATE | NOEDIT | REDUTRANSFER | |
GraphName | FB | |
Body | RtBody |
External feedback. If the input is left open the VAL-output will be used as an internal input signal.
ActVal Output | ||
---|---|---|
Class | Output | |
Type | Float32 | |
Flags | STATE | NOEDIT | REDUTRANSFER | |
GraphName | VAL | |
Body | RtBody |
Output signal, see above.
ScanTime Intern | ||
---|---|---|
Class | Intern | |
Type | Pointer to Float32 | |
Flags | INVISIBLE | POINTER | PRIVATE | |
GraphName | ScanTime | |
Body | RtBody |
The program cycle period (= sampling interval), in seconds, is stored automatically at the compilation.
FiltCon Intern | ||
---|---|---|
Class | Intern | |
Type | Float32 | |
Flags | REDUTRANSFER | |
GraphName | FiltCon | |
Body | RtBody |
The filter constant, in seconds, can be fixed or adjustable. FiltCon > ScanTime is a valid value. FiltCon = ScanTime makes no filtering.
AccCon Intern | ||
---|---|---|
Class | Intern | |
Type | Int32 | |
Flags | ||
GraphName | AccCon | |
Body | RtBody |
The operator's authorities to change FiltCont. 0 -- Changes not allowed. != 0 -- Changes allowed.
MinCon Intern | ||
---|---|---|
Class | Intern | |
Type | Float32 | |
Flags | ||
GraphName | MinCon | |
Body | RtBody |
The minimum and maximum allowed value of FiltCon at changes made by an operator.
MaxCon Intern | ||
---|---|---|
Class | Intern | |
Type | Float32 | |
Flags | ||
GraphName | MaxCon | |
Body | RtBody |
PlcNode Buffer | ||
---|---|---|
Class | Buffer | |
Type | PlcNode | |
Flags | INVISIBLE | |
Body | DevBody |