Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Lag Between Two Stepper Motors

Hi

 

I am writing a vi that controls two stepper motors, and am looking to be able to control the degree rotation between the two motors.

 

Equipment:

2 Stepper Motors (CTP12ELF10MAA00)

2 Encoders

MID-7604 Drive Box

PCI-7330 motion controller

 

I've attached my vi, what I am trying to do is control the amount of twist (alternating from no twist to the max twist) between the two motors. I belive the vi performs this fairly well as I can visually see the twist when I run it.

 

I run into an issue sometimes that one of the stepper motors will stall when I reach RPMs of about 600+ (10Hz) although the motor is rated for 3000 RPM. This has occured even with no load on it, which leads me to believe there is something else causing it. Could anyone offer some improvments to the vi (functionality or architecture), or see where a problem like this could be coming from?

 

Thank you for any help you can offer,

Arthur J.

0 Kudos
Message 1 of 10
(6,304 Views)

Stepper motors can stall out before reaching the rated maximum velocity if the acceleration is too high, even with no load applied to the shaft.

Can you try to lower the acceleration rate?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 10
(6,295 Views)

Would the acceleration rate only be controlled by how fast I'm changing the RPMs? Or is there some other control or way to monitor the acceleration rate. The stepper has stalled even when I was not changing RPMs but keeping it at some constant rate for a few minutes.

 

Thanks,

Arthur J.

0 Kudos
Message 3 of 10
(6,290 Views)

I am not sure how the motion control HW/SW set accelleration rates, maybe setup in MAX?

 

Have you set your DIP switched on the MID to match the current rating of your motors? (default on the MID is 0.5A peak I believe, motors rated at 1A)

 

See:

 

http://www.ni.com/pdf/manuals/372454g.pdf

 

Aan

 

http://www.ni.com/pdf/products/us/cat_steppersandencoders.pdf

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 10
(6,277 Views)

Thanks for your help, I think you may be right about the acceleration being the limiting factor in my application. I did some calculations on what the angular acceration is during the run, but couldn't find what the motors are rated to, just the encoders. But, the encoders are rated to 10^5 rad/s^2, which is much higher than what I'm running it at.

 

I do hvae the DIP swtiched to 1A which is what the motors are rated to. I was looking around but haven't found where the acceleration rates can be controled in MAX.

 

I've attached a cleaned up version of the vi. I was thinking about putting it into a state machine structure with event loop. I know that is a much better architecture for many labview programs; is it compatible with motion control? Would it be beneficially trying to go that route?

 

Thanks,

Arthur J.

0 Kudos
Message 5 of 10
(6,268 Views)
0 Kudos
Message 6 of 10
(6,267 Views)

So the issue is that both identical motors should be turning at the same rate, but a difference is developing? How are you verifying the difference? Is the difference apparent from the encoder measurements or can you actually see it stalling? Have you tried swapping the motors and see if it's a motor issue rather than the code itself?

Ben D.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 10
(6,246 Views)

Hi, sorry if I wasn't clear on the application and problem.


Think of it like a rotating torsion-type fatigue test. I have a flexible tube between the two motors. I set a certain degree of torsion per rotating cycle (say 10 degrees for example).

 

The program I wrote seems to maintain that torsion pattern over time (no accumulating difference), however when I bring the motors up to speed; in the 600 RPM range, after a minute or two a motor will stall. Its very clear it stalls (no more rotation, my chart drops to 0).

 

I thought AK2DM may have hit upon whats going on, acceration rate. But it seems that my acceleration rate even at 600 RPM is quite low.

 

Any ideas you could offer? I was worried if the way the program was written is not very efficient, and at high rates the data can't be sent to the motors quick enough and it stalls. But, im not sure if thats even logical Smiley Frustrated

 

Thanks

0 Kudos
Message 8 of 10
(6,234 Views)

Actually, there is some accumulating difference in rotation between the two motors; there should not be though. 

 

0 Kudos
Message 9 of 10
(6,227 Views)

Would you mind swapping the motors just to see if the behavior is unrelated to motor? It sounds like only one is stalling, not both. Is this correct?

Ben D.
Applications Engineer
National Instruments
0 Kudos
Message 10 of 10
(6,208 Views)