python class for Midi Ingenierie MIP0505 stepper motor driver
MIP0505 class is a wrapper of python minimalmodbus module customized for easy implementation with MIP0505 drivers
Some comments are in french. Translation will be done later.
The provided code is for informational purposes only. We are not liable for any malfunctions or issues resulting from its use.
import MIP0505
mip = MIP0505(portCOM='COM2',modbusAddress=1)
# --- Example reading registers ---
alim = mip.read('SUPPLY_VOLTAGE')
print(f"Supply voltage: {alim/100}V")
stat = mip.read('STATUS_MOTOR')
print(f"Status Register: 0x{stat:08x}")
# --- Example writing registers ---
mip.write('PROFILE_VELOCITY',2400)
mip.write('TARGET_POSITION_ABS',-290579)