MATLAB Answers

0

Control Thorlabs Stages at Command Line

Asked by Timothy Burg on 6 Jul 2017
Latest activity Commented on by Lori Estes on 19 Jul 2017
Hello,
I have written a code that creates a figure containing four controls that move three axes and a rotary stage when the 'jog' buttons are clicked with a mouse. They are Thorlabs stages (one CR1-Z7 and three Z825B) controlled by Thorlabs APT software. They work fine, but now I'm trying to control the stages at the command line instead of clicking the up and down arrows on each control in the figure. I know the serial number of each stage, but I'm not sure how to specifically call one stage to move and also how to change the position of that stage. The range of motion of the axes stages is 0-25 mm and the rotary stage can rotate 0-360 degrees. I have attached the code. I am welcome to any and all suggestions!

  0 Comments

Sign in to comment.

1 Answer

Answer by Nagarjuna Manchineni on 19 Jul 2017

I believe you are trying to control the stages using keyboard keys instead of clicking on the push buttons in the figure using a pointing device (like mouse). You can use the '' event and call the respective callback function based on the key.
Refer to the following page that discusses various events:
Also, refer the following MJATLAB Answers posts for an example,

  1 Comment

Thank you so much for your response!
I am actually trying to type in the desired position on the command line and then move the stage to that specified position.
I will take a look at the posts you shared and see if any of those relate.
Thank you again!

Sign in to comment.