MyActuator CLI Sub-Commands
Practical reference formotor_cli MyActuator control in motorbridge.
Chinese version: myactuator.zh-CN.mdRelated: CLI Reference | shared/channel-compat.md
Channel Compatibility
Channel compatibility: See shared/channel-compat.md.
1) Basics
- Vendor name:
myactuator - CAN IDs:
- Tx command:
0x140 + motor_id - Rx feedback:
0x240 + motor_id
- Tx command:
- Typical ID range:
motor_id in [1, 32] - Common default for ID=1:
--motor-id 1--feedback-id 0x241
2) Supported motor_cli Modes
| Mode | Protocol Command | Description |
|---|---|---|
scan | - | Probe IDs in 1..32 |
enable | 0x77 | Release brake |
disable | 0x80 | Shutdown motor |
stop | 0x81 | Stop closed loop |
set-zero | 0x64 | Set current position as encoder zero (persistent after power-cycle) |
status | 0x9C | Request status-2 |
current | 0xA1 | Current closed loop |
vel | 0xA2 | Speed closed loop |
pos | 0xA4 | Absolute position closed loop |
version | 0xB2 | Query version date |
mode-query | 0x70 | Query system operating mode |
3) Scan
Scan for MyActuator motors in the ID range 1..32.4) Enable / Disable
5) Status Query
Request status-2 (0x9C) continuously.
angle=...from status-2 (0x9C) — near-turn anglemt_angle=...from multi-turn angle (0x92) — for absolute-position judgement
6) Velocity Mode (vel)
Speed closed loop (0xA2).
7) Position Mode (pos)
Absolute position closed loop (0xA4).
8) Current Mode (current)
Current closed loop (0xA1).
9) Set Zero
Set current position as encoder zero. Requires power-cycle to apply persistently.10) Version and Mode Query
11) Arguments and Units
| Argument | Type | Default | Used in | Unit |
|---|---|---|---|---|
--start-id | u16 | 1 | scan | id |
--end-id | u16 | 32 | scan | id |
--current | f32 | 0.0 | current | A |
--vel | f32 | 0.0 | vel | rad/s |
--pos | f32 | 0.0 | pos | rad |
--max-speed | f32 | 8.726646 | pos | rad/s |
--loop | u64 | 1 | all | cycles |
--dt-ms | u64 | 20 | all | ms |
12) Encoding Details (Current CLI)
CLI input is unified in radians/rad-s, then converted internally to MyActuator protocol units (deg/deg-s).A1current mode:- payload
[4..5] = int16(current / 0.01)
- payload
A2velocity mode:- payload
[4..7] = int32((vel_rad_s.to_degrees()) * 100)
- payload
A4absolute position mode:- payload
[2..3] = uint16(max_speed_rad_s.to_degrees()) - payload
[4..7] = int32(pos_rad.to_degrees() * 100)
- payload
13) Feedback Decoding (status/command reply)
For response commands0x9C, 0xA1, 0xA2, 0xA4:
data[1]: temperature (int8, deg C)data[2..3]: current (int16 * 0.01 A)data[4..5]: speed (int16, deg/s)data[6..7]: shaft angle (int16 * 0.01 deg, near-turn angle)
0x92 multi-turn angle response:
data[4..7]: multi-turn angle (int32 * 0.01 deg)
angle=...from status-2 (0x9C)mt_angle=...from multi-turn angle (0x92) for absolute-position judgement
14) Troubleshooting
If motor replies but does not move:- Query status-1 (
0x9A) externally and check error code. - If error code is
0x0004, this means low voltage protection. - Recover supply voltage, then reset (
0x76) and release brake (0x77).
data[3]: brake released flagdata[4..5]: bus voltage (uint16 * 0.1 V)data[6..7]: error code