iCAx开思网

标题: UG_POST circular_move "R" instead of "I J" [打印本页]

作者: jinly    时间: 2004-4-7 20:57
标题: UG_POST circular_move "R" instead of "I J"
Hi, experts
  
    I am developing a postprocessor for FANUC 18M ....and got the following problems:
  
   for moom_circular_move, I want to output the "R" instead of "I J", I am using R[$mom_arc_radius], and the output in correct format. but the problem is:
  
   When I am doing a cicular movement whose sweep angle (A) is greater than 180, then the machine will just go along the small arc (360 -A), which will cause serious problem, and hurt the part.
  
  so, in this case, it is better to use R = -$R, using the negative R value.
  
  Then the problem comes: How can i decide the sweep angle is greater or smaller than 180?  I can not find a parameter available, and how can I do the calculation?
  
  In CLSF file of IDEAS, we can see the Sweep angle for a circular move, is there a similar one in UG ?
  
  Here is BLOCK:
  
  BLOCK_TEMPLATE circular_move  
  {
       G_cutcom[$mom_sys_cutcom_code($mom_cutcom_status)]\opt
       G_motion[$mom_sys_circle_code($mom_arc_direction)]\opt
       G_mode[$mom_sys_output_code($mom_output_mode)]
       X[$mom_pos(0)]
       Y[$mom_pos(1)]
       Z[$mom_pos(2)]
       R[$mom_arc_radius]
#        I[$mom_pos_arc_center(0) - $mom_prev_pos(0)]
#       J[$mom_pos_arc_center(1) - $mom_prev_pos(1)]
#       K[$mom_pos_arc_center(2) - $mom_prev_pos(2)]
       F[$feed]
#      S[$mom_spindle_speed]
  }
  
  
  
   I amm so worrying about this problem, Please advise as soon as possible!
  
  Thanks and have a nice day!
  
Best regards
作者: hchhyl    时间: 2004-4-7 22:00
Try   mom_kin_arc_output_mode  "QUADRANT"
作者: jinly    时间: 2004-4-8 09:59
Thanks, I tried, but it will cause even more unpredictable problems....
作者: jinly    时间: 2004-4-8 11:10
Someone give me this solution, is there any better solution, thanks:
  
Hi Jin,
  
     You have the previous position, present position, center point and radius of
the arc. You can easily create two vectors and find the dot product of the vectors
to find out the included angle.
  
   a.b = ab cos(theta)
  
to calculate the dot product use the proc VEC3_dot {u v}.
  
Regards
  
Vasanth.SN.
Tata Consultancy Services
Lynn, MA.
作者: cadstudio    时间: 2004-4-10 17:35
顶一下这个问题!
圆弧输出时用R是比较难以判断的,用I、J、K就容易了!




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3