Repository navigation
1.21
Spectral-BLDC 1.21, the Python library for the STEPFOC and Spectral Micro drivers, for driver firmware 109. Install or upgrade with pip install --upgrade Spectral-BLDC. Calls for older firmware keep working; the calls added here need firmware 109.
New in 1.21 (firmware 109)
- Parameters:
Send_ParameterandSend_Get_Parameterwrite and read any setting by number (1-89); the gains and limits (8-16, 20) are packed as floats. Parameters 79, 80 and 84-87 (build commit, build time, board ID, calibration ID) read unsigned. - Identity and telemetry:
Send_Respond_Identity(product, tool id, firmware, pole pairs) andSend_Respond_Telemetry(temperature, voltage, error flags, current). - Capture, histogram and tables:
Send_Capture_Setup,Send_Capture_Trigger,Send_HistogramandSend_Buffer_Readrecord and read captures, the histogram, the anti-cogging harmonics and table, and the encoder table. - Watchdog: all five actions of
Send_Watchdog(Idle,Hold,Brake,Coast,Descend) and the fallback time (Send_Watchdog_Fallback);Send_Settings,Send_Brake_Coast. - Sound through the motor:
Send_Tone,Send_Sound_*,Send_Samples_*and themusicmodule (MIDI and WAV). - helpers: blocking request-and-answer functions; examples for status, capture, calibration, the watchdog and sound.
Fixes
- Gripper object detection: the two object-detection bits are combined as the firmware sends them (1.20 and older swapped 1 and 2: contact while closing read as contact while opening, and the other way round).
- Positions and speeds beyond 24 bits and currents beyond 16 bits raise
ValueErrorinstead of wrapping round;Send_Voltage_Limittakes 0-60000 mV. UnpackDataignores other nodes' frames, remote, error and extended frames.- Node IDs and new CAN IDs must be 0-15; a failed send returns
Falseand is logged once; python-can'sinterface=keyword is used.
Requirements
- Python 3.10 or newer; python-can and pyserial (installed with the library).
- Driver firmware 109 for the new calls: STEPFOC V109, Spectral Micro V109.
- Docs: STEPFOC, Spectral Micro.