GCode tweak


Results 1 to 2 of 2

Thread: GCode tweak

  1. #1
    Activation process cncstudies's Avatar
    Join Date
    Dec 2018
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default GCode tweak

    Hello all
    I just designed my own steel rule bender. The x axis feeds the rule into the bender head. The Y axis bends the rule. The bending action is done via a planetary gearboxed large stepper motor. I convert the drawing which is DXF format into GCode. The X-axis is no problem. However I need the y axis to make a radial twist and then immediately come back to its 0 position. Thus for example, if I am bending a 50mm curve, the y motor must turn (do the twisting action) to a set degrees (degrees according to the GCode) for say 5 steps then return to its 0 position. In this manner, the Y axis will be "oscilating" once left and once right again. Then it waits for the X axis to forward the blade a little and the Y axis will again bend left and return to the 0. This will continue until the entire curve is bent.
    I have tried to slave the Y axis together with the X axis, thus when the command to the X axis is given, only the X Motor will turn. However, when the command to the Y axis is given, it will also turn the Xaxis. This is important as the curve need to be advanced for ever little bend.
    What I need is a command which will simply turn the Y-axis forward and backwards. For example,
    I send a GCODE to make a 50mm curve in 300 steps over 10 steps of the X Axis.
    So I use this command of
    Y+30
    Y-30
    X+10
    It seems to work a bit but on a rectangular it does not work
    Any help here would be appreciated.
    Secondly, when the Gcode encounters space between the line, it needs to delay and trigger the notcher relay mechanism. (I simply use the M7/M9 which is connected to the notcher mechanism) After the notch has been made, the GCode continues on it way.
    If my explanation is unclear, please contact me
    Kind Regards
    G Barnes



  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: GCode tweak

    From your description it would seem that you are doing it correctly: Feed X, move Y +/-, feed X...... rinse repeat.

    The cutting delay you want would best be done with a G4 Pnnnn, where n = delay in milliseconds

    So your G code would look something like this. The exact format would depend on your controller

    G91 (incremental positioning)
    G0 X10 (feed X)
    G0 Y30 (Y forward)
    G0 Y-30 (Y reverse)
    (repeat as needed)
    M7 (cut)
    G4 P500 (delay 0.5 second)
    M9 (retract)

    You would just need to adjust your X and Y feed parameters to get the desired outcome.

    Maybe taking a hard look at your mechanical design would be useful also.

    Here is a video of a rule bender that might give you some ideas.



    Last edited by Jim Dawson; 04-28-2021 at 01:58 PM.
    Jim Dawson
    Sandy, Oregon, USA


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

GCode tweak

GCode tweak