UniNE-CHYN / thorpy

Python library implementing Thorlabs APT communication protocol
43 stars 22 forks source link

Unix Environment Question #16

Open Knoose opened 5 years ago

Knoose commented 5 years ago

Hi lfasnacht,

This is isn't an issue but I was curious if you could share your setup process for getting this to run on Linux. I have been trying to get it to work on OSX and would love some steps to help me get things going. My main issue is related to getting the FTDI driver to recognize the device and assign it a serial port(virtual or otherwise). If I can get that going, then I should be able to get things going.

FilipDominec commented 3 years ago

This worked for me

git clone https://github.com/UniNE-CHYN/thorpy
cd thorpy/
sudo python3 test.py

Then, in the ipython3 prompt, I can control the stage with such commands:

steps_per_mm = 34527.5   ## calibrated for MTS50/M 
s._port.send_message(MGMSG_MOT_MOVE_ABSOLUTE_long(s._chan_ident, int(10*steps_per_mm)))

Somewhat ugly syntax, but it works.