Need help with Gcode for homing


Results 1 to 9 of 9

Thread: Need help with Gcode for homing

  1. #1
    Registered
    Join Date
    Mar 2005
    Location
    usa
    Posts
    214
    Downloads
    0
    Uploads
    0

    Default Need help with Gcode for homing

    I've got a desktop 4 axis mill with proximity switches on all axis for homing, for XYZ all is good, G28 will home them all or individually just fine. On my rotary A axis, it's a no go. G28A gives me an missing command error and WinCNC my software, doesn't seem to recognize the code. It looks like it'll only home XYZW.

    The switch works fine and it'll trip as a limit when wired up that way but I want it to trip only when I home it. I can wire it in as an Aux input but I can't figure out how to write the gcode for a routine to rotate A till the switch trips, stop A, and then set the machine zero.

    Thanks in advance.

    Similar Threads:
    www.harryhamilldesigns.com
    CAD sculpting and services


  2. #2
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1511
    Downloads
    0
    Uploads
    0

    Default

    Doing a G28A0 will send your machine to “HOME” position. Home position is not always your reference position. Which is what I think you are looking for. Sometimes I set up my machining centers to have home position different from machine origin (where your switches will be). You need to give it a G53 in the same command. G28G53A0 should get you there.

    Not familiar with your machine. What kind of control do you have on it?

    Stevo



  3. #3
    Registered
    Join Date
    Mar 2005
    Location
    usa
    Posts
    214
    Downloads
    0
    Uploads
    0

    Default

    Thanks Stevo, I tried both of your suggestions but my mill just sits and stares at me.

    It's a benchtop mill, a Minitech Minimill 3 Pro with Wincnc (http://www.wincnc.net) running Coolmuscle servos with integrated controllers. (http://www.coolmuscle.com/Motors?motors3=CM1-P-23L20)

    I think it's a WinCnc issue and might have to come up with a workaround.

    www.harryhamilldesigns.com
    CAD sculpting and services


  4. #4
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1511
    Downloads
    0
    Uploads
    0

    Default

    Hmm. Do you have a programming manual for this machine? I looked up the G-code for this machine with the links you provided. Your machine does have G53 but I don't quite understand the definition. One other thing to try put the G53 first before the G28. G53G28A0. G28 is a position and the G53 says it is a rapid movement to the specified position so maybe the G53 needs to be first then sees the position of G28. One other thing is try the G53A0 on its own with no G28. This however should take you to home position and you are looking for orgin.

    With the description of the G53 I would think you should get a movement and not the machine just sitting there.

    I just caught this in your first post. G28A gives a missing command error. You should have to have a value specified with the A. G28A0.

    Stevo



  5. #5
    Registered
    Join Date
    Mar 2005
    Location
    usa
    Posts
    214
    Downloads
    0
    Uploads
    0

    Default

    Do you have a programming manual for this machine?
    No, there's not a lot of documentation concerning Gcode except for the listed commands.

    G28G53A0 and G53G28A0 both give me errors for multiple commands.

    G53A0 will rotate the axis to what I assume is machine zero.

    G28A should home A if WinCnc recognized it I believe, G28X will home X independently for example.

    Are the G28 routines usually kept somewhere in like a config file or are they housed somewhere in memory on the board? I've looked all over trying to find the code thinking I could modify the file to work for A but without any luck. Am I completely wrong thinking G28 runs a routine or macro somewhere?

    Thanks for your help.

    www.harryhamilldesigns.com
    CAD sculpting and services


  6. #6
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    187
    Downloads
    0
    Uploads
    0

    Default

    I'm not the world's foremost expert but I have a machine with WinCNC, you should have a file named cnc.ini or cnc2.ini (depending on version) for WinCNC. the homing routines should be there along with other startup info.
    Be advised I have no rotary axis, in that .ini file is a section for g28 settings, essentially what the machine does after performing the home, you can make adjustments there for what happens after the machine homes, like where the machine moves to after homing. I hope this helps a little. no support from machine manufacturer or WinCNC?



  7. #7
    Registered
    Join Date
    Mar 2005
    Location
    usa
    Posts
    214
    Downloads
    0
    Uploads
    0

    Default

    I'm pretty familiar with the .ini file, I've configured quite a few things in there to my liking. As per your suggestion, I checked and the G28 settings are configurable as to the approach speed and how far you want the motor to back off after tripping the switch etc. Of course, (D'OH!) I didn't notice that there is a line for g28A and (D'OH again!) it had a "[" preceding it, which disables it.

    So, now with that enabled, when I G28A, it spins happily along but nothing happens when it trips the switch. I'll have to do some more investigating on the hardware side to make sure it's all OK, but at least it's progress.

    I did email Wincnc, earlier this week and they said they'd look into it. Nothing yet.

    Thanks for your help.

    www.harryhamilldesigns.com
    CAD sculpting and services


  8. #8
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    187
    Downloads
    0
    Uploads
    0

    Default

    Does your axes window on the display show the A axis and the limit switch state? Progress is a good thing, Bill Murray said it best, "Baby Step, Baby Step". I noticed these guys are into wincnc pretty heavy and I think they know their way around the .ini files pretty well, plus like everybody here they are willing to help:

    http://www.cnczone.com/forums/showthread.php?t=67525

    Doesn't matter if they have routers and you have mini mill, control doesn't know the difference.

    After all............we're all in this together.

    I hope



  9. #9
    Registered
    Join Date
    Mar 2005
    Location
    usa
    Posts
    214
    Downloads
    0
    Uploads
    0

    Default

    Well, it's homing via G28 fine now, but whenever it trips the switch while rotating, it triggers a limit which pauses the program. Kind of a deal killer there for a rotary. Wincnc doesn't have a setup for separate home and limit inputs as far as I can tell, which is why I was considering wiring the switch in as an aux in and then writing a macro to home it.

    Thanks for the link, I'll check and see what I can learn over there.

    www.harryhamilldesigns.com
    CAD sculpting and services


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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Need help with Gcode for homing

Need help with Gcode for homing