585,749 active members*
3,618 visitors online*
Register for free
Login
Page 1 of 3 123
Results 1 to 20 of 46
  1. #1
    Join Date
    Dec 2004
    Posts
    95

    Odd G01 behavior in Mach3?

    G-Code newbie here....

    With 20000 steps per inch, velocity set to 300IPM and acceleration set to 20in's/sec/sec, is there a reason why these two routines should behave differently;

    ; Routine 1
    G00 X0
    M98 P1 L1
    M30
    O1
    G00 X-9.00
    G00 X0
    M99

    ;Routine 2
    G01 X0 F300
    M98 P1 L1
    M30
    O1
    G01 X-9.00
    G01 X0
    M99

    Routine 2 behaves as if there is no deceleration at the end of the G01 X-9.00 move and hence the servo drive faults. No problem with the G00 routine 1. Shouldn't G01 moves be following the same movement profile as the G00 moves in this case?

  2. #2
    Join Date
    Jan 2005
    Posts
    15362

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by eldata View Post
    G-Code newbie here....

    With 20000 steps per inch, velocity set to 300IPM and acceleration set to 20in's/sec/sec, is there a reason why these two routines should behave differently;

    ; Routine 1
    G00 X0
    M98 P1 L1
    M30
    O1
    G00 X-9.00
    G00 X0
    M99

    ;Routine 2
    G01 X0 F300
    M98 P1 L1
    M30
    O1
    G01 X-9.00
    G01 X0
    M99

    Routine 2 behaves as if there is no deceleration at the end of the G01 X-9.00 move and hence the servo drive faults. No problem with the G00 routine 1. Shouldn't G01 moves be following the same movement profile as the G00 moves in this case?

    You really think your motor can move your machine 20 inches in 1 second, this is why you are getting a drive fault, this is set to high

    Why are you using sub programs for just moving to a position
    Mactec54

  3. #3
    Join Date
    Dec 2004
    Posts
    95

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by mactec54 View Post
    You really think your motor can move your machine 20 inches in 1 second, this is why you are getting a drive fault, this is set to high

    Why are you using sub programs for just moving to a position
    You really think your motor can move your machine 20 inches in 1 second
    This is a myopic concept of speed, velocity and acceleration. It would be similar to saying that Venus Williams cannot serve a tennis ball at 120MPH since it would never travel 120 miles in an hour.

    A velocity greater than 1200IPM would be required in order for my machine to move 20 inches in 1 second but that does not mean the motors cannot achieve an acceleration of 20in's/sec/sec. It just means that it will reach maximum velocity of 300IPM in around .3 seconds.

    this is why you are getting a drive fault, this is set to high
    Nope! You're not making sense since there is no faulting using G00 moves instead of G01 moves. All indications are that linear interpolation is not using the same movement profile as G00 rapid movement. Perhaps the direction change has something to do with it.

    Why are you using sub programs for just moving to a position
    Go figure...I'm supposed to be the loopy G-Code newbie tuning a servo setup.

  4. #4
    Join Date
    Mar 2003
    Posts
    35538

    Re: Odd G01 behavior in Mach3?

    It may be a Mach3 bug in it's trajectory planner?
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  5. #5
    Join Date
    Dec 2004
    Posts
    95

    Re: Odd G01 behavior in Mach3?

    Probably. Here's the best workaround I was able to come up with;

    G01 X0 F300
    M98 P1 L5
    M30
    O1
    G01 X-9.00
    G00 X-9.00 ;no physical move
    G01 X0
    G00 X0 ;no physical move
    M99

    The above now behaves exactly like G00 moves at whatever feed rate chosen in the first line.

  6. #6
    Join Date
    Jan 2005
    Posts
    15362

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by eldata View Post
    Routine 2 behaves as if there is no deceleration at the end of the G01 X-9.00 move and hence the servo drive faults..
    That's because your machine is trying to reach a speed it can not achieve

    You are not dealing with a tennis ball, your concept is completely wrong

    You seem to have all the answers, to your problems, not sure why you posted
    Mactec54

  7. #7
    Join Date
    Jan 2005
    Posts
    1943

    Re: Odd G01 behavior in Mach3?

    I agree with the OP. Both code snippets should have the same speed profile since the max axis speed is 300 IPM and the programmed G1 speed is also 300 IPM. Since it only misses steps when using G1F300 then there is something not right in the planner. The acceleration/deceleration should be applied to either G1 or G0 moves the same. Another reason I don't use Mach3.

    Incidentally 20 in/sec^2 is not an extreme acceleration. This value just represents the slope of the acceleration/deceleration portion of the motion profile. My machine uses the same 20 in/sec^2 acceleration value with a top speed tested to 250 IPM but set conservatively at 200 IPM. My machine runs just fine with those settings in LinuxCNC.

    At 20 in/sec^2 and 300 IPM (5 in/sec) top speed, the machine should be able to accel from stop to full speed in 0.25 seconds and 0.0625 inches. So, the 1/16" at each end of the motion profile should be an accel or decel respectively.

  8. #8
    Join Date
    Jan 2005
    Posts
    15362

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by 109jb View Post
    I agree with the OP. Both code snippets should have the same speed profile since the max axis speed is 300 IPM and the programmed G1 speed is also 300 IPM. Since it only misses steps when using G1F300 then there is something not right in the planner. The acceleration/deceleration should be applied to either G1 or G0 moves the same. Another reason I don't use Mach3.

    Incidentally 20 in/sec^2 is not an extreme acceleration. This value just represents the slope of the acceleration/deceleration portion of the motion profile. My machine uses the same 20 in/sec^2 acceleration value with a top speed tested to 250 IPM but set conservatively at 200 IPM. My machine runs just fine with those settings in LinuxCNC.

    At 20 in/sec^2 and 300 IPM (5 in/sec) top speed, the machine should be able to accel from stop to full speed in 0.25 seconds and 0.0625 inches. So, the 1/16" at each end of the motion profile should be an accel or decel respectively.

    Correct the problem is that the servo he has can not decelerate, before it is out of position, then the drive will fault out,

    20in/sec, is quite lame for a good servo system, I have some doing 2G
    Mactec54

  9. #9
    Join Date
    Mar 2003
    Posts
    35538

    Re: Odd G01 behavior in Mach3?

    Correct the problem is that the servo he has can not decelerate, before it is out of position
    Because Mach3 is sending improper steps.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  10. #10
    Join Date
    Jan 2005
    Posts
    1943

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by mactec54 View Post
    Correct the problem is that the servo he has can not decelerate, before it is out of position, then the drive will fault out,

    20in/sec, is quite lame for a good servo system, I have some doing 2G
    The servo he has CAN decelerate. It does just fine if using G0, just not when using G1. This is indicative that the planner is screwing up, not the drive.

    Sent from my Z958 using Tapatalk

  11. #11
    Join Date
    Jan 2005
    Posts
    15362

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by 109jb View Post
    The servo he has CAN decelerate. It does just fine if using G0, just not when using G1. This is indicative that the planner is screwing up, not the drive.

    Sent from my Z958 using Tapatalk
    I know what you are saying, from his first post he said it worked ok with G0, (max Rapid )

    There are many using Mach3 at much faster speeds than that and don't have a problem, 1000IPM Plus rapids is not uncommon with Mach3, I have run it over 400IPM with G1 G2 G3 with no problems
    Mactec54

  12. #12
    Join Date
    Mar 2003
    Posts
    35538

    Re: Odd G01 behavior in Mach3?

    There are many using Mach3 at much faster speeds than that and don't have a problem,
    And there are many that have similar problems at much lower speeds.
    It's well known that Mach3 has serious bugs in it's trajectory planner. It's just that most people don't run into them.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  13. #13
    Join Date
    Dec 2004
    Posts
    95

    Re: Odd G01 behavior in Mach3?

    If I make a YT video out of this, are there any "legal" issues in referencing this thread?

  14. #14
    Join Date
    Dec 2004
    Posts
    95

    Re: Odd G01 behavior in Mach3?

    I dual boot Windows 7 (Mach3 installed) and Debian Linux (LinuxCNC installed) on the same machine from separate drives.

    Here are Z axis configuration screen shots for both programs;

    Attachment 359094

    Attachment 359096

    The only real difference between the two is the step rate (due to encoder 2X decoding in the case of LinuxCNC) but the maximum velocity is the same 300IPM in both cases. Since LinuxCNC does not support M98/M99 commands, the looping capability was removed and the following was executed;

    G1 Z0 F300
    G1 Z-9
    G1 Z0
    M30

    LinuxCNC ran this without a hitch but, as expected, Mach3 caused the drive to fault at the same place as before. Conclusion...Mach3 has an issue with the G1 command under certain conditions.


    Edit:
    2X decoding was also tried with Mach3, for a 50KHz step rate at 300IPM , making it more of an "apples to apples" comparison. Drive still faulted at the same place even when using a 60KHz kernel speed. This eliminates high kernel speed or step rate being the culprit.

  15. #15
    Join Date
    Jan 2005
    Posts
    15362

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by eldata View Post
    I dual boot Windows 7 (Mach3 installed) and Debian Linux (LinuxCNC installed) on the same machine from separate drives.

    Here are Z axis configuration screen shots for both programs;

    Attachment 359094

    Attachment 359096

    The only real difference between the two is the step rate (due to encoder 2X decoding in the case of LinuxCNC) but the maximum velocity is the same 300IPM in both cases. Since LinuxCNC does not support M98/M99 commands, the looping capability was removed and the following was executed;

    G1 Z0 F300
    G1 Z-9
    G1 Z0
    M30

    LinuxCNC ran this without a hitch but, as expected, Mach3 caused the drive to fault at the same place as before. Conclusion...Mach3 has an issue with the G1 command under certain conditions.


    Edit:
    2X decoding was also tried with Mach3, for a 50KHz step rate at 300IPM , making it more of an "apples to apples" comparison. Drive still faulted at the same place even when using a 60KHz kernel speed. This eliminates high kernel speed or step rate being the culprit.
    Then you solved your problem run LinuxCNC for your control, it's a good control

    You can't compare the 2 because of the Step rates being so different

    Do you have a payed for version of Mach 3 ( With License Installed ) if not this could explain why you having this problem, I use Mach3 with the UC100 and don't have these problems, 300IPM is not fast at all Here is a machine that is doing a test cut at 500IPM, this is using Mach3 it has a rapid of 2500IPM

    https://www.youtube.com/watch?v=fr01Sm3BVgU
    Mactec54

  16. #16
    Join Date
    Dec 2004
    Posts
    95

    Re: Odd G01 behavior in Mach3?

    Then you solved your problem run LinuxCNC for your control, it's a good control
    Post #5 in this thread indicated that my problem was solved days ago.

    You can't compare the 2 because of the Step rates being so different
    You even quoted the edit in my post that addressed this.

    Do you have a payed for version of Mach 3 ( With License Installed ) if not this could explain why you having this problem, I use Mach3 with the UC100 and don't have these problems, 300IPM is not fast at all Here is a machine that is doing a test cut at 500IPM, this is using Mach3 it has a rapid of 2500IPM
    Even so, Demo Mode would qualify as a certain condition under which the G1 command has an issue. OTOH, cutting circles, even at a gazillion IPM, would not.

    You're so hell bent on detraction that your posts have become nonsensical.

  17. #17
    Join Date
    Jan 2005
    Posts
    15362

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by eldata View Post
    Post #5 in this thread indicated that my problem was solved days ago.



    You even quoted the edit in my post that addressed this.


    Even so, Demo Mode would qualify as a certain condition under which the G1 command has an issue. OTOH, cutting circles, even at a gazillion IPM, would not.

    You're so hell bent on detraction that your posts have become nonsensical.

    It would be embarrassing if I showed you it using G1, 300IPM is nothing what this machine can do, Posting the video was to show you that Mach3 does not have a problem at 300IPM and way above that, there can be some problems at speed when doing 3D, but there are work arounds for that as well, but no problem with G0 G1 G2 G3 normal moves

    Not having a licensed Mach3 Demo Mode could easily be the problem, a lot of functions in Mach3 do not work correctly in Demo Mode

    Try it at much slower feed rates in Demo Mode and it will work as it should
    Mactec54

  18. #18
    Join Date
    Jun 2015
    Posts
    943

    Re: Odd G01 behavior in Mach3?

    Even so, Demo Mode would qualify as a certain condition under which the G1 command has an issue. OTOH, cutting circles, even at a gazillion IPM, would not.

    You're so hell bent on detraction that your posts have become nonsensical.
    This no or very sharp deccelerations is a known mach3 bug and it was one reason why I migrated to UCCNC software.
    I had a purchased Mach3 license key and the same happened what you described here, not only in demo mode.
    With my plasma machine this was a serious problem as it shaked my machine badly.

  19. #19
    Join Date
    Dec 2004
    Posts
    95

    Re: Odd G01 behavior in Mach3?

    Quote Originally Posted by OlfCNC View Post
    This no or very sharp deccelerations is a known mach3 bug and it was one reason why I migrated to UCCNC software.
    I had a purchased Mach3 license key and the same happened what you described here, not only in demo mode.
    With my plasma machine this was a serious problem as it shaked my machine badly.
    What you said makes sense...If I reduced acceleration (and hence deceleration) from 20in's/sec/sec to 10in's/sec/sec the issue would go away with the same 300IPM feed rate. Feed rate was never the issue, it was deceleration all along. But I chose to keep that to myself until now. The fact that Mach3 G00 moves have no issues with 20in's/sec/sec, LinuxCNC G01 moves have no issues under the same conditions, and placing G00 "placebo" instructions immediately after Mach3 G01 move instructions have no issues, suggests there can be issues with the Mach3 G01 command when relatively high deceleration is involved. I was never going to spend $175.00 just to find out whether Licensed Mode had issues or not, so thank you for your contribution to this thread.

  20. #20
    Join Date
    Jan 2005
    Posts
    1943

    Re: Odd G01 behavior in Mach3?

    20 in/sec^2 is not what I would call "high acceleration" by any means. Also, since your last post reveals that you are using the demo version of Mach, the manufacturer documentation says the demo is limited to 25kHz. 25 kHz and 20,000 steps/in would only be 75 IPM. are you using external step generation or parallel port?

Page 1 of 3 123

Similar Threads

  1. Unexpected behavior from Mach3
    By kievari in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 11-21-2013, 03:26 PM
  2. M30 Behavior
    By SCzEngrgGroup in forum Dynomotion/Kflop/Kanalog
    Replies: 17
    Last Post: 11-10-2013, 04:03 AM
  3. Controller behavior
    By Mr_C in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 12-28-2012, 06:40 PM
  4. Mach3,home sw. Erratic Behavior
    By rcpilot82 in forum Machines running Mach Software
    Replies: 68
    Last Post: 01-31-2009, 06:08 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
  •