Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

arc.vi 's input "Radius" is distance from arc centre or distance from vector space centre 0,0

Sorry but I haven't programmed a solution for that, yet. I think the best approach will be to transform the coordinate system first in order to place the center of the circle at 0,0. Then you can convert your coordinates from XY to polar coordinates. In this coordinate system the calculations should be not too hard to calculate your position buffer. In a last step you will have to transform your coordinates back to XY coordinates.
There are other solutions, too but they involve a lot of complicated trigonometrical equations.
Unfortunately I don't have enough time to do the math for you.

Jochen
0 Kudos
Message 11 of 13
(1,205 Views)
Hi jochen
thanks for your kind suggestioons.
In case of G01 or straight move, i will convert the XY values in polar cordinates and feed magnitude value to the linear axis and angle values to the rotary axis into Laod target.vi.but what can be done in case of arcs.
 
If I need to interpolate it, how it can be done?
 
I am attaching G codes of XY but has to convert in to XC, G codes
 
Surender
0 Kudos
Message 12 of 13
(1,202 Views)

Hi,

I suggest the following formula that I worked out for you just now,

Calculate the centre angle of the arc, i.e. the angle subtended by the arc to the centre of the circle by the formula below,

theta = 2*sine inverse (L / 2R).

Where L is the distance between the two points (x1,y1) and (x2,y2) and R is the radius of the arc.

Now since you have theta, now you can find the points in the arc by increasing theta from zero till the value you just obtained from the above forumla and simultanously multiplying all the theta values with the radius in a while loop. This means that you have obtained all the coordinates of the points in the circumferance of the arc by using the simple formula,  arc length = R * theta. Now that you have all the points of the circumferance, you can do an interpolated to all the points so obtained. You will have to select contoured move as Jochen suggested rightly. Use the Wait for move complete to make the controller finish current move before jumping to the next commanded position. Remember to use a delay of at least 100ms in the while loop. I'm sure, by this you will obtain a complete arc with good accuracy.

Regards,

Giridhar Rajan

0 Kudos
Message 13 of 13
(1,191 Views)