Jump to content
OMRON Forums

Blend under LINEAR mode when doing circular interpolation


KiraYamato
 Share

Recommended Posts

Hello, everyone

 

I am doing a circular interpolation under LINEAR mode

 

I divide the radius angle by N so I have a constant move segment time

 

then I compute each point on the circle and give them to the X and Y axis

 

I read in the user manual that: PMAC will blend between the segment

 

so if N is large enough the velocity of each axis will change smoothly

 

but I did not get the expected result

 

the shape of axis velocity looks like many peaks

 

can you tell me how should I set PMAC to make the move blend?

 

Here are my motion program:

***********************************

&1

CLOSE

UNDEFINE ALL

#1->X

#2->Y

 

;****** Motion Program Text *******

 

OPEN PROG 1 CLEAR

abs

 

P1=2000 ;radius

P2=1000 ;divide central angle by N

P3=3.1415926 ;Pi

P4=0.32*P3 ;angular speed

 

P5=1000*2*P3/P4 ;total move time

P6=P5/P2 ; time between the interpolation points

 

P11=0 ;loop counts

 

LINEAR

TM 100

X 0 Y 0

 

DWELL 500

 

While (P11 < P2+1)

 

P21=2*P3*P11/P2 ;central angle

 

P22=P1*(1-cos(P21*180/p3));

P23=P1*(sin(P21*180/p3));

 

P24=P4*P1*sin(P21*180/p3);

P25=P4*P1*cos(P21*180/p3);

 

TM(P6)

X (P22) Y (P23)

 

P11=P11+1

 

EndWhile

 

CLOSE

 

NoBlend.thumb.jpg.d85df7fdc2ef786d6bb8de6459af8784.jpg

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

The blending is controlled by the acceleration time parameters, which you have not specified in your provided code. When you use Linear mode for smooth contouring, the TA time should be set equal to the TM time, and the TS time should be set equal to 0. If the TM time is greater than the acceleration time, you will get "flats" in between blends in your contour.

 

I notice you are using PI explicitly in your angle calculations to convert radians to degrees. If you set I15 to 1, the trig functions will use radians directly.

Link to comment
Share on other sites

Hi KiraYamato,

 

The blending depends on acceleration time or TA setting in your program. I would suggest changing the TA in you motion program and observe the result.

 

PS: Why don't you use PMAC's built-in circular interpolation and segmentation?

 

Dear Sina:

 

Thank you for your instruction. I just want to use the circular interpolation as a test fot the effect.

 

I have a spatial curve to be followed, and I can generate the position and velocity commands for each axis. Then I should decide what kind of move modes should I use to give the commands.

 

I tried the PVT command, but I got a peak in the velocity curve, which would enlarge the position error, so I want to see how about the LINEAR mode.

Link to comment
Share on other sites

The blending is controlled by the acceleration time parameters, which you have not specified in your provided code. When you use Linear mode for smooth contouring, the TA time should be set equal to the TM time, and the TS time should be set equal to 0. If the TM time is greater than the acceleration time, you will get "flats" in between blends in your contour.

 

I notice you are using PI explicitly in your angle calculations to convert radians to degrees. If you set I15 to 1, the trig functions will use radians directly.

 

Thank you ,sir

I will try it~

Hope I can get a good result~

Link to comment
Share on other sites

Hi KiraYamato,

 

The blending depends on acceleration time or TA setting in your program. I would suggest changing the TA in you motion program and observe the result.

 

PS: Why don't you use PMAC's built-in circular interpolation and segmentation?

 

The problem was solved, by moving the TM(P6) command

It seems that I can not set the motion time in dynamic......

Link to comment
Share on other sites

That should not matter. Setting the TM time inside the loop as you had in your original example should work fine. Many people do this, especially if they need to change the time each loop. In your case, with a constant time, it would make a little more sense to put the TM command above the loop, saving a little calculation time, but it should not affect the trajectory at all?

 

Did you change anything else? What are your TA and TS times? (If not set in the program, they rely on the saved values of Isx87 and Isx88, respectively.)

Link to comment
Share on other sites

That should not matter. Setting the TM time inside the loop as you had in your original example should work fine. Many people do this, especially if they need to change the time each loop. In your case, with a constant time, it would make a little more sense to put the TM command above the loop, saving a little calculation time, but it should not affect the trajectory at all?

 

Did you change anything else? What are your TA and TS times? (If not set in the program, they rely on the saved values of Isx87 and Isx88, respectively.)

 

Sir:

thank you for your attention, but I really made no change else, and this time, it works successfully. Maybe I should change it back and see the difference.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...