Rslogix 5k - Motion MAG instruction help

antsrealm

Member
Join Date
Dec 2010
Location
Brisbane
Posts
207
Hi,

I am relatively new to the motion control and just trying to understand how the MAG instruction tracks the master.

On some occasions I have found that the slave is starting and finishing out of sync with the master by a set amount of degrees.

I'll attach the code with the MAG instruction and the trend of the two command positions. If someone could explain how this can happen this will help me to understand where this is going wrong in the event they loose sync.

FYI - When I took the screenshot of the MAG we had a different recipe loaded with a gear ratio of 3. At the time of the trend it had a ratio of 4.

Thanks,

MAG.jpg image.jpg
 
I guess my main question at this stage is does the slave properly sync with the master at the specified ratio or does it just move the same amount (scaled by the ratio) and not care about where the master specifically is.

For eg. Will 0 degrees on the master always be 0 degrees on the slave or if one is moved forward manually will it stay out by that much while maintaining it's geared relationship. This is what appears to have happened in my case.
 
Hi,

I'm also relatively new to motion, but as far as I'm aware gearing only locks in the ratio and depending on when the gearing instruction is executed depends on how many degrees out the master is from the slave.

I'm not sure how repeatable it would be, but you could add logic to condition the MAG instruction rung and use a compare of the two actual positions and when they match (EQU) execute the gearing. You may need to play with th actual value and add some offset but It maybe adequate for what your after

Regards

Rob
 
Everyone is correct, the reason they are "out of sync" is because the master position wasn't 0 when the MAG was activated. Either the master isn't stopping exactly where you think, or the master starts moving before the MAG has taken effect.
 
You need to stage the slave axis before gearing or camming it. The master and slave will not automatically start from your "zero" positions. Check where the master is, move the slave to the correct position and then gear or cam them. You can also just move both the master and slave to zero, and then gear or cam them.
 
The gearing will follow the master exactly and will dynamically adjust to correct any errors.

But if you are trying to switch the gearing on and off against a moving master there are going to be errors in the timing of the lock position. Without clutch it will position lock immediately but the dynamics of the slave will get smashed. If you use the clutch dynamic limits of the slave will introduce a steady state error.

If you want to switch a slave on and off and maintain clean start and stop positions you will probably need to use a position cam. To remove the dynamics error you can create three cam profiles. You have a ramp up, ramp down and constant velocity cam. You create the ramp up and down cams to have a proportion of the cycle time each (say 10% ramp up 10% ramp down). To start you cam the ramp up and and put a pending cam for the constant velocity. You cam the constant velocity cam to start at 0.2 cycles (10%+10%) and let it loop. When you want to stop you append the ramp down cam.

This way the slave will always cycle in complete cycles. A single cycle is 10% up +80% constant +10 down. Two is 10% +80% +100% +10%. You can do this all day with no error and it will work the same if the master speed changes.

You can even do with an actual cammed movement of the slave so you have the three accel cams driving a single cam profile that drives the slave axis. It will do your head in but it work extremely well.
 

Similar Topics

Hi, I have a MAG instruction linking a Virtual Master with a physical slave servo with a ratio of 3. Following the command pos. Just wondering...
Replies
0
Views
1,145
Hello everyone, Ho do I go about making changes to a "Motion Axis Parameter" e.g. PositionScalingNumerator that is currently grayed out in the...
Replies
2
Views
1,297
I am looking at a program and have a few questions maybe one of you can assist with. It is a Compactlogix processor It has a few input cards and...
Replies
1
Views
2,051
Hi all, Can anyone give me a basic idea on how to use the motion instructions in rs logix 5000(including coordinate system)...can i run these...
Replies
2
Views
2,015
Good day fellow PLC Programmers, I would like to ask for help especially to our Allen Bradley users. In my 5 years working with PLC, I have never...
Replies
2
Views
5,954
Back
Top Bottom