03-13-2024 12:36 PM
I'm using a zaber motor model T-LSR160D with the python code below using PyCharm. But from the third movement the motor makes, it chokes. You can see what happens by clicking on the video link: https://www.youtube.com/shorts/jjG08uUODTY
Could someone help me solve this problem?
import time
from zaber.serial import BinarySerial, BinaryDevice, BinaryCommand
port = 'COM6'
serial = BinarySerial(port)
device_address = 1
device = BinaryDevice(serial, device_address)
command2 = BinaryCommand(device_address,1)
device.send(command2)
while True:
command = BinaryCommand(device_address, 43,10)
command1 = BinaryCommand(device_address, 22,10)
command3 = BinaryCommand(device_address,21,47808)
time.sleep(1)
command4 = BinaryCommand(device_address,21,-47808)
device.send(command)
device.send(command1)
device.send(command3)
device.send(command4)
serial.close()
03-13-2024 02:09 PM
Hi andressapanice,
It looks like what's happening is the stepper motor is stalling. This occurs when the movement required requires more torque than the motor can provide at that speed, with torque going towards acceleration, lifting a load (in this case), and friction.
There's a thrust/speed plot for this model available here: https://www.zaber.com/products/linear-stages/T-LSR/specs?sr=1. You can see that the thrust the stage can offer drops with the speed you target. The line on the plot shows roughly where you can expect this stalling to occur.
Based on the video, I think your application is near this line and seeing occasional stall. You could try reducing your load, reducing the acceleration you are targeting, or reducing the peak speed you reach.
Feel free to contact me at mike@zaber.com for follow-up here (since I don't think there are any concerns on the LabVIEW code).
Best regards,
Mike McDonald
Applications Engineering and Sales
03-19-2024 12:31 PM
Hi Mike! Thanks for your help! Reducing the acceleration solved the problem.