Quantcast
Channel: Motion Control and Motor Drives topics
Viewing all articles
Browse latest Browse all 1315

Looping move absolute position method - Thorlabs MLJ050 Motorized Lab Jack - Activex

$
0
0

I want to be able to specify an absolute position for the motor to go to and the number of steps to take, i.e. move a total of 20 mm in 2 steps, so the motor should move 10 mm, wait some amount of time, and move the last 10 mm. The user would specify the distance to move and the steps to take and then press a 'go' button. 

 

I am utilizing Thorlabs APT software (with LabVIEW 2016) with activeX methods: SetMoveAbsPos which sends a command to the MoveAbs method. However, I can't get the SetMoveAbsPos command to loop with the number of steps. With the attached VI, the behavior I am getting is that the position input from the user is updated every time the VI loops. For example, if the user inputs a position of 20 mm and do it in 2 steps (cycles), it will go to 10 mm, then moves to 5 mm, and then to 2.5 mm, etc. I have tried different positions (inside vs outside the for loop) for the SetMoveAbsPos command and I have tried to initialize the position control outside the loop but I don't get the results I want: either the motor moves to position/steps and doesn't loop or I get erratic behavior. 

 

Is there anyway to somehow loop the SetMoveAbsPos method for the number of steps I want without it updating the user input position value?


Viewing all articles
Browse latest Browse all 1315

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>