587,043 active members*
3,233 visitors online*
Register for free
Login
Results 1 to 14 of 14
  1. #1
    Join Date
    Apr 2012
    Posts
    11

    Smile Program writing problem

    I am new to CNC programming and am teaching myself with a good bit of help from my supervisor. When I write a program and it finishes, the spindle turns off and I have to re-home the axes and go through the whole process again. I'm trying to write a program that will allow me to make a large quantity of the same part without having to start all over. Basicially make a part, put another one in the vise and push start and so on. Any help would be greatly appreciated. Also, is there a good handbook that I could get to help me out?

  2. #2
    Join Date
    Feb 2009
    Posts
    6028
    Might help to know what your control is, and a sample program.

  3. #3
    Join Date
    Jul 2011
    Posts
    65
    I'm only familiar with Fanuc controllers, but if you're running one of those, you'd be best off to set a workpiece coordinate (G54-59). Prior to my present employment, they used simple absolute programming, where they would move the tool to the starting point on the workpiece, home the z axis, and let fly. So long as you didn't move the machine manually, it would just keep going.
    Like i said, my knowledge lies in Fanuc controllers, and old ones at that. I've been told that others work very similarly, but I personally don't have any experience with them.
    It would also be helpful to know if you are using multiple tools during the cycle, as it can save a good chunk of time (for me at least) to ensure that the first tool used is in the spindle at the end of the cycle.

  4. #4
    Join Date
    May 2004
    Posts
    4519
    Maybe he is programming with G91 and not "unwinding" back to starting point after cutting. In any case, what he is doing is not the best way.

  5. #5
    Join Date
    Jul 2011
    Posts
    65
    but that issue (if the case) could be easily fixed by using something like G90G53X-(x)Y-(y) at the end of the program to get to a start position, couldn't it?

  6. #6
    Join Date
    May 2004
    Posts
    4519
    Quote Originally Posted by FuddMcDee View Post
    but that issue (if the case) could be easily fixed by using something like G90G53X-(x)Y-(y) at the end of the program to get to a start position, couldn't it?
    Yes, it could. But he is learning and probably does not know these things. His machine probably also accepts G54, etc. His supervisor teacher probably does not know jack, that is why he is asking here.

  7. #7
    Join Date
    Jul 2011
    Posts
    65
    It's how i learned as well, from posts on here. Great place, and i hope he/she proves his/her worth as i have.

  8. #8
    Join Date
    Jul 2011
    Posts
    65
    Ok, apologies for being less than helpful in the last post, I didn't have a whole lot of time to write a proper, helpful response.
    If you can locate in your workpiece accurately enough for your tolerances, you have passed the hardest part (imo). That zero location you use, when homed in on your workpiece, is what you will want to use as your workpiece zero location (G54-59, pick one)
    at the beginning of your program, you will want something along the lines of
    G0G54X0Y0
    that will bring your machine to the start (home) location you have for your part in the vice.
    at the end of the program, you will want to clear on the Z axis first, then bring your table to a comfortable load/unload position for you. For me, that is at 6" off the machine home on X, and about half an inch off on Y (would bring it closer, but the vices are a pita to loosen any closer).
    G0G91G28Z0.M5
    goes from present location in Z straight to the Z axis home position, in full rapid, and shuts off the spindle. Mind you, you don't need to use a full home if you're not going to be changing tools, in which case, you can simply move the Z axis to whatever position you want.
    G90G49G53X-6.Y-0.5M9
    This returns the machine to absolute programming, cancels the tool offset, moves the machine to 6" and 0.5" off of the X and Y machine homes, respectively, and shuts off the coolant.
    I always make it a personal preference to kill the spindle before the coolant, not that its going to make much of a difference in the case of a crash, but it works that way in my head.
    Hopefully this at least remotely helps you, and best of luck!

  9. #9
    Join Date
    May 2004
    Posts
    4519
    Thanks. I hope he checks back for that explanation.

  10. #10
    Join Date
    Apr 2012
    Posts
    11

    Smile

    Guys you don't know just how much I do appreciate all the information. I'm super excited about learning all of this. My supervisor and I are learning all of this together. He's a super guy and is a great machinist. He has some knowledge of CNC machines, but due to his position as Plant manager, he doesn't have a great deal of time to spend on it. I plan on asking A LOT of questions on here. So I hope all of you have plenty of patience. I'm the type of guy that is oppsessed with learning. I think one problem I'm having is I used a M22 code at the end instead of M30. Am I correct in this assumption? Anyway thanks again for all the help. I look foward to talking with you guys in the future.

  11. #11
    Join Date
    Apr 2012
    Posts
    11
    And Fudd, that last post did help a lot!!!!!!

  12. #12
    Join Date
    Apr 2012
    Posts
    11
    One more thing. I'm using a DX-32 system if that helps any.

  13. #13
    Join Date
    Apr 2010
    Posts
    63
    The DX-32 is a very good control for a job shop, using MACROS, LOOPS, & CYCLES you can program most 2-1/2D parts at the machine in very little time.
    But it has a very annoying start procedure. On single tool ops I use a loop to save wear & tear on my vari-speed pulleys.

    In the main program just after speed call add a loop as follows.

    S4200
    N110/100
    G0 X=== Y==== Z CLEAR
    ?
    ? (program for your part)
    ?
    GO ZCLEAR
    GO X=== Y=== (A clearance point where you can change parts safely without loosing fingers)
    MO3
    N100
    GO ( TO TOOL CHANGE POINT)
    S1500
    M02

    This will pause the prog. at the PART CHANGE point without stopping the spindle and wait for you to push the cycle start button, the DX-32 requires an M02 at the end of your program to stop & rewind the prog.

    Hope this helps

    Mark

  14. #14
    Join Date
    Apr 2012
    Posts
    11
    Thanks Mark. This does help. I'll give it a try.

Similar Threads

  1. Need help writing program for Citizen E2-32 for long parts
    By gizmo_454 in forum CNC Swiss Screw Machines
    Replies: 6
    Last Post: 12-16-2011, 07:17 PM
  2. writing g-code program for fadal vmc for tapping and drilling
    By mrivera85706 in forum G-Code Programing
    Replies: 0
    Last Post: 08-31-2011, 11:23 PM
  3. k8048 error when writing problem
    By walkerandy in forum PIC Programing / Design
    Replies: 6
    Last Post: 08-28-2011, 05:00 PM
  4. G Code Program writing
    By Tool Guy 1234 in forum G-Code Programing
    Replies: 1
    Last Post: 04-24-2010, 12:33 AM
  5. sub program problem
    By 5xphil in forum Mazak, Mitsubishi, Mazatrol
    Replies: 3
    Last Post: 05-05-2009, 03:54 AM

Posting Permissions

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