Hello Guest it is April 18, 2024, 04:54:23 PM

Author Topic: Modifying facing code  (Read 1725 times)

0 Members and 1 Guest are viewing this topic.

Modifying facing code
« on: April 14, 2014, 09:25:45 PM »
Hello,

A nice piece of variable facing code was written by someone for leveling stock. The code works on the upper surface. What I'd like to know is it possible to adjust the code to work on a vertical surface? The reason why i ask is i also have a metal metal foundry in which i melt down aluminum pour in blocks. The blocks need to be cleaned up prior to milling. Due to the size of the block and my bench top mill i can't fit them on edge.

My thoughts on the 2 types of movement could be done.

1) Set the tool at the top of the part. The code would move down a specified amount the traverse + X reach the end Z down the - X repeat cycle.


2) The tool would be at the bottom of the part. + y increment  Cut + X across vertical face + Y increment cut - X back to zero repeat.

The host code is attached. Any thoughts are appreciated.

(CUTS Top Face of stock)
    (STARTED AT Z0 TOP OF rough PART)

    M03 (start spindle)
    G1G90X0Y0Z0.25F60. (Go to lower left corner of stock)
    Z0 ( Feed to face of rough stock)

    (load variables)
    #1000=[2](Length in X in this case inches ******* correct)
    #1001=[2] (Width in Y ******* correct)
    #1002=[-0.1] (depth each of cut pass)

    #1004=0 (i beleive this should be value i in put NO, leave it at ZERO)
    #1005=0.2 (offset cut distance smaller than .75 cutter diameter)
    #1006=[#1005*2] (Compute step over)
    #1007=[#1001/#1006] (Compute passes)

    M98 P5 L8 (call subroutine CUT DOWN IN Z in this case 0.1 * 8 = .8")
    M05 (stop spindle)
    G0G90Z.25 (move back up)
    X0Y0 (go home)
    M30 (All done)

O5
    M98 P10 L1 (call sub to feed down)
    M98 P20 L1 (call sub to face part)
    G0G90Z0 (Move out of the way)
    X0Y0 (Go Home)
    M99

O10
    #1004=[#1004+#1002] (Calculate New cut depth)
    G1Z[#1004] (MOVE TO CUT DEPTH)
    M99

O20
    M98 P30 L[#1007] (call sub to cut reps ACROSS)
    M99

O30
    (THIS IS THE SUB TO CUT FACE)
    G1 G91Y[#1005] (Increment over in Y)
    G90X[#1000]F80. (Cut across part)
    G91Y[#1005] (again increment over)
    G90X0 (Cut back across part)
    M99