LGF_LimRateOfChangeCI (FB / V3.0.1)


Author: Siemens Digital Industries

Short description

This function limits the rate of change of an input variable. A jump function becomes a ramp function.

Block Interface

LGF_LimRateOfChangeCI (FB)
LReal  value delayedValue  LReal
    
LReal  setChangeRate error  Bool
    
LReal  defaultOutValue status  Word
    
Bool  enDefaultOutValue subfunctionStatus  Word
    
OB_CYCLIC  callOB   
    
   

Input parameter

IdentifierData typeDefault valueDescription
valueLReal0.0Signal to be processed and limited in its rate of change
setChangeRateLReal0.0Rate of change of ramp function (1/second)
defaultOutValueLReal0.0Value for pre-assignment of the output variable
(`outputValue` = `defaultOutValue`)
enDefaultOutValueBoolFALSEAssign default output value
(`outputValue` = `defaultOutValue`)
callOBOB_CYCLIC---Calling wake-alarm interrupt OB (cyclic interrupt OB)

Output parameter

IdentifierData typeDescription
delayedValueLRealOutput variable
errorBoolFALSE: No error
TRUE: An error occurred during the execution of the FB
statusWord16#0000-16#7FFF: Status of the FB
16#8000-16#FFFF: Error identification (see following Table)
subfunctionStatusWordStatus or return value of called FB's, FC's and system blocks

Status & Error codes

Code / ValueIdentifier / Description
16#0000STATUS_FINISHED_NO_ERROR
Status: Execution finished without errors
16#8200ERR_NEG_RATE_LIM
Error: Negative rate of change. The parameter for the change rate must not be negative.
16#8600ERR_QRY_CINT
Error in `QRY_CINT` command - check `subFunctionStatus` code
16#8601ERR_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`.

Functional description

NOTE
The status of called commands is output in 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.

Interconnecting the cyclic interrupt OB

Pre-assigning an output

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.


Functional processes

The Figure below shows the ramp function sequence:

LGF_LimRateOfChangeCI

Change log

Version & DateChange description
01.00.00Siemens Industry Online Support
21.06.2016First released version
01.00.01Siemens Industry Online Support
02.01.2017Upgrade: TIA Portal V14 Update 1
01.00.02Siemens Industry Online Support
17.08.2018Upgrade: TIA V15 Update 2
01.00.03Siemens Industry Online Support
23.11.2018Upgrade: TIA V15.1
01.00.06Simatic Systems Support
15.11.2019Regions, comments and constants are added
03.00.00Simatic Systems Support
23.04.2020Set version to V3.0.0, harmonize the version of the whole library
03.00.01Simatic Systems Support
22.03.2021Insert documentation