We implemented support for stepper motor controller KST101 from Thorlabs. Similarly to the Picomotor controller, the tkmserver
communication with the controller is based on PyLabLib Python package. See Thorlabs APT/Kinesis devices web page for more info. Note that it was necessary to comment out the last two lines in /usr/local/lib/python3.5/dist-packages/pylablib/devices/Thorlabs/__init__.py
file referring to TLCamera due to errors.
The code can be downloaded via svn
from Sourceforge repository and then compiled using make
.
svn checkout https://svn.code.sf.net/p/gwyscope/code/peripherals cd peripherals/tkmserver make
The communication with the controller was tested under Linux using USB connection. After plug in a new device is created, e.g. /dev/ttyUSB0
, use dmesg | tail
commands to figure this out. This is then used as device address. See thorlabs-stepper.py
with instructions on how to connect to the controller, move the motor, etc., in Python environment. If testing with the python script was successful, the tkmserver
can be started providing port number (e.g. 50101) and .ini file (hwserver_sample.ini):
./tkmserver 50101 hwserver_sample.ini
Note that the parameters in the .ini file need to be adjusted. For example the cspm
coefficient that translates motor steps to meters may need to be changed for a given motor. We also provide an implementation of client in test_client.c
example that shows how to connect to the tkmserver
, get controller serial number, set motor velocity and acceleration or move the motor.