1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
# Cool Muscle CM1-C ASCII / CML Serial Control Cheat Sheet
**Applies to:** CM1-C, with RT3.14-focused commands
**Serial default:** 38400 baud, 8-N-1, no flow control
**Terminator:** carriage return (`\r`, ASCII 13) after every command
**Motor ID:** append `.1`, `.2`, etc. Always include it explicitly.
> Use low speed and low torque during commissioning. Software commands are not a safety-rated E-stop.
## Quick direct move
```text
M0.1=20
A0.1=10
S0.1=20
P0.1=1000
^.1
```
- `P0` target position in pulses
- `S0` speed; actual unit is selected by `K37`
- `A0` acceleration in thousands of pulses/s^2
- `M0` torque limit, 0-100% of peak torque
- `^` execute
## Continuous rotation until stopped
```text
A0.1=10
M0.1=30
P0.1=1000000000
S0.1=20
^.1
```
Use negative speed for the opposite direction:
```text
S0.1=-20
^.1
```
Stop:
```text
].1
```
`S0.1=0` also stops indefinite-position motion. Exact CW/CCW depends on `K45`.
## Safety and enable commands
| Command | Action |
|---|---|
| `].1` | Immediate normal software stop of motor 1; pauses a bank |
| `*` | Emergency stop all motors on the chain |
| `*1` | Clear emergency-stop state |
| `).1` | Disable motor; shaft becomes free |
| `(.1` | Enable motor |
## Queries
| Command | Information |
|---|---|
| `?.1` | Dynamic P0/A0/S0 |
| `?85.1` | Firmware and motor ID |
| `?90.1` | All K parameters |
| `?91.1` / `?P.1` | Position registers |
| `?92.1` / `?S.1` | Speed registers |
| `?93.1` / `?A.1` | Acceleration registers |
| `?95.1` | Position error |
| `?96.1` | Current position |
| `?97.1` | Current speed |
| `?98.1` | Averaged current |
| `?99.1` | Motor status |
| `?70.1` | Input status |
| `?71.1` | Temperature |
| `?74.1` | Analog input |
| `?1000.1` | All program and logic banks |
| `K37.1` | Query one specific parameter |
## Status values from `?99`
- `0` moving
- `1` position-error overflow
- `2` overspeed/overvoltage
- `4` overload/overcurrent
- `8` in position / ready
- `16` disabled
- `32` push torque reached
- `128` overtemperature
- `256` push target reached before expected resistance
- `512` emergency stop
Values can be combined as a bit field.
## Zeroing and homing
| Command | Action |
|---|---|
| `|.1` | Run configured origin search |
| `|1.1` | Move to position zero |
| `|2.1` | Assign current position as zero |
| `|4.1` | Soft reset |
| `|11.1` | Clear whole-revolution count |
The character is pipe `|` (ASCII 124), not capital I. Configure `K42`, `K43`, `K45`, `K46`, `K47`, and `K48` before origin search.
## Outputs
- `O1.1`, `O2.1`: output on
- `F1.1`, `F2.1`: output off
- `?51.1`, `?52.1`: output status
- Configure output behavior in `K34`
## Stored registers
- `P1-P25`: positions
- `S1-S15`: speeds
- `A1-A8`: accelerations
- `M1-M8`: torque limits
- `T1-T8`: millisecond timers
- `V1-V15`: variables/internal-state mappings
- `N1-N25`, `R1-R25`: coordinated-motion or general-use data
## Program banks
```text
B1
S1,A1,P1
END
```
- `[1.1`: execute program bank 1
- `[L1.1`: execute logic bank 1
- `].1`: pause immediately; send twice to terminate
- `}.1`: stop after current motion
- `>.1`, `<.1`: step through paused program
- `]L.1`: stop logic bank
- `B100`, `L100`: clear all banks
- `$ .1` without the space: save to EEPROM; actual command is `$.1`
## Important K parameters
- `K20`: baud / ASCII versus Modbus
- `K23`: serial event reporting and echo
- `K37`: resolution and speed unit; default `K37=3` = 1000 ppr, 100 pps speed unit
- `K44`: deceleration ratio
- `K45`: direction and coordinate sign
- `K55`: in-position tolerance
- `K56`: position-error fault threshold
- `K58`, `K59`: software position limits
- `K70`: CR-only versus CR+LF replies
K/H parameters auto-save by default. On suitable RT3.14 firmware, `_SKH=0` temporarily disables auto-saving to avoid repeated EEPROM writes; `_SKH=1` re-enables it.
## PowerShell
```powershell
$PortName = "COM3"
$cm = [System.IO.Ports.SerialPort]::new(
$PortName, 38400,
[System.IO.Ports.Parity]::None,
8,
[System.IO.Ports.StopBits]::One
)
$cm.Handshake = [System.IO.Ports.Handshake]::None
$cm.ReadTimeout = 700
$cm.WriteTimeout = 700
$cm.NewLine = "`r"
$cm.Open()
function Send-CM1 {
param(
[Parameter(Mandatory)][string]$Command,
[int]$WaitMs = 150
)
if (-not $script:cm -or -not $script:cm.IsOpen) {
throw "CM1 serial port is not open."
}
$null = $script:cm.ReadExisting()
$script:cm.Write($Command + "`r")
Start-Sleep -Milliseconds $WaitMs
$script:cm.ReadExisting()
}
```
**Source basis:** Myostat CM1-C User Guide v3.00 (2025-12-05) and CM1 RT3.14 Quick Reference Guide v3.14.00.
|