Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Customize ActiveX control for Thorlabs APT DC servo controller

I am new to Labview. I am trying to create a custom program for control of a Thorlabs APT DC Servo motor controller.    I  created an Active X window using the Thorlabs software in Labview.  It works fine , but to rotate the motor I have to press the buttons in the front panel.I want to customize it so that when I run the vi , it rotates by a specified  angle. Can anyone give me an idea of how to do it. I have attached the current program that I have.

Thanks

0 Kudos
Message 1 of 22
(15,751 Views)

Hi MrMK,

 

I took a look at your code.  The only button I see on your front panel is the stop button, as I do not have the Thorlabs software.  Is this the button you are speaking of?   Maybe posting screen shots of the front panel and block diagram would be helpful to since many of us will not have the Thorlabs API installed. Also, does the motor continue rotating until the stop button is pressed? If so, you can stop the rotation programmatically by comparing the position to some max rotation value and cause the loop to stop when they are equal.  Feel free to post more details.  

 

I hope this helps!

 

Kristen H.

0 Kudos
Message 2 of 22
(15,729 Views)

Hi thanks for the reply. I have attached two sreenshots one of the front panel and the other of the block diagram.My code makes the ActiveX window alive when I press the run button. After that I can control the motor using the ActiveX window in the front panel.But I want the motor to run when I press the run button without need to press the jog button in the front panel.

Thanks

 

 

0 Kudos
Message 3 of 22
(15,722 Views)

Hi MrMK,

 

I see the button you are talking about now.  Unfortunately, my abilities here are limited without the driver for the controller.  I suggest looking for methods that allow you to programmatically jog, then wire a constant or logic to the input terminal. Is there somewhere i can download a trial version of the drive?

 

Kristen H.

0 Kudos
Message 4 of 22
(15,694 Views)

Hi this is a link for download of the software

http://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=APT

 

I am trying to do what you have suggested 

 

Thanks 

 

0 Kudos
Message 5 of 22
(15,684 Views)

Hi MrMK,

 

Is there an API that explains the functions/methods? "MoveJog" looks promising, but I could find anything with descriptions of what the MoveJog method actually does.  

 

Kristen H.

0 Kudos
Message 6 of 22
(15,675 Views)

Hi I solved the problem. Thank you so much. I started from "Move Jog" and followed your instruction for adding constants. I have added the screen shots of what I have now.

Thanks again

0 Kudos
Message 7 of 22
(15,672 Views)

Hi MrMK,

 

Glad to hear it! Take care.

 

Kristen H.

0 Kudos
Message 8 of 22
(15,658 Views)

Hi MrMK

 

I think you are on the right track. What you have done is import the ActiveX control into your application. This is always a must for any ActiveX control to operate. When you imported the control you also created all the methods that are available for that control. Using the methods is the tricky part. You can always use the motor control as a sanity check to see if the hardware works. Otherwise you can hide it and just display your application. What you have to do now is program the methods according to your application needs. Go to control properties and look at all the methods. Choose an appropriate one for your application and you will see the methods appear in your wire/gui panel. You may want to look athe LabView tutorials we have created on our website. There are quite a few of these to get you started. There are also three LabView programs on the CDROM of levels of complexity. They should also help.

 

http://www.thorlabs.com/tutorials/APTProgramming.cfm

 

Ludwig Eichner

Senior R&D Application Engineer

Thorlabs, Inc. Newton NJ

0 Kudos
Message 9 of 22
(15,573 Views)

Hello,

 

I have recently tried to control an APT OptoDCDriver S/N63001724 motor according to the instructions in the previous posts, the vi looks very similar to what is described and at times the motor even responds. However, the action of the motor is not constant, sometimes the motor moves and doesn't stop or it doesn't move at all. I have tried to change the vi in various ways but have not succeeded. Is there something I am missing in the vi? My goal here is to move it at a constant velocity and then return to the starting point. Is there a way that I could test to see if this is a hardware problem?

 

Thank you,

 

Amir Bernat

0 Kudos
Message 10 of 22
(13,993 Views)