603,417 active members*
2,323 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2016
    Posts
    9

    Need help writing a G code

    Hello,
    I posted a thread earlier on another forum so I will explain what I am doing on this forum. We are building a large machine that resembles a cnc router. Instead of a router on the z axis we will have an automatic screw driver from Design Tool Inc that will drive 3 inch screws into hardwood boards. We are making a pallet for Seagrams to store wiskey barrels on to age the wiskey. Anyway what I am needing this to do is....x and y move to the g code position, then the screw drivers drop via an air cylinder. (I was thinking of controlling the air solenoid with M7 or M8 if that works) Then the screw drivers hit a prox when they drove deep enough at that point the cylinder needs to retract. As soon as it is retracted it will hit another prox at the top and at that time x and y will move to the next position. it will have a total of 32 positions after the last location it needs to go home. I am using Mach3. I have very limited experience with Mach3. We have 2 Chinese routers from Baleigh . So if someone could show me a sample G code with maybe a M code for the solenoid or whatever is the best way to control a solenoid it would be greatly appreciated.
    Thanks

  2. #2
    Join Date
    Mar 2016
    Posts
    9

    Re: Need help writing a G code

    Ok an update on this….. I only have 1 more move to figure out. So far what I have done is when x and y get to the coordinates I then call M3 in the G code. That turns on my spindle relay on the BOB which turns on the air solenoid. I can use that relay as I am not using a spindle. I then call M110 which I vb scripted to OemButton1001 which is feedhold. The move I am missing is I need to turn off the relay with a limit switch when the drill is done with its down stroke. I have not figured out how to write a script for that. If anyone knows please tell me. The next line I call M111 which I have scripted to OemButton 1005 which is cycle start. I am starting to feel better about this machine as I was skeptical as this is my first major design of a machine. We are building this from scratch and my boss gave me a budget of $65,000.00 for this build. I will be very close.

Similar Threads

  1. writing code for a laser
    By tp77 in forum Uncategorised CAM Discussion
    Replies: 3
    Last Post: 02-18-2015, 05:14 PM
  2. writing code
    By joe aiello in forum Mach Wizards, Macros, & Addons
    Replies: 1
    Last Post: 03-21-2012, 12:12 PM
  3. writing code and proving out
    By camtd in forum G-Code Programing
    Replies: 1
    Last Post: 12-05-2010, 02:36 AM
  4. Writing a custom M code?
    By greeder88 in forum Dynapath
    Replies: 1
    Last Post: 06-24-2009, 02:52 PM
  5. writing G code
    By 300magnum in forum Australia, New Zealand Club House
    Replies: 2
    Last Post: 09-11-2008, 04:31 AM

Tags for this Thread

Posting Permissions

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