---
name: "ddt"
section: "9"
platform: "linux"
package: "linuxcnc-uspace"
version: "1:2.9.4-2+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ddt"
---

# ddt(9)

Compute the derivative of the input function

## NAME

ddt - Compute the derivative of the input function

## SYNOPSIS

**loadrt ddt \[count=*N*\|names=*name1*\[,*name2...*\]\]**

## DESCRIPTION

For every function call from the real time thread, calculate the difference between the old and current input value divided by the timer elapsed since the last call.

## FUNCTIONS

- **ddt.***N* (requires a floating-point thread)

  ## PINS

- **ddt.*N*.in float in**

  - **ddt.*N*.out float out**

  ## NOTES

As this only work on two consecutive input values, it will only work well if the input change every function call, and not work so well if the rate of change is very low and the input change do not happen every time the real time function is called.

## AUTHOR

Jeff Epler

## LICENSE

GPL
