# Magtrol Dynamometer

Magtrol dynamometer controllers: DSP7001, DSP7002

- Category: Instruments
- Capabilities: trellis, Streams, Assets, Commands, Operations, Entities
- Runs on: Linux x64, Linux ARM64, macOS Apple silicon, macOS Intel, Windows x64

Read and control Magtrol DSP7000-series dynamometer controllers: speed, torque and power, and the load in closed-loop torque, closed-loop speed or open-loop current. Add one input per controller.

## What you get

- **Per channel** (one on a DSP7001, two on a DSP7002): `ch1/speed` (rpm), `ch1/torque` (in the torque unit you choose), `ch1/power` (W), `ch1/direction` (`cw` or `ccw`) and `ch1/alarm` (ok or alarm).
- **Commands per channel:**
  - `ch1/torque_sp` holds this torque (closed loop).
  - `ch1/speed_sp` holds this speed (closed loop).
  - `ch1/current_sp` sets open-loop brake current, in % of 1 A.
  - `ch1/load_off` releases the load.
- **A safe state:** `safe` releases the load on every channel. It turns the brake off and returns the controller to manual control, the same state as at power-on. A Trellis system's safe state can name it.
- Channels read `/magtrol/dyno/<device>/ch<n>/…`, such as `/magtrol/dyno/dyno1/ch1/torque`.

## Models

| Model | Channels |
|---|---|
| DSP7001 dynamometer controller | 1 |
| DSP7002 dynamometer controller | 2 |

The controller cannot be asked what it is, so choose its **Model**.

## Set up

1. Connect the controller's USB port, or its optional RS-232 card, and note the port. The controller has no network port of its own. To reach it over a network, put a serial-to-network bridge in front of it and use the bridge's `host:port`.
2. In **Inputs**, add **magtrol-dyno** and fill in:
   - **Device name**, such as `dyno1`.
   - **Model**: DSP7001 or DSP7002.
   - **Connection**: the port, such as `/dev/ttyUSB0` or `COM3`.
   - **Torque unit**: the unit torque is read and set in.
   - **Speed range (rpm)**: the highest speed of your setup. Speed control needs it.
   - **Line settings**: the baud rate set on the controller's front panel. RS-232 is 8 data bits, no parity, no handshake.
3. Press **Test connection**. It shows the controller's identity and a first reading.
4. Start the input.

When it opens, the input sets the controller's readout torque unit to the one you chose. The controller does not keep that setting over a power cycle, so the input sets it again after the line comes back.

## Power

The controller does not send power over this interface. `power` is computed from each reading's own speed and torque (P = T·ω), in watts, whatever the torque unit.

## Alarms

When the controller is in alarm, `alarm` reads alarm and `direction` is empty. The controller replaces the direction with its alarm mark. Reset an alarm on the controller's front panel. The manual gives no remote reset.

## What has run on a real instrument

| Model | Run on a real instrument |
|---|---|
| DSP7001, DSP7002 | No. Tested against a simulator written from the controller's manual. |

Not supported yet: the controller's binary block output, which reads up to 488 samples a second over USB. Its byte layout is not in the manual.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Device name | Text | Yes |  |
| Model | One of | Yes | This instrument cannot be asked what it is, so choose its model. |
| Connection | Text | Yes | The controller's USB or RS-232 port (/dev/ttyUSB0, COM3 or serial:<device>), or host:port of a serial-to-network bridge in front of it. |
| Poll rate (Hz) | Number | No |  |
| Torque unit | One of | No |  |
| Speed range (rpm) | Number | No |  |
| Serial baud rate | Number | No |  |
| Serial parity | One of | No |  |
