LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

thorlabs stepper motor TST001 timeout

I am having trouble with a labview VI designed to control two thorlabs stepper motors (model TST001). For some reason, one of the motors keeps timing out when I control the motion through Labview. It alsways the same motor (last 4 ID #'s 4651) which is odd since the corresponding actuator is brand new. I'm not sure if there is some setting that I am not specifying or some intermediate Vi that needs to be inserted in the command chain. The VI is attached.

0 Kudos
Message 1 of 4
(3,507 Views)

Should you have two separate MG17Motor controls on the front panel instead of just one since you have two different motors?

0 Kudos
Message 2 of 4
(3,497 Views)

I didn't think it would matter since I used an EndControl invoke node command in between switching which motor is active and I also specify which motor using the serial number. The problem doesn't occur every time either if that makes a difference, though it does occur more often for longer moves

0 Kudos
Message 3 of 4
(3,495 Views)

The preferred way would be to use two instances of the MGMotor Control.ocx; the main reason is the initialisation phase of the StartCtrl can take some time and if not allowed to complete successfully then it could lead to controls being unresponsive and displaying an error dialog. There is nothing wrong with switching using just one control as long as the serial numbers are correct, the time given to start the controls is sufficient and the that the control is completely closed by using the StopCtrl method before switching.

 

The time out for the moves could also be related to the bWait parameter on the Move methods. If the bWait parameter is set to 'False', the method returns as soon as the move has been initiated. If bWait is set to 'True', the move method returns only after the motors have completed their moves. I prefer to set bWait to 'False' and respond to the MoveComplete event or poll for the status of the motor using the LLGetStatusBits method to ensure the move has completed. bWait set as True is fine but it can sometimes make the GUI hang until the method has returned, i.e. this will take longer with longer moves as you observe. Feel free to contact me at thorlabs if you have any questions please send them to techsupport.uk@thorlabs.com

 

Regards

Mike Soulby

Thorlabs Ltd.

Message 4 of 4
(3,431 Views)