Gwyscope documentation

open hardware SPM controller with advanced sampling support

User Tools

Site Tools


hwperifthor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hwperifthor [2025/03/24 12:02] – created adminhwperifthor [2025/03/24 13:37] (current) – Added description of tkmserver. admin
Line 1: Line 1:
 ====== Thorlabs Kinesis Stepper Motor ====== ====== Thorlabs Kinesis Stepper Motor ======
  
-We implemented support for stepper motor controller [[https://www.thorlabs.com/thorproduct.cfm?partnumber=KST101|KST101]] from Thorlabs. Similarly to the [[hwperifpico|Picomotor]] controller, the communication is based on PyLabLib Python package. See [[https://pylablib.readthedocs.io/en/latest/devices/Thorlabs_kinesis.html|Thorlabs APT/Kinesis devices]] web page for more info.+We implemented support for stepper motor controller [[https://www.thorlabs.com/thorproduct.cfm?partnumber=KST101|KST101]] from Thorlabs. Similarly to the [[hwperifpico|Picomotor]] controller, the ''tkmserver'' communication with the controller is based on PyLabLib Python package. See [[https://pylablib.readthedocs.io/en/latest/devices/Thorlabs_kinesis.html|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''
 + 
 +<code> 
 +svn checkout https://svn.code.sf.net/p/gwyscope/code/peripherals 
 + 
 +cd peripherals/tkmserver 
 + 
 +make 
 +</code> 
 + 
 +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): 
 + 
 +<code> 
 +./tkmserver 50101 hwserver_sample.ini 
 +</code> 
 + 
 +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.
  
-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''  
hwperifthor.1742814168.txt.gz · Last modified: 2025/03/24 12:02 by admin