Skip to content

Motion

The commands that move the motor and the frames that come back.

Send_data_pack_1

ID 2host → driver2 or 5 or 8 bytesPython: Send_data_pack_1()

The motion command. Its length decides the control mode the driver enters: 8 bytes command a position with a speed and a current feedforward, 5 bytes a speed with a current feedforward, 2 bytes a current. Send 0 for a feedforward you do not use. A frame of any other length is ignored (the driver flags it as a wrong data length) but still answered.

8 bytes — position setpoint with speed and current feedforward (position mode)

Byte Bit Field Type Meaning
0-2 Position setpoint signed 24-bit encoder ticks
3-5 Speed feedforward signed 24-bit encoder ticks/s
6-7 Current feedforward signed 16-bit mA

5 bytes — speed setpoint with current feedforward (velocity mode)

Byte Bit Field Type Meaning
0-2 Speed setpoint signed 24-bit encoder ticks/s
3-4 Current feedforward signed 16-bit mA

2 bytes — current setpoint (current mode)

Byte Bit Field Type Meaning
0-1 Current setpoint signed 16-bit mA

The driver answers with Respond_data_pack_1.

Every form resets the watchdog. With Rstint set, the integral accumulators are cleared on each new setpoint.


Send_data_pack_PD

ID 4host → driver8 bytesPython: Send_data_pack_PD()

Puts the driver in impedance (PD) mode and sets the position, speed and current feedforward of the PD loop, whose gains are KP and KD (Send_PD_Gains).

8 bytes

Byte Bit Field Type Meaning
0-2 Position setpoint signed 24-bit encoder ticks
3-5 Speed setpoint signed 24-bit encoder ticks/s
6-7 Current feedforward signed 16-bit mA

The driver answers with Respond_data_pack_1.

Firmware 106 and older wrote the speed into the feedforward instead of the PD loop's speed setpoint, so the speed term had no effect; 107 fixed it.


Send_data_pack_HALL

ID 31host → driver4 bytesPython: Send_data_pack_HALL()

Homing against a sensor: the driver spins at the given speed until the input on the ADDITIONAL2 pin shows the trigger condition, then latches the position it reached as its position setpoint and holds it. With a level trigger (0 or 1) it holds only while the pin stays at that level: when the pin changes back, the driver spins on again until the level returns. The edge trigger (2) holds after the first edge. Sending the command again while the driver is already in HALL mode does not re-arm it; leave the mode first.

4 bytes

Byte Bit Field Type Meaning
0-2 Speed signed 24-bit encoder ticks/s; the sign gives the direction
3 Trigger unsigned 8-bit 0 = trigger when the pin is low, 1 = when it is high, 2 = on any edge

The driver answers with Respond_data_hall.

Firmware 103 read only bit 7 of byte 3 (0 or 1); the edge trigger (2) came later.


Respond_data_pack_1

ID 3driver → host8 bytes

The driver's answer to Send_data_pack_1 and Send_data_pack_PD: where the motor is, how fast it turns and the current it draws. The Python library stores them as position, speed and current.

The frame (8 bytes)

Byte Bit Field Type Meaning
0-2 position signed 24-bit encoder ticks
3-5 speed signed 24-bit encoder ticks/s
6-7 current signed 16-bit Iq in mA

Respond_data_hall

ID 32driver → host4 bytes

The driver's answer to Send_data_pack_HALL: the position and the state of the sensor input. Python attributes: position, HALL_trigger, additional_pin2, hall_index.

The frame (4 bytes)

Byte Bit Field Type Meaning
0-2 position signed 24-bit encoder ticks
3 7 HALL_trigger bit 1 while the driver waits for the trigger (with a level trigger, also again after the pin left the level), 0 while it holds
3 6 additional_pin2 bit the raw level of the ADDITIONAL2 pin
3 5 hall_index bit 1 once the trigger has been seen (latched)

Send_data_pack_2

ID 6host → drivernot implemented

Reserved. The firmware has no handler for this ID and the Python library's call does nothing.


Send_data_pack_3

ID 8host → drivernot implemented

Reserved. The firmware has no handler for this ID and the Python library's call does nothing.


Respond_data_pack_2

ID 5driver → host0 bytes

Reserved; the driver never sends it.


Respond_data_pack_3

ID 7driver → host0 bytes

Reserved; the driver never sends it.


Send_Iq

ID 21host → drivernot implemented

Reserved; the firmware has no handler for this ID. Use the 2-byte form of Send_data_pack_1 for a current setpoint.


Comments


Found a mistake on this page? Edit it on GitHub · Report it · Get help · This page as Markdown · llms.txt · The whole manual as PDF