Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

blended move does not reach target position

Solved!
Go to solution

I'm blending a series of 3 moves and so far I have not been able to reach the final destination. I'm using a NI-PCI-7332 motion controller.

The first move is from 0 to 200 (target position) at 50 pps with acceleration of 20000 pps^2 and deceleration of 75 pps^2.

The second move have a target position of 3034 at 216 pps with acceleration of 249 pps^2 and deceleration of 249 pps^2.

The third move have a target position of 3534 at 50 pps with acceleration of 75 pps^2 and deceleration of 20000pps^2.

The last move is stopping at position 3208???? for whatever mysterious reason. Any idea why it doesn't reach 3534?

 

I cannot attach the code but here are some screenshots of the applicable cases of my state machine.

 

Ben64

ScreenShot037.pngScreenShot038.pngScreenShot039.png

0 Kudos
Message 1 of 6
(2,668 Views)

ben64,

 

Would it be possible for you to attach a screenshot of where you initialize the cluster and array that you are pulling your values from? I would like to see what these values are.

 

Also, I noticed that the biggest difference between Moves 1/2 and Move 3 is that for Move 3 you are adding some value to the target position before wiring it into the set position. What is this value? Can you confirm at run time with probes that the values you are expecting are being passed into the set position VIs?

 

Regards,

Alyssa H.

National Instruments

0 Kudos
Message 2 of 6
(2,629 Views)

@alyssa.h wrote:

ben64,

 

Would it be possible for you to attach a screenshot of where you initialize the cluster and array that you are pulling your values from? I would like to see what these values are.

 

Also, I noticed that the biggest difference between Moves 1/2 and Move 3 is that for Move 3 you are adding some value to the target position before wiring it into the set position. What is this value? Can you confirm at run time with probes that the values you are expecting are being passed into the set position VIs?

 

Regards,

Alyssa H.

National Instruments


Hi Alyssa, I attached the array containing the moves values (in the actual code these values are loaded from a configuration file). I experimented with different values of acceleration/deceleration but the same issue repeat anyway. The value added to the target position of move 3 is a triangular pattern between -6 and +6 and is use to insure that we are not always stopping on the same teeth of the actuator (we have thousands of cycles to perform). The motion controller PID rate is set to 500 us to allow slow acceleration and deceleration. Also note that for any value added to target position 3 the move stops at the same value (around 3208 for both target positions of 3334 and 3534).

 

When I blend the first two move it stops right on target at 3034, it is when I add a third move that the expected target is not reached.

 

Ben64

0 Kudos
Message 3 of 6
(2,626 Views)

I also tried generating the code from the Motion Assistant but it generated a gazillion errors (see attached log and project)

 

Ben64

Download All
0 Kudos
Message 4 of 6
(2,623 Views)

ben64,

 

What drive are you using? Are you using an encoder? If you are using an encoder, have you tried to use polling moves to check the position and correct if it doesn't reach the target position?

 

Do you get a position error?

 

Regards,

Alyssa H.

National Instruments

0 Kudos
Message 5 of 6
(2,600 Views)
Solution
Accepted by topic author ben64

Hi Alyssa, I finally found what was the issue. I have settings in MAX I use to initialize the controller, in these settings the limit switches are disabled and the switches are used as reference positions. In my state machine I added a centering move before I start the cycling that use the blended moves and in this subVI the limit switches are re-enabled. So the third move was stopping at the limit switch (the limit switch position of the development fixture I use are closer than the one to be use for  testing). I modified the centering subVI so the limit switches are disabled at the end and now everything works fine.

 

Thanks for your help.

 

Ben

0 Kudos
Message 6 of 6
(2,597 Views)