OMRON Forums

# Circular Interpolation

## Recommended Posts

Hi all,

I got question about circular interpolation in motion program. Here is my code :

```OPEN PROG 1 CLEAR
INC
INC (R)
F 1
CIRCLE1
NORMAL K-1
X 0 Y 0 i 25 j 0
CLOSE
```

As you can see in the program i made a complete circle, and UMAC automaticaly interpolate the movement. In my case, i want to have a

circular movement with segment by segment movement ( by specifiying angle or arc length) and using the while loop to have a complete circle. Anyone ever try ?

Thank you

• Replies 7
• Created

#### Popular Days

You simply specify the end point for each arc you want to define. It is assumed the start point is the current location. You can calculate this from angle, arc length, radius, or any other criteria you want to consider.

This value can be calculated outside the motion program in a PLC, placed in a variable, and used in the motion program:

X(P100) Y(P101)

Or you can embed the calculations in the motion program

X(5.2*sin(P233/M108)) Y(..some other expression..)

Or you can call another motion program as a subroutine to make the calculations in 'real time'

Or..... (with PMAC there are multiple ways of doing things. Some better than others in a given application; sometimes just equal alternatives)

See the PMAC Users Manual - it has a section on using the various move definitions including Circle1 and Circle2

In your code you are defining the center location. You can also define the radius and let PMAC find the center.

If you define both and they do not agree, Users Manual says PMAC will make up the differrence linearly through the move. This would result in a segment of an Archimedes Spiral. (??)

##### Share on other sites

hendraprimasyahputra,

If you want to do a complete circle, all you have to do is to define the centre of the circle. Start point for an arc/circle is always the current position of the axis, and the end point is defined by values assigned to the axis. If no value is defined, the same values as starting position will be the end point of the arc, resulting in a full circle around the centre point defined by centre vector. (Radius can not define a unique solution in case of full circle, hence can not be used in this case.)

Example: Full CW Circle with radius of 5 with centre on (5,5) on XY top plane

```
OPEN PROG 1 CLEAR
F1
TA100
TS20
ABS
LINEAR
X0 Y5        // move to starting point with linear move
CIRCLE1     // clockwise circle
INC(R)       // centre vector will be defined in incremental mode
NORMAL K-1   // circle in XY top plane
I5 J0         // define the centre vector from start point
CLOSE
```

Regards,

##### Share on other sites

• 3 weeks later...

Hi,

When PMAC doing a circular interpolation, the segmentation time is controlled by Isx13. In my case, i want to know the target position for each segmentation time ? is it possible to do this ?

##### Share on other sites

Hi hendraprimasyahputra,

The easiest way to find out the values for segment interpolation is using Kinematics routines. Since the Kinematic routines are calculated at every segment, the desired values for X, Y, Z ... are sent to inverse kinematic routine through Q7, Q8 and Q9 where motor positions are calculated. You can store these values in open registers or P-variable arrays for later use.

Regards,

##### Share on other sites

The segment positions in motor coordinates are stored in the "motor target position" register (suggested M-variable Mxx63). If the coordinate system is set up with axis definition statements, these positions are not stored in axis coordinates, but as Sina points out above, if you define the C.S. with kinematic routines, they will be in Q-variables.

Curt Wilson

##### Share on other sites

• 2 months later...

Hi all,

How to gather circular trajectory data as a combination of motor #1 and motor #2 motion ?.

Thanks for the help. ^_^

##### Share on other sites

Use the PMAC plot PRO2 softawre and gather the actual/commanded position for motors 1 and 2. Then you can select one of the motors data to be displayed on horizontal axis and the other one on vertical axis and you can see the circular trajectory.

##### Share on other sites

This topic is now closed to further replies.

### Announcements

×
• Forums

• Events

• #### Store

×
• Create New...