585,994 active members*
4,692 visitors online*
Register for free
Login
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Aug 2021
    Posts
    1

    MACH 4 G1 CMD DOES NOT WORK

    Hey Everyone,

    I have finished setting up my CNC replacing my Chinese cnc controller with an AXBB-E. Everything works I can stop/start spindle and control its speed. Jog the machine etc. However, I am having an issue with running g code. I can execute G0 commands but not G1 commands if I run G1 X10 Y10 Z0 F300 it does not do anything. I think this has something to do with the feed rate somehow. I have not encountered this issue before. I should mention I am using Mach 4. Any help would be much appreciated.

    Peter

  2. #2
    Join Date
    Feb 2010
    Posts
    17

    Re: MACH 4 G1 CMD DOES NOT WORK

    Did you solve this? I've just encountered the same issue. It will happily run a test square on G0, but will stop on any G1 line

  3. #3
    Join Date
    Nov 2013
    Posts
    4372

    Re: MACH 4 G1 CMD DOES NOT WORK

    Hi,
    I've been using Mach4 for seven years, if it could not do g1 moves it would be totally hopeless, its the MOST basic move there is.

    Post your code so we can see ir.

    Craig

  4. #4
    Join Date
    Feb 2010
    Posts
    17

    Re: MACH 4 G1 CMD DOES NOT WORK

    I know right? I'm very new to this and still in my builds commissioning stage, so I'm assuming I've cocked something up.
    example of my test file (50mm square) below:
    %
    ( File created using Intuwiz Software Service )
    ( https://www.intuwiz.com )
    ( More information: https://www.intuwiz.com/rectangle.html )
    ( File created: 2022-03-16 08:54:09 UTC )

    G00 X0 Y0 F70
    G01 Z-1 F50
    G01 X0 Y50 F50
    G01 X50 Y50
    G01 X50 Y0
    G01 X0 Y0
    G00 Z0 F100
    M30
    %

    Changing the G1 to G0 works fine.
    I tried a simple move in MDI with same results.
    'G1 X50 F100' nothing
    'G0 X50' works fine

    The log for that is
    2022-03-16 21:39:08.201 - Logging Enabled.
    2022-03-16 21:39:10.821 - API: mcCntlCycleStart(inst = 0) (unknown caller)
    2022-03-16 21:39:10.942 - Attempt transition from "Idle" on event "Cycle Start" machapi.cpp:3085
    2022-03-16 21:39:10.943 - Transition from "Idle" on event "Cycle Start" was rejected by a guard function! machapi.cpp:3085

    As per the OP I'm think its a feedrate issue.

  5. #5
    Join Date
    Jan 2005
    Posts
    15362

    Re: MACH 4 G1 CMD DOES NOT WORK

    Quote Originally Posted by 76special View Post
    I know right? I'm very new to this and still in my builds commissioning stage, so I'm assuming I've cocked something up.
    example of my test file (50mm square) below:
    %
    ( File created using Intuwiz Software Service )
    ( https://www.intuwiz.com )
    ( More information: https://www.intuwiz.com/rectangle.html )
    ( File created: 2022-03-16 08:54:09 UTC )

    G00 X0 Y0 F70
    G01 Z-1 F50
    G01 X0 Y50 F50
    G01 X50 Y50
    G01 X50 Y0
    G01 X0 Y0
    G00 Z0 F100
    M30
    %

    Changing the G1 to G0 works fine.
    I tried a simple move in MDI with same results.
    'G1 X50 F100' nothing
    'G0 X50' works fine

    The log for that is
    2022-03-16 21:39:08.201 - Logging Enabled.
    2022-03-16 21:39:10.821 - API: mcCntlCycleStart(inst = 0) (unknown caller)
    2022-03-16 21:39:10.942 - Attempt transition from "Idle" on event "Cycle Start" machapi.cpp:3085
    2022-03-16 21:39:10.943 - Transition from "Idle" on event "Cycle Start" was rejected by a guard function! machapi.cpp:3085

    As per the OP I'm think its a feedrate issue.
    What do you have above the posted code

    Try a period after the F70. F50.

    You don't use a Feed rate with a G0 move
    Mactec54

  6. #6
    Join Date
    Nov 2013
    Posts
    4372

    Re: MACH 4 G1 CMD DOES NOT WORK

    Hi,
    Machs Gcode interpreter parses all Gcode to reduce to lowercase ALL letters, strips out leading zeros and strips out whitespace.
    Mostly any code presented to Mach will be interpreted correctly, but I wounder if that is the case here.

    For instance G01 X0 Y50 gets interpreted as g1x0y50. May I suggest try re-writing the code to see if it makes any difference.

    The second question I have is this in metric units or inch units? Adding a g20 or g21 at the start of the code would be a good idea.
    Are the native units of the machine different to the units of the Gcode? It shouldn't make any difference when you use g20 or g21 but it may
    help eliminate a problem.

    This is a snippet of code that I ran this morning (using Mach4), so I know it works:

    Code:
    (BOSS)
    (T2  D=1.5 CR=0. - ZMIN=-1. - FLAT END MILL)
    G90 G94 G91.1 G40 G49 G17
    G21
    
    (2D CONTOUR1)
    M5
    T2 M6
    S24000 M3
    G4 P6.00
    G54
    M8
    G0 X-0.081 Y-2.148
    G43 Z15. H2
    Z5.
    G1 Z2.5 F200.
    G2 X-2.148 Y0.081 Z2.382 R2.15 F400.
    X0. Y2.15 Z2.267 R2.15
    G1 X1. Z2.232
    G2 X3.15 Y0. Z2.114 R2.15
    X1. Y-2.15 Z1.996 R2.15
    G1 X0. Z1.961
    G2 X-2.15 Y0. Z1.843 R2.15
    X0. Y2.15 Z1.725 R2.15
    G1 X1. Z1.69
    G2 X3.15 Y0. Z1.573 R2.15
    X1. Y-2.15 Z1.455 R2.15
    G1 X0. Z1.42
    G2 X-2.15 Y0. Z1.302 R2.15
    X0. Y2.15 Z1.184 R2.15
    G1 X1. Z1.149
    G2 X3.15 Y0. Z1.031 R2.15
    Craig

  7. #7
    Join Date
    Feb 2010
    Posts
    17

    Re: MACH 4 G1 CMD DOES NOT WORK

    Solved it!
    Joe - I was looking at your 3rd line in the above code, the 'safe start line', and noticed it was different to the basic one I'd used (straight from themach4 manual).
    I looked up the extra codes and saw G94 'Feed per Minute which looked promising.
    Adding that did the trick. The problem & solution are repeatable, so I'm all sorted.
    Thanks everyone

  8. #8
    Join Date
    Jan 2005
    Posts
    15362

    Re: MACH 4 G1 CMD DOES NOT WORK

    Quote Originally Posted by 76special View Post
    Solved it!
    Joe - I was looking at your 3rd line in the above code, the 'safe start line', and noticed it was different to the basic one I'd used (straight from themach4 manual).
    I looked up the extra codes and saw G94 'Feed per Minute which looked promising.
    Adding that did the trick. The problem & solution are repeatable, so I'm all sorted.
    Thanks everyone
    You should not need a G94 to make it work, his code also has the dot at the end the F--- . line also which should make your one work, without the G94 which is not normally used in normal programing
    Mactec54

  9. #9
    Join Date
    Jan 2018
    Posts
    1516

    Re: MACH 4 G1 CMD DOES NOT WORK

    Quote Originally Posted by mactec54 View Post
    What do you have above the posted code
    Try a period after the F70. F50.
    You don't use a Feed rate with a G0 move
    Now that is a good point.
    Been looking through some of my codes and all F have a period.

    Occasionally do on the axis values too. As if the axis in question is told to stay in place for a few lines while the other axis move.

  10. #10
    Join Date
    Jan 2018
    Posts
    1516

    Re: MACH 4 G1 CMD DOES NOT WORK

    Maybe something in the post script saying to ignore F commands?.
    Just fishing.

  11. #11

    Re: MACH 4 G1 CMD DOES NOT WORK

    g94 should be default upon start up . I don't know about mach 4 but a lot of controls will read f50 (without decimal) as f.0005

  12. #12
    Join Date
    Nov 2013
    Posts
    4372

    Re: MACH 4 G1 CMD DOES NOT WORK

    Hi,
    the period at the end of the F command is a red herring. I have code produced by CAM that sometimes produces a period at the end, and sometimes not.
    Any handwritten code certainly does not have a period at the end and yet all code works with or without the period. This works for Mach4, whether it applies to
    other CNC software is more than I can say.

    G94/G95 is modal. To my knowledge G95, Feed per Revolution, is only ever used in lathe operations, so unless you have a lathe profile I would not expect that Mach would ever end up
    in G95 mode. Your machine has however. You could put a G94 in the 'Initialization Codes' of the Configure/Control/Defaults tab, thus you could be assured that at each
    start-up Mach is in Feed per Minute mode..

    I don't know what screenset you are using but the screenshot attached is of wx6 one of the standard screesets supplied by NFS with every Mach4 build. Note that in the middle
    of the string there is a G94.

    Craig

  13. #13

    Re: MACH 4 G1 CMD DOES NOT WORK

    Quote Originally Posted by joeavaerage View Post
    Hi,


    G94/G95 is modal. To my knowledge G95, Feed per Revolution, is only ever used in lathe operations,

    Craig
    feed per rev is also used in many mill tapping cycles , depending on the control . I doubt g94 needs to be added to the initial start up codes for a milling profile . Mach 3 starts up with that along with a number of other codes and I'd assume mach 4 would as well .
    turning should should start up with g95 but it appears mach 3 turn defaults to g94 .

  14. #14
    Join Date
    Nov 2013
    Posts
    4372

    Re: MACH 4 G1 CMD DOES NOT WORK

    Hi,

    feed per rev is also used in many mill tapping cycles , depending on the control . I doubt g94 needs to be added to the initial start up codes for a milling profile
    Yes, I can see that feed per rev would be extremely useful for tapping. I've used Mach3 for several years and Mach4 for a further seven years and in that time I've never had Mach start
    in G95 mode. Then again the screenset I use specifically codes a G94 so I have never had to use an initialization code.

    Craig

  15. #15

    Re: MACH 4 G1 CMD DOES NOT WORK

    thats my point , g94 shouldn't need to be added , it is there by default .
    with mach turn it should default to g95 but it doesn't

  16. #16
    Join Date
    Nov 2013
    Posts
    4372

    Re: MACH 4 G1 CMD DOES NOT WORK

    Hi,
    which is why I asked OP what screenset he is using, if he has made his own then quite possibly a g94 is not included when it should be.

    Craig

  17. #17
    Join Date
    Feb 2010
    Posts
    17

    Re: MACH 4 G1 CMD DOES NOT WORK

    I used a copy of the wx4 screenset and the G94 wasn't in the initialization Codes. I've added it, and it works fine now without needing to included it in the gcode itself.

    The controller I'm using is a wiXhc and it originally didn't want to play nice with the GUI version of Mach4 (wxMach.exe only).
    It took a bit of fiddling in notepad to get it working properly and figured I'd just butchered something in the process (I'm building an ESS/HG08 in parallel as a long term replacement)

    Thanks again for the help, its making the learning curve a lot easier

  18. #18
    Join Date
    Nov 2013
    Posts
    4372

    Re: MACH 4 G1 CMD DOES NOT WORK

    Hi,
    you are the only person I've ever heard of who has stuck with that XHC controller. You need to ditch it and get a controller which supports MachGUI,
    you're only getting a fraction of what Mach4 has to offer with wxMach.

    Craig

  19. #19
    Join Date
    Feb 2010
    Posts
    17

    Re: MACH 4 G1 CMD DOES NOT WORK

    Yeah I hear they don't have good rep, but it works fine under MachGUI since I fixed the config files, plus, its got loads of IO's.
    I've do have a half-built ESS/HG08 as a backup.
    Cheers,
    Roly

Similar Threads

  1. API CMD-50 DRIVE
    By joelm182 in forum Servo Motors / Drives
    Replies: 0
    Last Post: 05-06-2011, 11:23 PM
  2. Availability pams.cmd or ptams.cmd
    By LTWamp in forum EdgeCam
    Replies: 1
    Last Post: 01-16-2008, 06:53 AM
  3. Anyone using CMD-260 Drives?
    By grumpydba in forum CNC Machine Related Electronics
    Replies: 0
    Last Post: 07-12-2007, 06:47 PM
  4. will mach 2 or mach 3 work for 4 axis cnc?
    By Runner4404spd in forum Mach Mill
    Replies: 3
    Last Post: 10-05-2005, 05:44 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
  •