Manual

Set Target Low Resolution Reverse
Compact protocol: 0xE0, magnitude
Pololu protocol: 0xAA, device number, 0x60, magnitude
If magnitude is zero, then this command is equivalent to the Motor Off command above: the Awaiting Command
error bit will be set, so the jrk will turn the motor off until another Set Target command is received.
Otherwise, this command clears the Awaiting Command error bit and (if Input Mode is Serial) sets the target to a
value less than 2048 which is determined by the magnitude (0–127).
If the Feedback Mode is Analog or Tachometer, then the formula is
Target = 2048 − 16×magnitude.
If the Feedback Mode is None (speed control mode), then the formula is
Target = 2048 − (600/127)×magnitude.
This means that a magnitude of 127 will set the duty cycle target to full-speed reverse (-600).
4.f. Error Reporting Commands
There are several errors that can stop the jrk from driving its motor. The jrk’s response to the different errors can be
configured (Section 3.f).
Both of the error reporting commands result in a two-byte serial response form the jrk. Each bit in those two bytes
represents a particular error. If the bit is 1, it means that the error occurred or is occurring. If we call the least-
significant bit 0, and the first byte transmitted contains bits 0-7, then the correspondence between bits of the error
bytes and errors are as follows:
Bit 0: Awaiting command
If this bit is set, the jrk will not drive the motor until it receives a command that clears this bit. Any version of
the Set Target command will clear the error bit. A Set Target command can be sent from the configuration utility,
from a computer using the virtual Command Port (unless the jrk is configured to receive commands on RX), or
from the RX line if the jrk is configured to receive commands on RX. This error occurs in Serial Input mode
when the Jrk is powered on.
Bit 1: No power
This error occurs when the jrk is connected to USB, but it detects no motor power connected to VIN and GND,
so it can not drive the motor. If this error occurs, check your power supply and power connections.
Bit 2: Motor driver error
This error occurs when one of the motor drivers fault conditions are triggered, and the motor driver shuts down
the motor and reports the error to the jrk’s microcontroller. This error also occurs when the jrk is connected to
USB and motor power becomes disconnected. When this error occurs, the jrk will try to automatically recover
from it by toggling the appropriate lines on the motor driver. The jrk 21v3’s motor driver fault occurs on under-
voltage, over-temperature, or over-current conditions. The jrk 12v12’s motor driver fault occurs when it detects
that motor output A is shorted to ground or VIN.
Bit 3: Input invalid (Pulse Width Input Mode only)
In Pulse Width Input Mode, the jrk will only update the input value if it has received four good pulses in a row.
For example, if the jrk receives five good pulses, a bad pulse, and then five more good pulses, it will update the
input value after pulses 4, 5, 10, and 11. This error occurs if the jrk goes more than 120 ms without updating the
Pololu Jrk USB Motor Controller User's Guide © 2001–2013 Pololu Corporation
4. Using the Serial Interface Page 32 of 44