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.
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.
04-10-2012 01:28 PM
Hello ! ...
I have developed a program that has the algorith as follows:
1. X steps and Y steps determne the pixel array size I want.
2. For each Y the X scan through a fixed number of steps and then Y increment
3. step 2 repeats untill Y is reached its MAX state.
Problem :
After the X scan lets say 10 steps I want it to reverse the direction and return to the original and then again after Y increments X should scan and return to original.
Its a RASTER scan basically.
I am not able to figure out why and how to add the part of making the motor return to the original position.
please find the VI and tell me my mistakes.
Thanks
Solved! Go to Solution.
04-11-2012 09:55 AM
Hi,
You have two nested while loops: one that moves in the y-direction and the one inside that moves in the x-direction. There are two ways you could implement moving the x-direction back to zero.
1. The x-direction loop stop condition is once it has traveled to the end stop. You can add a case right after this loop that just tells the motor to go back to zero.
2. In the y-direction loop before the x-direction executes tell the x-direction to go back to zero. This will cause it to rezero everytime before the x-direction starts its move.
Both ways will accomplish the same thing but one does the rezero after the move and two does it before.
Regards,
Greg H.
04-11-2012 10:08 AM
greg thanks for the reply ...
According to your explainanations :
1 - Does the rezero after the X finishes N steps right ?
2 - I dont clearly understand what u mean when you say it will rezero before itself .
I am sorry I am not able to understand clearly what u mean But according to me the program does the following , FInd the raster scan 1. PNG ... From this I want to go to this - raster scan 2. PNG
Am I able to convey my idea to you ?
Thank you for your time.
Critical project thats why I am breaking my head over this.
Abhi
04-11-2012 10:13 AM
Sorry RASTER SCAN 1.PNG in the previous reply is not right . This is the right one.
Sorry again for the trouble
04-11-2012 10:54 AM
Greg I have inorporated the STEP 1 technique you told me to.
Have a look at the VI below and check to see if what I have done is what you mentioned me to try .
Thanks for your patience.
04-12-2012 09:58 AM
Hi,
Close but this will not quite work. You have to send the command to go back to zero after the while loop. If you do it in the while loop then the x-direction will move one step go back to zero, one step go back to zero, etc. If you move it after the while loop then it will do all of the x-direction steps then go back to zero. See the attached picture.
Regards,
Greg H.
04-12-2012 10:55 AM
yeah check this VI . Its working fine.
But here is the one thing I still dont understand ...
In front panel ... you see that SELECT SPEED X AXIS this is to move the motor in one step forward
the Select RETURN speed X Axis is to select the motor speed to move backward to original.
The question is when I run the program the FWD steps run quite slowly but when its returning to original position it goes super fast !!!
Why is this happening ?
Thank you Gerg .
04-12-2012 12:03 PM
Hi,
I think this is because you are telling the motor to move in small steps in the forward direction and it never has a chance to accelerate to the velocity you pick. On the way back since it is just one long move, it has the ability to accelerate to the speed you select.
Regards,
Greg H.
04-12-2012 12:08 PM
Strange because the ability to move back is also determined by one step at a time just like how it moves forward.
Sorry if I am mistaken with your idea. But I hope you see my point.
Abhi