Interfacing and Controlling Maxon Motors Using Python

How to control Maxon motors using the ctypes library on Windows OS

Mohammad Khorasani
2 min readMay 12, 2021
Image by Maxon Group.

Introduction

I recently had the pleasure of working with brushless DC motors manufactured by Maxon Group — arguably the best motors I’ve ever worked with in terms of precision, reliability, ease of use, and customer support. Normally, one would control such motors using the CAN bus or EtherCAT communication protocols, but given that Python is becoming as ubiquitous as a scripting language can get, I was adamant to control my Maxon motors with Python on a Windows 64 bit operating system. To that end, I deployed the ctypes library that enables Python to invoke foreign command libraries written in C. Maxon’s documentation made the whole process rather straightforward and I was able to command the motors in short order by following the steps below.

EPOS Studio

Before you begin, ensure that your drive system has been set up and configured as required:

1. Download and install EPOS Studio:

--

--

Mohammad Khorasani
Mohammad Khorasani

Written by Mohammad Khorasani

Hybrid of a computer scientist and an engineer. Author of ‘Web Application Development with Streamlit.’

No responses yet