This function limits the rate of change of an input variable. A jump function becomes a ramp function.
LGF_LimRateOfChangeCI (FB) | ||||||||
---|---|---|---|---|---|---|---|---|
LReal | value | delayedValue | LReal | |||||
LReal | setChangeRate | error | Bool | |||||
LReal | defaultOutValue | status | Word | |||||
Bool | enDefaultOutValue | subfunctionStatus | Word | |||||
OB_CYCLIC | callOB | |||||||
Identifier | Data type | Default value | Description |
---|---|---|---|
value | LReal | 0.0 | Signal to be processed and limited in its rate of change |
setChangeRate | LReal | 0.0 | Rate of change of ramp function (1/second) |
defaultOutValue | LReal | 0.0 | Value for pre-assignment of the output variable (`outputValue` = `defaultOutValue`) |
enDefaultOutValue | Bool | FALSE | Assign default output value (`outputValue` = `defaultOutValue`) |
callOB | OB_CYCLIC | --- | Calling wake-alarm interrupt OB (cyclic interrupt OB) |
Identifier | Data type | Description |
---|---|---|
delayedValue | LReal | Output variable |
error | Bool | FALSE: No error TRUE: An error occurred during the execution of the FB |
status | Word | 16#0000-16#7FFF: Status of the FB 16#8000-16#FFFF: Error identification (see following Table) |
subfunctionStatus | Word | Status or return value of called FB's, FC's and system blocks |
Code / Value | Identifier / Description |
---|---|
16#0000 | STATUS_FINISHED_NO_ERROR Status: Execution finished without errors |
16#8200 | ERR_NEG_RATE_LIM Error: Negative rate of change. The parameter for the change rate must not be negative. |
16#8600 | ERR_QRY_CINT Error in `QRY_CINT` command - check `subFunctionStatus` code |
16#8601 | ERR_OB_UNAVAILABLE Error: OB on input `callOB` is not configured / present. Interconnect the constant name of a configured cyclic interrupt OB at the input `callOB`. |
subFunctionStatus
. In this case, the output value in status
indicates which command caused the error. In this case, refer to the TIA Portal Online Help section for information on the respective commands.The ramp is a limit line and refers to a rate of change per second; if, for example, setChangeRate = 10.0
is parameterized at a sampling time of 1s/100ms/10ms for every block call, then if value > delayedValue
, 10.0/1.0/0.1 is added to delayedValue
until value
is reached.
The limitation of the rate of change applies to both positive and negative values for the rise and fall.
The output delayedValue
can be preset or initialized.
The time interval of the calling cyclic interrupt OB is determined by interconnecting the calling cyclic interrupt OB at the input parameter callOB
.
If enDefaultOutValue = TRUE
is set, the value at defaultOutValue
is output. When changing from TRUE
to FALSE
, the output delayedValue
is ramped from defaultOutValue
to value
. When changing from FALSE
to TRUE
, the output delayedValue
immediately jumps to defaultOutValue
.
The Figure below shows the ramp function sequence:
Version & Date | Change description | |
---|---|---|
01.00.00 | Siemens Industry Online Support | |
21.06.2016 | First released version | |
01.00.01 | Siemens Industry Online Support | |
02.01.2017 | Upgrade: TIA Portal V14 Update 1 | |
01.00.02 | Siemens Industry Online Support | |
17.08.2018 | Upgrade: TIA V15 Update 2 | |
01.00.03 | Siemens Industry Online Support | |
23.11.2018 | Upgrade: TIA V15.1 | |
01.00.06 | Simatic Systems Support | |
15.11.2019 | Regions, comments and constants are added | |
03.00.00 | Simatic Systems Support | |
23.04.2020 | Set version to V3.0.0, harmonize the version of the whole library | |
03.00.01 | Simatic Systems Support | |
22.03.2021 | Insert documentation |