The repository contains code for the control of the Thorlabs TPZ001 (piezo driver) and TSG001 (strain gauge reader) controllers with the kinesis API. It contains 2 files:
- piezo.py for the communication with the controllers that can be used as standalone and
- piezogui.py that creates a graphical user interface (GUI) written with tkinter.
This code was created for the automation of an optical interferometry experiment and is presented here to act as a guide to people that are looking for something similar. The modular approach makes it very easy to embed in bigger GUIs (see the image bellow) that combine many more instruments which is usually the case in big experiments that require automation.
The red dashed square indicates the GUI carrying the piezo stage functionality that is embedded in a bigger GUI carrying functionality for cameras, a laser and the processing of the acquired data.
- Make sure you have these installed:
- pythonnet
- Pillow, only if you plan to load images to the GUI
-
Download the source code from the release tab or clone the repository.
-
(Optional) Download images for the buttons of the GUI.
-
Connect the controller to your computer and run the piezo.py file or the piezogui.py file if you want to use the GUI. Do not forget to change the serial numbers with the serial numbers of your devices.
Has been tested with python 2.7 and 3.6.