From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Stage

Hello community, I would like to mention firstly that I am a beginner in LabView. I am trying to run an XY stage using LabView. I have two stepper motor drivers for driving the two stepper motors, one Arduino Uno, and one 12V power supply. I had an already working X-axis stage. After making electrical connections of the second stepper driver with arduino and power supply, I modified the existing block diagram in LabVIEW by almost duplicating it with just the new stepper motor component with its respective pins added. I thought it would be able to control both axes independently but I found that both front panel controls control only one axis of stage which was the already working axis.

 

Download All
0 Kudos
Message 1 of 9
(3,888 Views)

I dont have much experience with the arduino stepper functions.  I read on THIS forum post that the stepper function is blocking and you will have to change the code or the wiring.  Take a look at the thread.  Should help you out.



-Matt
0 Kudos
Message 2 of 9
(3,849 Views)

Thank you for writing. I came across this post but they are discussing a different point. I would like to update the status since I wrote this post; I found a LabVIEW program for running a XY stage (as attached) and it works (after minor modifications) but the problem now is that it is only causing the stage axes to move in one direction. Previously if I had to move the stage from left to right then I used to put a "negative sign" ahead of the "number of steps to move" and positive if from right to left. I tried doing that but it does not work here. So now I wish to use this new program as it works ! but I need help in figuring out how can I make it move in the desired direction ? I think the one who wrote the program might have taken this into account but I do not know how to implement it. Hope to hear from community to solve this issue.

Download All
0 Kudos
Message 3 of 9
(3,839 Views)

I dont see where your dials are coming into play in this program, but why cant you just put a negative into the steps to move?



-Matt
0 Kudos
Message 4 of 9
(3,823 Views)

I tried but it is still moving in one direction only. That is the query.

0 Kudos
Message 5 of 9
(3,821 Views)

Using a negative sign in Y number of steps reverses the direction but it does not work for the X direction. Any ideas about why it is happening ? 

0 Kudos
Message 6 of 9
(3,761 Views)

What change did you make that allowed the Y axis to move in the negative direction. It might help if you posted your most recent version of the VI.

 

Also, have you verified that this issue isn't related to the hardware? You could do this by just swapping the connections and driving the X axis stepper from the pins that were previously driving the Y axis. If the X axis still doesn't work in this configuration then the problem is likely specific to the stepper or drive rather than their control.

Message 7 of 9
(3,718 Views)

Thank you for the response. Actually, I did not make any changes to the block diagram and the latest is the same as attached here. I will verify if it is a hardware issue and update here.

0 Kudos
Message 8 of 9
(3,705 Views)

Thank you for the support. I wish to notify that this query has been solved. The problem was that in the block diagram you can see a 0 or 1 paired with stepper pin numbers which are connected to the stepper motor driver and replacing 0 with 1 or vice versa, reverses the order of pins from 3,4 to 4, 3 which actually defines the direction of movement of that particular stage axis connected to that particular stepper motor. The error was that changing 0 to 1 was not reversing the pins corresponding to the X- direction and that is why putting a negative sign in the number of X steps was not reversing the direction of movement of X.

0 Kudos
Message 9 of 9
(3,679 Views)