587,196 active members*
2,987 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > G-Code Programing > A general G-Coding question in regards to a ballscrew
Results 1 to 18 of 18
  1. #1
    Join Date
    Mar 2017
    Posts
    116

    A general G-Coding question in regards to a ballscrew

    So I bought a cheapie ballscrew ; one axis.

    I G-Coded a simple program so that ball nut goes either direction for 10 seconds continuously.

    The reset point is to the far left.

    My question is; if a problem such as a jam occurs and the stepper motor loses it's positioning increment, how does one now caliberate the whole setup on a "reset" before a fresh "START"

    Because by pressing reset the ballnut will hit end stops due to the motor losing it's positioning during the jam.

    Is there a way to put limit switch at either end and a "homing sequence" taking place before the fresh "START"

  2. #2
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    You could jog to the start position, and zero the controller at that point. The other option would be to install a limit switch, as you suggested, and use a homing routine to rezero the machine.
    Jim Dawson
    Sandy, Oregon, USA

  3. #3
    Join Date
    Mar 2017
    Posts
    116

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by Jim Dawson View Post
    You could jog to the start position, and zero the controller at that point. The other option would be to install a limit switch, as you suggested, and use a homing routine to rezero the machine.
    1) the jog position wont work because the spindle of the stepper motor spun in the housing due to jam; so we cannot have members of staff moving physically moving parts to get them where they are supposed to be.

    2) can g-code do homing sequence with two limit switch at either side and reset itself?

  4. #4
    Join Date
    Jan 2008
    Posts
    1538

    Re: A general G-Coding question in regards to a ballscrew

    What controller?

    You need a controller.

    A controller interprets G Code and generates the steps or pulses for the motor(s).

    You need to go look at some basic guides on CNC.
    7xCNC.com - CNC info for the minilathe (7x10, 7x12, 7x14, 7x16)

  5. #5
    Join Date
    Mar 2017
    Posts
    116

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by pippin88 View Post
    What controller?

    You need a controller.

    A controller interprets G Code and generates the steps or pulses for the motor(s).

    You need to go look at some basic guides on CNC.
    pippi yes I have the grbl controller.

  6. #6
    Join Date
    Nov 2012
    Posts
    1270

    Re: A general G-Coding question in regards to a ballscrew

    There is one "hack" method to recalibrate a stepper motor without a homing switch. Run it all the way to the physical stop and let it skip steps.

    This method is used in places where a homing switch would be an overkill: car dashboard gauges, air conditioner deflectors...

  7. #7
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by damunk View Post
    1) the jog position wont work because the spindle of the stepper motor spun in the housing due to jam; so we cannot have members of staff moving physically moving parts to get them where they are supposed to be.
    I don't understand

    2) can g-code do homing sequence with two limit switch at either side and reset itself?
    A homing routine can be called from G-code. Normally the homing routine is a macro or function call in the controller.
    Jim Dawson
    Sandy, Oregon, USA

  8. #8
    Join Date
    Mar 2017
    Posts
    116
    Quote Originally Posted by Jim Dawson View Post
    I don't understand



    A homing routine can be called from G-code. Normally the homing routine is a macro or function call in the controller.

    Okay so I plan to have a limit switch on either side but I don’t want the limit switch to stop the motor. I would like the ball nut to reverse direction when it hits a limit switch after a 5 second delay.

    Is it possible to program this g-code using a standard grbll controller. ?

  9. #9
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    To start with I know nothing about a grbll controller, so not much help there. But what you describe does not seem like a good fit for G code at all. There are inexpensive stepper controllers available that I think would do what you want. An example: https://www.ebay.com/itm/11495128796...gAAOSwU-ZhJIon As I recall these do have limit switch inputs.

    I bought one of these and played with it a bit. Seemed to work OK. But I have heard stories that some of them were defective out of the box.
    Jim Dawson
    Sandy, Oregon, USA

  10. #10
    Join Date
    Mar 2017
    Posts
    116
    Quote Originally Posted by Jim Dawson View Post
    To start with I know nothing about a grbll controller, so not much help there. But what you describe does not seem like a good fit for G code at all. There are inexpensive stepper controllers available that I think would do what you want. An example: https://www.ebay.com/itm/11495128796...gAAOSwU-ZhJIon As I recall these do have limit switch inputs.




    I bought one of these and played with it a bit. Seemed to work OK. But I have heard stories that some of them were defective out of the box.
    Jim
    Those look a lot more user friendly than the gbrll controller which you need laptop trigged to it.

    So basically on the controller you shown for single axis when it hits limit switch it activates input? Which Would send ballnut in other direction . Then when it hits other limit switch it then also sends in opposite direction so basically I just want it going left to right all day long and that’s all I need APART from I want a time delay of my CHoosing. Do you reckon it will allow the time delay?

  11. #11
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    It looks like using the ''Limit A'' and ''Limit B'' functions will do exactly what you want. The time delay is a good question, and I'm not sure. The seller has a lot of information on the page, but I see no mention of any kind of delay timer. But the programming commands are not listed so there may be a timer hiding in there. Worst case a couple of external timer relays could be used.
    Jim Dawson
    Sandy, Oregon, USA

  12. #12
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    I had another thought, since your application is apparently industrial, maybe a more industrial controller would be helpful.

    https://www.ebay.com/itm/32505455297...oAAOSwJfdiDbto

    That particular one would do exactly what you want, including adjustable timers. It is a fully programmable industrial motion controller. Also has a built in stepper motor drive, so it will drive the motor directly up to 6 amps with 20 to 80 volt input.
    Jim Dawson
    Sandy, Oregon, USA

  13. #13
    Join Date
    Mar 2017
    Posts
    116

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by Jim Dawson View Post
    I had another thought, since your application is apparently industrial, maybe a more industrial controller would be helpful.

    https://www.ebay.com/itm/32505455297...oAAOSwJfdiDbto

    That particular one would do exactly what you want, including adjustable timers. It is a fully programmable industrial motion controller. Also has a built in stepper motor drive, so it will drive the motor directly up to 6 amps with 20 to 80 volt input.

    Would this one do itl its alot cheaper it says on it. time delay.
    what about those limit a and limit B input switching.

    https://www.ebay.com/itm/15470347287...8AAOSw--Bhk6u0

    EDIT: NAah; it doesnt even mention anything about limit switches.

  14. #14
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by damunk View Post
    Would this one do itl its alot cheaper it says on it. time delay.
    what about those limit a and limit B input switching.

    https://www.ebay.com/itm/15470347287...8AAOSw--Bhk6u0

    EDIT: NAah; it doesnt even mention anything about limit switches.

    Maybe that could be made to work with some external relay logic.
    Jim Dawson
    Sandy, Oregon, USA

  15. #15
    Join Date
    Jan 2005
    Posts
    15362

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by Jim Dawson View Post
    Maybe that could be made to work with some external relay logic.
    If he can't get grbl programed to do this, he is never going to get a Galil to work, he just needs someone to do a program for the grbl which can do this simple operation very easy
    Mactec54

  16. #16
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by mactec54 View Post
    If he can't get grbl programed to do this, he is never going to get a Galil to work, he just needs someone to do a program for the grbl which can do this simple operation very easy
    Perhaps you are correct. I know nothing about a grbl, but I could write the Galil program for him in about 10 minutes or less.
    Jim Dawson
    Sandy, Oregon, USA

  17. #17
    Join Date
    Mar 2017
    Posts
    116

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by Jim Dawson View Post
    Perhaps you are correct. I know nothing about a grbl, but I could write the Galil program for him in about 10 minutes or less.
    lol i managed to program g-code to make it go left to right and home, reset zero , time delay, that stuff is easy.

    and on the gbrl controller it allows connection to limit switches.

    i just wanted to know if you can program g-code to use limit switch as a input thats all.

    im having fun guys!!!! im learning g-code; ballscrew designs, welding, electronics.

    they say little knowledge is dangerous but i have little knowledge about everything so i must be the most dangerous man in the world so please be assured that I am being as safe as possible i can be.

  18. #18
    Join Date
    Dec 2013
    Posts
    5714

    Re: A general G-Coding question in regards to a ballscrew

    Quote Originally Posted by damunk View Post
    lol i managed to program g-code to make it go left to right and home, reset zero , time delay, that stuff is easy.

    and on the gbrl controller it allows connection to limit switches.

    i just wanted to know if you can program g-code to use limit switch as a input thats all.

    im having fun guys!!!! im learning g-code; ballscrew designs, welding, electronics.

    they say little knowledge is dangerous but i have little knowledge about everything so i must be the most dangerous man in the world so please be assured that I am being as safe as possible i can be.

    I'm not sure how to implement that in G code alone. Possibly using a M1 (optional stop) would work? I believe that function waits for a user (switch) input. There may be many other programming options available in a grbl system.
    Jim Dawson
    Sandy, Oregon, USA

Similar Threads

  1. General Question
    By moonman5 in forum Hardinge Lathes
    Replies: 0
    Last Post: 02-06-2020, 08:44 PM
  2. Coding Question: Adding Alarm to Redundant Tooling
    By thinkless in forum Bridgeport / Hardinge Mills
    Replies: 0
    Last Post: 11-12-2018, 10:21 PM
  3. coding Question
    By basselete in forum Mastercam
    Replies: 5
    Last Post: 12-07-2011, 07:32 PM
  4. general ballscrew diameter for benchtop mills
    By xovationx in forum Uncategorised MetalWorking Machines
    Replies: 2
    Last Post: 03-29-2006, 04:05 PM
  5. ballscrew repair and some general questions
    By jimbo in forum DIY CNC Router Table Machines
    Replies: 11
    Last Post: 09-27-2003, 09:48 PM

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
  •