Hello Guest it is April 26, 2024, 12:16:42 AM

Author Topic: Facing grode with variable not working  (Read 3117 times)

0 Members and 1 Guest are viewing this topic.

Facing grode with variable not working
« on: April 22, 2011, 09:45:35 PM »
I have been trying to get this bit of code to work. When it is run the mill moves to xy 00 adjusts the z then stops. No more movement x y travel/step over ect.

I obtained the code from the share your code section. "multi pass facing" by ya-nvr-no.

I have asked the creator a few questions which he replied. I am very new at this. My questions are: Is there configs that need to be set/check to run this type of code? Am i not filling in all the required numbers i should in put? I have put ***** the numbers i have put in and question marks where i beleive a value should be in put.

I beleived it would be load the program cycle start and and admire someone elses handy work. Silly me >:(.

Thanks in advance
Craig

    (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) *******
    #1001=[2] (Width in Y) *******
    #1002=[-0.1] (depth each of cut pass)

    #1004=0 i beleive this should be value i in put ??????
    #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
Re: Facing grode with variable not working
« Reply #1 on: April 22, 2011, 11:15:22 PM »
Hey Craig, hope this helps.
The subs (O5, O10, O20 and O30 must start at the very left edge of the page ... no spaces or anything else in front of them  (line #s) or Mach will n ot see them.
Enter the length and width as you have, also the depth per pas (#1002) and the number of depth passes (the L# in the M98 P5 call.

Your main problem is the spaces ahead of the SUBS.
ALL of the code should start all the way to the left I'd guess.

You can see what I mean in the attached example.

Let me know it you get it to work, works good here.
Regards,
Russ
Re: Facing grode with variable not working
« Reply #2 on: April 22, 2011, 11:23:57 PM »
oh ... and leave #1004 at ZERO.
You can see in O10 where it is incremented automatically by your input in #1002.

  O10
    #1004=[#1004+#1002] (Calculate New cut depth)

Russ
Re: Facing grode with variable not working
« Reply #3 on: April 23, 2011, 12:52:43 AM »
Russ,

     You Sir are an officer and a gentleman. Thank you for helping me me run my first G-code. Big smiles on my end watching this cool machine and software work (insert happy dance). If you'd like i'll send you a brick of homemade alluminum for your help. A small price for me to pay for your much needed assistance. I would have never figured that one out.

     The block being cut; I made.  ;D

See the video
http://www.youtube.com/watch?v=Q1CfIFt4UjM

Thank you again.
Re: Facing grode with variable not working
« Reply #4 on: April 23, 2011, 01:34:21 AM »
Happy to help and glad you got it going.
Thanks for the offer, I'd rather request that you be sure to post some of your cool upcoming projects for all to enjoy.

Regards,
Russ