Advertise on Bikeforums.net



User Tag List

Results 1 to 3 of 3
  1. #1
    la vache fantôme phantomcow2's Avatar
    Join Date
    Aug 2004
    Location
    NH
    Posts
    6,266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Will somebody who has CNC programming knowledge verify this please?

    Okay well today I was introduced to CNC programming, we learned G codes and M codes.
    As a homework assignment he said to write the program to have a machine out out a rectangle as this one:

    Okay so here is what i figured i would do

    N0 G0 Z1 (Rapid traverse up 1 in the Z scale to make clearance for workpiece)
    N1 M03 S1500 (setting spindle speed to 1500 rpm)
    N2 G1 X1 Y1
    N3 X1 Y2
    N4 X2 Y2
    N5 X2 Y1
    N6 X1 Y1
    N7 G0 Z1
    N8 M05 (shut off spindle)
    N9 M02 (end of program)

    I only entered G1 once, is this okay? Does the computer remember the last function that was assigned to it? Anything else?
    C://dos
    C://dos.run
    run.dos.run

  2. #2
    Just ride. roadbuzz's Avatar
    Join Date
    Oct 2000
    Location
    C-ville, Va
    Posts
    3,237
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've forgotten more about CNC programming than I ever knew. Do you need to add a Z0 to the first move to lower the tool? Or rather, move there, then lower the tool? I don't think you need to repeat the coordinate if it doesn't change, e.g. N3 could just be Y2, N4 X2, etc (but leaving it isn't necessarily wrong). Also, lines are usually numbered in increments of 10, e.g. N10, N20, etc., so you can easily insert instructions if you have to. Most controls now-a-days have an automatic renumbering feature, so it's no biggie.

    Was there any mention of a "home cycle", to get the programmed position synchronized to the actual position of the work piece? (Actually, I think that may typically be a manual operation, not programmed.) How about tool compensation, i.e. an automatic offset to allow for the width of the cutting tools (G40, G41, G42)?

    [editted about 17 times while I kept thinking of other stuff.]
    Last edited by roadbuzz; 05-23-05 at 09:05 PM.

  3. #3
    la vache fantôme phantomcow2's Avatar
    Join Date
    Aug 2004
    Location
    NH
    Posts
    6,266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by roadbuzz
    I've forgotten more about CNC programming than I ever knew. Do you need to add a Z0 to the first move to lower the tool? Or rather, move there, then lower the tool? I don't think you need to repeat the coordinate if it doesn't change, e.g. N3 could just be Y2, N4 X2, etc (but leaving it isn't necessarily wrong). Also, lines are usually numbered in increments of 10, e.g. N10, N20, etc., so you can easily insert instructions if you have to. Most controls now-a-days have an automatic renumbering feature, so it's no biggie.

    Was there any mention of a "home cycle", to get the programmed position synchronized to the actual position of the work piece? (Actually, I think that may typically be a manual operation, not programmed.) How about tool compensation, i.e. an automatic offset to allow for the width of the cutting tools (G40, G41, G42)?

    [editted about 17 times while I kept thinking of other stuff.]
    Thanks very much for your help here. It was the first day of the new subject so there was no tool change/compensation. He did go into pause and dwell, but besides that just the basic functions. I will ask him about not having to keep re entering the command if it does not change, i remember him telling us the computer remembers the last command so your probably right. Again, thanks
    C://dos
    C://dos.run
    run.dos.run

Posting Permissions

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