Manual-Tstep-087-Modbus.pdf - 第5页
Value Command Uses 20 Apply the staged cruise speed retargets a move already running An unrecognised command returns exception 03 rather than being ignored. Waiting for a move to finish Poll 0x0300 quantity 6 and watch b…

Values are clamped, not refused. A parameter outside its range is silently brought into range at execute time. Read the
register back if you need to know what was accepted.
Acceleration is honoured exactly for any value in range. The start speed is the speed a ramp begins and ends at -
deceleration returns to it rather than to zero.
The dwell registers do nothing. 0x0208-0x0209 accept a value, clamp it and read back correctly, but nothing acts on
it, and state word bit 0x0004 ("waiting on a dwell") can never be set. A master needing a pause between moves must
time it itself.
Live status - read only
Registers Name Units
0x0300-0x0301 Current speed steps/s
0x0302-0x0303 Position steps, signed
0x0304 State word bitmask, below
0x0305 Inputs bit 0 = IN1, bit 1 = IN2
Six contiguous registers in polling order - one 0x03 request with quantity 6 returns the drive's entire live state.
Position counts every step, in every mode - finite moves, continuous runs and seeks alike.
State word - 0x0304
Bit Meaning
0x0001 Moving
0x0002 Direction is clockwise
0x0004 Waiting on a dwell - never set, see above
0x0008 Potentiometer speed control enabled
0x0010 Driver fault - see section 7
Unmapped registers
0x0004-0x01FF, 0x020C-0x02FF and 0x0306 upward are holes and return exception 02.
6. Commands - write to 0x020A
Value Command Uses
0
Stop - ramps down,
never a hard stop
1 Move clockwise distance, speeds, acceleration
2 Move anticlockwise distance, speeds, acceleration
3
Run clockwise until
stopped
speeds, acceleration
4
Run anticlockwise until
stopped
speeds, acceleration
5 Seek input 1 speeds, acceleration
6 Seek input 2 speeds, acceleration
7
Reset position counter to
zero
8
Save parameters to
flash
refused while moving - see below
13 / 14
Potentiometer enable /
disable
17 / 18 Driver enable / disable
19
Clear a latched driver
fault
refused while the fault is live

Value Command Uses
20
Apply the staged cruise
speed
retargets a move already running
An unrecognised command returns exception 03 rather than being ignored.
Waiting for a move to finish
Poll 0x0300 quantity 6 and watch bit 0 of the state word. Polling every 50-100 ms is ample.
Command 8 - save parameters to flash
Stores acceleration, start speed, cruise speed and move distance to the drive's parameter page. They are reloaded at
every power-up.
Refused with exception 03 while the motor is moving. Erasing a flash page stalls the CPU for tens of milliseconds -
this save measured 42 ms against a normal 5 ms reply - and the step generator runs from that same flash. A save during
a move would starve the step interrupt and silently drop every step it should have emitted: roughly 40 at 1000 steps/s,
thousands at full speed, leaving the position counter wrong with nothing to indicate it. Stop first.
Budget 50 ms for the reply, not the usual 5 ms. A master with a tight timeout will call this a failure and may retry a save
that already succeeded.
The dwell registers are not persisted, and neither is anything else outside the four values above.
Changing speed while moving
Stage a new cruise speed in 0x0204-0x0205, then write command 20. The drive ramps to the new speed at the
configured acceleration - it is never asked for a jump it cannot follow.
Command 20 is refused while the potentiometer is enabled, because the potentiometer would overwrite the new
target within a fraction of a second.
Changing direction while moving
Sending command 3 or 4 while a continuous run is already going is a reversal: the drive winds down to its start speed,
changes direction at zero speed, and takes the motion back up. You do not have to sequence a stop yourself. Position
tracks correctly throughout.
A reversal during a finite move is refused (exception 03). Stop the move, then command the new direction.
Potentiometer
Command 13 enables it, 14 disables it. While enabled the potentiometer scales the cruise speed register, so it can
never ask for more than the axis is configured for, and it owns the speed target - use command 20 only with the
potentiometer disabled.
[!] Turning the knob to its minimum does not stop the motor. It commands 1 step/s, the motor keeps turning, and the
moving bit stays set. Only command 0 stops a move. If a machine needs the knob to mean stop, the master must
detect the speed floor and issue the stop itself.
[!] Seeks have no distance limit and no timeout
Commands 5 and 6 run until their input asserts. Nothing else stops them. If the input is not wired, not powered, or the
axis is already past it, the motor runs indefinitely.
A master issuing a seek must impose its own limit - a timeout, a travel budget, or both - and send command 0 when it
expires. Confirm that register 0x0305 actually changes before relying on a seek at all.
7. Safety and fault handling
These are properties of the drive that a master must design around.
• The bus is the only source of commands. The drive is always online; nothing else can take the
motor away from a master mid-operation.
• The drive answers while it is moving. Position reads and a stop work mid-move - this is what
makes a bus stop usable at all.
• A stop over the bus is not a safety function. It travels over a wire, through a UART, into a
polled loop. The hardwired emergency-stop chain remains what makes a machine safe.

• Stop is command 0, but Modbus has no priority. If a stop matters, send it as its own
transaction rather than queued behind parameter writes.
Driver faults - state word bit 0x0010
The drive watches an error output from its step/direction output stage. When that error stays asserted, the drive enters an
alarm state that locks out all motion.
• Commands are refused with exception 03 while alarmed. A move is not accepted and quietly
dropped - you are told.
• Reads keep working, so position and parameters remain available.
• Clear it with command 19, once the fault has actually gone. The command is refused while
the fault is still present, so a clear that succeeds means something.
When this bit is set, stop treating the drive as a machine axis and raise it to an operator. It means the output stage is
reporting a fault - check motor power, phase wiring, and the drive's own fault indicator.
Disabling the driver with command 18 is not a fault and does not raise an alarm, even though the output stage asserts its
error line while disabled.
8. Reliable communication
Recommended master settings
Setting Value Why
Response timeout 100 ms About 20× the measured round trip
Retries 2, then report The drive is silent on CRC failure, so a corrupted frame looks like a timeout
Inter-frame delay ≥ 5 ms Must exceed the drive's 3 ms end-of-frame gap
Frame transmission one write call A pause inside a frame splits it, and both halves fail CRC
[!] Retrying a move - use the sequence register
A retried move executes twice unless you use the sequence register. A lost reply is indistinguishable from a lost
command, so a master that simply resends has told the machine to travel the distance twice.
Register 0x020B solves this. Before each command, write a sequence number; then write the command:
1. 0x06 0x020B value N the sequence number for this command
2. 0x06 0x020A value cmd the command
If a command arrives carrying a sequence the drive has already executed, it is acknowledged and not carried out
again. A retry is therefore simply *both writes sent again* - whichever one was lost, the result is exactly one execution.
Reading 0x020B returns the sequence of the last command actually executed, so after a timeout you can ask "did it
get through?" without risking a second move.
Rules:
• The number is opaque - only ensure two *different* commands carry *different* numbers.
• A refused command does not claim its sequence, so it stays retryable once you fix the cause.
• Not using the register at all is legitimate and means "always execute".
• The guard engages only for a sequence written since the last command, so forgetting to update
the number costs a double execution at worst - a command can never silently vanish.
Probing at the wrong baud is safe
The drive discards traffic at a rate it is not set to and answers the next correctly framed request normally.
Performance
Measured at 115200, 200 transactions each:
Transaction Round trip
Read 6 registers - the whole live state 5.12 ms