# Axis Synchronization (Rotary and Linear )

## 12 posts in this topic

I'm using NX1P2 controller and want to synchronize Rotary axis with Linear axis, here an example how it should work, Say we have Rotary Axis "R" and Linear Axis "L" now for linear movement of axis "L" 30.0000 mm the Rotary axis "R" should move by exact 360.00 deg. Both axis should move simultaneously in synchronize manner.

Right now these axis are synchronized by the velocity calculation of both axis.

Is there is any better way to perform this syncronization.

Note in this, The value of Linear axis "L" is variable comes from calculation based on data provided. And value of Rotary axis "R" is fixed 360.00 deg, I.e for any  X value of axis L, the axis R should move by 360.00 in syncronized manner.

##### Share on other sites

I would think you could use gearing.

##### Share on other sites

But it is for rotary axis, where both axis have rotary function, in my case one has linear and another one is rotary

##### Share on other sites

Disclaimer: I don't have any experience in motion control, so forgive me if I have misunderstood.

You said that L moves X distance (X is calculated from the PLC), and then R needs to rotate 360degrees in sync with L's movement?

Can you take 360degrees, divide by L (ie. R/L=Y). Y is how many degrees of rotation are required every time L moves 1 unit (mm in your example, but could be used for any distance unit really). The result of this formula would update based on the value assigned to L at any given point.

Can you then use Y to move your R axis by making R's movement relative to L? Like I said, I have no experience in motion control, so I am not sure how that would be applied at that point, my contribution is more how to determine a ratio between L and R that you can possibly use.

Edited by BE

##### Share on other sites

"Is there is any better way to perform this syncronization"

Add a virtual axis as a master then link the rotary and linear axes to follow the master using different axis configurations.

##### Share on other sites

Using gearing, it shouldn't matter if one is rotary and one is linear. The Function block uses one axis to drive another at a set ratio.

##### Share on other sites

Not all models of the NX1P2 support gearing (coordinated motion). If you have a 1040 or 1140 use gearing, if you have a 9024 then you'll have to do the math and movements in logic

##### Share on other sites

What you are proposing sounds like linear interpolation to me.  You do have to have the 1040 or 1140 to do interpolation as well.  To do interpolation, you need to create an Axes Group.  Then you can issue the MC_MoveLinear Function Block.

However, gearing would work as well.  You don't have to have a virtual axis to do that if you don't want to do so.  You can just figure out how fast you want one of the axes to move, call it the "master" axis and then gear the other to it.  Standard command to the master.  The gear ratio then becomes important though.  In your example if the linear axis is the master, the gear ratio would be 12/1 (360/30).  I would recommend that you use _mcCommand as the Reference type or _mcLatestCommand (if the master has a lower axis number than the geared axis).

##### Share on other sites
1 hour ago, Michael Walsh said:

What you are proposing sounds like linear interpolation to me.  You do have to have the 1040 or 1140 to do interpolation as well.  To do interpolation, you need to create an Axes Group.  Then you can issue the MC_MoveLinear Function Block.

However, gearing would work as well.  You don't have to have a virtual axis to do that if you don't want to do so.  You can just figure out how fast you want one of the axes to move, call it the "master" axis and then gear the other to it.  Standard command to the master.  The gear ratio then becomes important though.  In your example if the linear axis is the master, the gear ratio would be 12/1 (360/30).  I would recommend that you use _mcCommand as the Reference type or _mcLatestCommand (if the master has a lower axis number than the geared

As here the value become integer, can it support something like, Linear axis move for 27.2345mm and Rotary axis moves for 360 deg ??

##### Share on other sites

All MC command values relating to movement (Position, Accel, Jerk etc) use the LReal datatype. if you happen to be working with integers elsewhere you can use the function INT_TO_LREAL when it comes time to actually use the value in a movement instruction

##### Share on other sites

@Michael Walsh   @photovoltaic  as I said, the values for these axis are LREAL and con not be converted in to integer for gear in option.

We have to use these values as it is ..

##### Share on other sites

To change it to a integer you can multiply both axes by a 1000 or some other number this will give you integers that would be usable in the gearing.