Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delays #1

Open
pixelpress opened this issue Apr 10, 2018 · 2 comments
Open

Delays #1

pixelpress opened this issue Apr 10, 2018 · 2 comments

Comments

@pixelpress
Copy link

When I execute the code as it is with a TDC001 and a linear stage connected, it executes the code without any errors and prints in the console. However, the homing is not executed on the stage.

I realized that when sending new commands faster than 1 second after the last command, the TDC001 does not react. Also, if I move the stage in one direction, and during movement I change the direction, it takes up to 2 seconds until the new command is executed. Can you confirm that?

Furthermore, execution is aborted at the following line in libapt.c:
ftdi->usb_read_timeout=3000;

@zindy
Copy link
Owner

zindy commented Apr 10, 2018

Wow, thank you for actually checking the code!

After Thorlabs released a 64 bit version of their libapt.dll, there was much less of an incentive for getting this to work, sorry.

From what I remember, I got stuck with not being able to probe some values of interest for each stage via serial and gave up. Turns out, these values need to be hardcoded in the library for each stage. Talking to one of the reps at the MMC last year, there's a text file with all this data available when you install Kinesis.

I really need to come back to this at some point.

Cheers,
Egor

@pixelpress
Copy link
Author

Unfortunately, there is still no support for Linux from Thorlabs. I was also writing a library for the FTDI D2XX driver, but had some issues with delays. I posted them on stackoverflow: https://stackoverflow.com/questions/49655439/using-ftdi-d2xx-and-thorlabs-apt-communication-protocol-results-in-delays-on-lin

Turns out that libftdi driver does the same. I'm not so sure anymore, if this is an issue or intended by Thorlabs, that you can not quickly interrupt an active controller. For example, if you use Kinesis, all commands are disabled during execution.

Last thing I will try as soon as I have time is to use the jog-command in a loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants