Please enable JavaScript to view this site.

A function to linearly increment (build a ramp) a variable to a desired value.

For example, it can be useful to bring the ideal velocity of an axis to 0 with constant deceleration.

Syntax

real ramp (real value, real target, real acc [, real dec=acc])

value

Variable to be incremented (can be a register, a local variable, a kinematic unit, etc.)

target

Desired target value for the variable.

The function will stop only when value equals target

acc

Acceleration value to reach target

dec

Deceleration value to reach target. (optional, default acc)

Result

Returns the updated value of the incoming variable

Validity

Rule

Note

Acceleration must mean value to move away from 0.

Deceleration must mean value to move to 0

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC