beckhoff TF4100 — 4.2.1.8.4 FB_CTRL_RAMP_GENERATOR_EXT

PLC API stParams consists of the following elements: TYPE ST_CTRL_RAMP_GENERATOR_PARAMS : STRUCT tTaskCycleTime : TIME; tCtrlCycleTime : TIME; fVeloPos : FLOAT; fVeloNeg : FLOAT; END_STRUCT END_TYPE 4.2.1.8.4 FB_CTRL_RAMP_GENERATOR_EXT This function block represents a parameterizable ramp generator. In contrast to FB_CTRL_RAMP_GENERATOR it supports E_CTRL_MODE . Description: This function block generates a ramp connecting the starting value fStartValue and the target value fTargetValue . The slope of the ramp (i.e. the velocity) is given in units/s by means of the fVeloPos and fVeloNeg parameters.

The start value is adopted when eCTRL_MODE_RESET changes to eCTRL_MODE_ACTIVE , and calculation of the ramp begins. As long as the function block remains in eCTRL_MODE_ACTIVE the target value can be changed, and the output value changes, taking the form of a ramp as it moves from the current value to the presently active target value. The current velocity is output at fVeloOut . It is possible to use this for feed forward in the control loop. TF4100 166 Version: 2.2.4 Name Type Description stParams ST CTRL RAMP _ _ GENERATOR _ _ PARAMS Parameter structure of the ramp generator Name Type Description tTaskCycleTime TIME Cycle time with which the control loop is processed.

This must be greater than or equal to the TaskCycleTime. The function block uses this input value to calculate internally whether the state and the output values have to be updated in the current cycle. tCtrlCycleTime TIME Cycle time with which the function block is called. If the function block is called in every task cycle this corresponds to the task cycle time of the calling task. fVeloPos FLOAT Velocity in unit/s, with which the output is changed from a lower value to a higher one. fVeloNeg FLOAT Velocity in unit/s, with which the output is changed from a higher value to a lower one.