MCV_FadeValueLreal
This FB is a utility FB which can be used in a PLC application.
This function block is used to output a delayed change in the value at the “ValueIn” input to the “ValueOut” output.
Here the user has the option to influence the change speed by specifying “ValueMaxFadePerCall” at the input and the amount by which the current value should change at the “ValueOut” per call until the value present at “ValueIn” is reached.
Block diagram
FB parameters
VAR_INPUT | ||
Variable name | Data type | Description |
ValueIn | LREAL | Target value which should be output at the “ValueOut” output. The “ValueIn“ input is defaulted to the value 0.0. |
ValueMaxFadePerCall | LREAL | Defines the change in the value currently output at the “ValueOut” output every time the function block is called. The change is effective until the same value is output at the “ValueOut” output as is present at the “ValueIn” input. |
VAR_OUTPUT | ||
Variable name | Data type | Description |
ValueOut | LREAL | Current output value |
Error | BOOL | Indicates TRUE when an error occurs. |
ErrorID | WORD | Error identifier |