603,848 active members*
2,738 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    1

    tool head rotation about z-axis

    I am trying to program a glass cutting table to cut arcs. The problem is I need to change the orientation of the tool head (it's a steel wheel) to achieve proper scoring of the glass. For linear movements the C-codes work fine to rotate the tool head right before a G00 command. But for arcs I'd need a continuous adaptation of the tool angle to the tangential direction of the arc while it is executing the G02 or G03 command. Any ideas ?

  2. #2
    Join Date
    May 2007
    Posts
    781
    Break your g2/3 moves up into very short little g1 moves.

  3. #3
    Join Date
    May 2007
    Posts
    781
    Playing around over lunch.

    If you are in to doing macro B programming you could do something like this.
    The macro stuff could be put in a sub program and called with G65 or G66 in place of your G2 and G3 codes.
    On some controls you may even be able to redirect the G2 G3 codes to call your own subs.

    The stuff shown uses absolute arc centers but a little rewriting you could change that to incremental.

    Edit: The C words are commented out because the backploter does not deal with them well.
    Code:
    G0 X1.5 Y-1.0
    G1 X1.5 Y1.0 (C0.0)
    G1 Z-0.005
    
    #100=0   (ARC START ANGLE)
    #101=90  (ARC END ANGLE)
    #102=1   (ARC X CENTER)
    #103=1   (ARC Y CENTER)
    #104=0.5  (ARC RADIUS)
    #105=90 (NUMBER OF STEPS)
    ()
    #106=#100
    #107=[[#101-#100]/#105]
    WHILE [#105 GT 0] DO1
    #106=#106+#107
    #108=#104*COS[#106]
    #109=#104*SIN[#106]
    G1 X[#102+#108] Y[#103+#109] (C#106)
    #105=#105-1
    END1
    
    G1 X-1.0 Y1.5
    
    #100=90   (ARC START ANGLE)
    #101=180  (ARC END ANGLE)
    #102=-1.0   (ARC X CENTER)
    #103=1.0   (ARC Y CENTER)
    #104=0.5  (ARC RADIUS)
    #105=90 (NUMBER OF STEPS)
    ()
    #106=#100
    #107=[[#101-#100]/#105]
    WHILE [#105 GT 0] DO1
    #106=#106+#107
    #108=#104*COS[#106]
    #109=#104*SIN[#106]
    G1 X[#102+#108] Y[#103+#109] (C#106)
    #105=#105-1
    END1
    
    G1 X-1.5 Y-1.0
    
    #100=180   (ARC START ANGLE)
    #101=270  (ARC END ANGLE)
    #102=-1.0   (ARC X CENTER)
    #103=-1.0   (ARC Y CENTER)
    #104=0.5  (ARC RADIUS)
    #105=90 (NUMBER OF STEPS)
    ()
    #106=#100
    #107=[[#101-#100]/#105]
    WHILE [#105 GT 0] DO1
    #106=#106+#107
    #108=#104*COS[#106]
    #109=#104*SIN[#106]
    G1 X[#102+#108] Y[#103+#109] (C#106)
    #105=#105-1
    END1
    
    G1 X-1.0 Y-1.5
    
    #100=270   (ARC START ANGLE)
    #101=180  (ARC END ANGLE)
    #102=-1.0   (ARC X CENTER)
    #103=-2.0   (ARC Y CENTER)
    #104=-0.5  (ARC RADIUS)
    #105=90 (NUMBER OF STEPS)
    ()
    #106=#100
    #107=[[#101-#100]/#105]
    WHILE [#105 GT 0] DO1
    #106=#106+#107
    #108=#104*COS[#106]
    #109=#104*SIN[#106]
    G1 X[#102+#108] Y[#103+#109] (C#106)
    #105=#105-1
    END1
    
    G1 X-0.5 Y-2.5
    
    #100=180   (ARC START ANGLE)
    #101=360  (ARC END ANGLE)
    #102=0.0   (ARC X CENTER)
    #103=-2.5   (ARC Y CENTER)
    #104=0.5  (ARC RADIUS)
    #105=180 (NUMBER OF STEPS)
    ()
    #106=#100
    #107=[[#101-#100]/#105]
    WHILE [#105 GT 0] DO1
    #106=#106+#107
    #108=#104*COS[#106]
    #109=#104*SIN[#106]
    G1 X[#102+#108] Y[#103+#109] (C#106)
    #105=#105-1
    END1
    
    G1 X0.5 Y-2.0
    
    #100=360   (ARC START ANGLE)
    #101=270  (ARC END ANGLE)
    #102=1.0   (ARC X CENTER)
    #103=-2.0   (ARC Y CENTER)
    #104=-0.5  (ARC RADIUS)
    #105=90 (NUMBER OF STEPS)
    ()
    #106=#100
    #107=[[#101-#100]/#105]
    WHILE [#105 GT 0] DO1
    #106=#106+#107
    #108=#104*COS[#106]
    #109=#104*SIN[#106]
    G1 X[#102+#108] Y[#103+#109] (C#106)
    #105=#105-1
    END1
    
    G1 X1.0 Y-1.5
    
    #100=270   (ARC START ANGLE)
    #101=360  (ARC END ANGLE)
    #102=1.0   (ARC X CENTER)
    #103=-1.0   (ARC Y CENTER)
    #104=0.5  (ARC RADIUS)
    #105=90 (NUMBER OF STEPS)
    ()
    #106=#100
    #107=[[#101-#100]/#105]
    WHILE [#105 GT 0] DO1
    #106=#106+#107
    #108=#104*COS[#106]
    #109=#104*SIN[#106]
    G1 X[#102+#108] Y[#103+#109] (C#106)
    #105=#105-1
    END1
    Attached Thumbnails Attached Thumbnails Plot.jpg  

Similar Threads

  1. Macro for B-Axis rotation
    By NL2000 in forum G-Code Programing
    Replies: 9
    Last Post: 03-24-2008, 10:19 PM
  2. Integrex tool rotation
    By ajl6549 in forum Mazak, Mitsubishi, Mazatrol
    Replies: 1
    Last Post: 12-29-2006, 02:32 AM
  3. A axis continues rotation ?
    By thirty78 in forum G-Code Programing
    Replies: 4
    Last Post: 12-13-2006, 08:47 PM
  4. X axis to A rotation
    By quemast in forum G-Code Programing
    Replies: 6
    Last Post: 06-18-2006, 02:36 AM
  5. 5th Axis head rotation questions.
    By whiteriver in forum DIY CNC Router Table Machines
    Replies: 0
    Last Post: 11-19-2005, 08:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •