L_MC1P_RampGenerator

This FB is a ramp function generator with S-shaped ramps for limiting the increase over time of analog signals. The S-shape of the ramps is a result of trapezoidal acceleration.

  • The ramp function generator is provided with a setting function so that a value can directly be loaded into the internal ramp generator.
  • The acceleration/deceleration time is set via inputs lrAcc (acceleration) and lrDec (deceleration).
  • For a jerk-free acceleration, the jerk can be set via the lrJerk input.
  • At the lrSetAccDecOut output, the gradient dy/dt of the lrSetVelOut output signal is shown.

 

 

 

L_MC1P_RampGenerator

 

 

 

LREAL

-

lrSetVel

lrSetVelOut

-

LREAL

LREAL

-

lrAcc

lrSetAccDecOut

-

LREAL

LREAL

-

lrDec

LREAL

-

lrJerk

BOOL

-

xLoadStartValue

LREAL

-

lrStartValue

 

 

 

 

 

 

 

 

Inputs

Name

Data type

Information/possible settings

lrSetVel

LREAL

Velocity for ramp generation [unit/s]

lrAcc

LREAL

Acceleration for ramp generation [unit/s²]

  • Setting '0': maximum acceleration, i.e. the speed difference is generated within one cycle.

lrDec

LREAL

Deceleration for ramp generation [unit/s²]

  • Setting '0': maximum deceleration, i.e. the speed difference is reduced within one cycle.

lrJerk

LREAL

Acceleration and deceleration jerk for ramp generation [unit/s³]

  • Setting '0': jerk limitation deactivated, for the use of linear acceleration ramps

xLoadStartValue

BOOL

Initialise ramp function generator

TRUE

The value of lrStartValue is output at output lrSetVelOut . Output lrSetAccDecOut remains set to '0'.

FALSE

The ramp function generator runs from starting value lrStartValue to the setpoint at lrSetVel . Acceleration and deceleration correspond to the values defined at lrAcc and lrDec .

lrStartValue

LREAL

Starting value for the ramp function generator

Value is accepted if xLoadStartValue = TRUE.

Outputs

Name

Data type

Value/meaning

lrSetVelOut

LREAL

Output signal

lrSetAccDecOut

LREAL

Acceleration of the ramp function generator

  • Time reference: 1s
Loading the ramp function generator

By setting xLoadStartValue to TRUE, the ramp function generator is loaded with the signal at lrStartValue .

This value is accepted immediately and is shown at the lrSetVelOut output. No acceleration or deceleration via an S-shaped ramp takes place.

As long as xLoadStartValue = TRUE, the ramp function generator is inhibited.

Acceleration and jerk

The maximum acceleration ( lrAcc ) and the jerk ( lrJerk ) can be set separately.

A: acceleration ( lrAcc )

B: jerk ( lrJerk )

Diagrams relating to the acceleration and jerk