Page 1 of 2 12 LastLast
Results 1 to 12 of 17

Thread: A few questions on Machine behavior with Mach

  1. #1
    Registered
    Join Date
    Aug 2010
    Location
    USA
    Posts
    340
    Downloads
    0
    Uploads
    0

    A few questions on Machine behavior with Mach

    These are probably more Mach3 questions but I'll ask anyway, they could be machine related.

    Question 1:

    Why does the spindle speed change when the S is entered twice? For example, I have a program that repeats, but after the first run when it encounters the S900 for the 2nd time, the spindle slows down 20% to around 700. I duplicated this in the MDI. When I command an S900 M3 the spindle starts and reaches 900rpm, then if I command S900 again it slows to 700, and if I command S500 it slows to 300rpm. So to get it back to 900rpm I must command an S1075.

    Here is an example of the code I would like to use:

    G90
    M8
    S900 M3
    G0
    X0 Y0
    G1
    F12
    G91
    Z-.005
    G90
    X-15.4
    G91
    Z.005
    G90
    G0
    X0
    G91
    G1
    Z-.005
    G90
    M0
    G47

    Here is the code I must use to fix the spindle speed


    G90
    M8
    S900 M3
    S900
    S1075

    G0
    X0 Y0
    G1
    F12
    G91
    Z-.005
    G90
    X-15.4
    G91
    Z.005
    G90
    G0
    X0
    G91
    G1
    Z-.005
    G90
    M0
    G47


    Question 2:

    How much travel can you get if you turn off the limit switches, and how do you turn them off? I have a job that requires 9.7" in the Y and 21.3 in the X.


    Question 3:

    How do you use the M98/M99 in mach? I tried it and it just hangs and says something like processing toolpath...please wait.

    Example of code from above but using M98/M99 to try and bypass the double S900 lowering the spindle speed.

    G90
    M8
    S900 M3
    M98 P1
    O1

    G0
    X0 Y0
    G1
    F12
    G91
    Z-.005
    G90
    X-15.4
    G91
    Z.005
    G90
    G0
    X0
    G91
    G1
    Z-.005
    G90
    M0
    M99


    Question 4:

    In the above example say I wanted to have the program repeat to a certain Z depth such as facing a 2.433" block down to 2.250 in .005 increments and maybe a .0015 finish pass how would I write that code? I want to zero on the vice bed, put in my stock and lower the tool until it contacts the piece, then hit start on the program and come back when it is at Z2.250.

    Question 5:

    Why does the spindle take so long to spin up to speed it takes a full 8sec. Is it possible to speed this up?

    Question 6:

    I don't quite understand G54 work offsets but what does it mean when I close down Mach and it asks me if I want to fixture save?

    Question 7:

    If I have a long program but I only want to run from a specific point in the program like if all the previous machining has already been done and I don't want to wait a long time for it to cut air, what is the best way to do this? I've tried the run from here and it has ruined some parts and crashed tools. I have no idea what this feature is thinking when I've used it, I cut a spiral pocket once that took 10 min, then realized it was slightly undersized. I tried to simply re-cut the same geometry but start from further along in the program. Without doing anything else, it reapplied the x,y zero and attempted to cut a whole new circle somewhere else. I've also tried the set next line feature but can't figure that one either. I thought the run from here ran through the program up to that point to find out modal commands and position then move to the appropriate location based on its current position then begins the program from there. To me it appears it does all that then when it starts the program it just does whatever it wants. Could someone please explain how this is supposed to work?

    Thanks
    Last edited by SWATH; 03-11-2012 at 01:23 AM.


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    1) It shouldn't. I don't know anything about your machine or how the spindle is controlled, but it shouldn't be doing that.

    3) I think the M0 in your sub is causing Mach3 to hang. In General Config, check "Ignore M calls while loading"
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  3. #3
    Registered
    Join Date
    Aug 2010
    Location
    USA
    Posts
    340
    Downloads
    0
    Uploads
    0
    Thanks for the reply. I put the M0 there so program would pause without the spindle of coolant turning off. The hang I'm referring to is when first loading the gcode containing the M98. It does a quick read of the code but stops on M98 and says processing toolpath...please wait in a pop up text box.


  4. #4
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    I told you how to fix it.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #5
    Registered
    Join Date
    Aug 2010
    Location
    USA
    Posts
    340
    Downloads
    0
    Uploads
    0
    Respectfully, taking the M0 out doesn't change anything, it still hangs, and only when there is an M98 present. I am probably coding it wrong or something, I've never had to use it before but I suppose the real issue is the spindle speed change that is forcing me to come up with a more complicated work around. Hopefully when Allen gets his new spindle motor installed he can demonstrate that it doesn't do that so I know it's just another Mikini spindle issue.


  • #6
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by ger21 View Post
    1) In General Config, check "Ignore M calls while loading"
    .
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #7
    Registered
    Join Date
    Sep 2010
    Location
    Phoenix, AZ USA
    Posts
    202
    Downloads
    0
    Uploads
    0
    I don't know Mach 3 explicitly, but help a couple friends with Mach 3 machines. With subroutines, I have always written them outside the main program, say your "main" program O2000, then you might name the subs O2001, O2002 and so on.... I have several programs where the main program is like 30-40 lines long but I have 4 or 5 subroutines running under it.

    Doing it that way, you should be able to code pretty much anything you want in the subroutines. At least I would give that a try.

    I also would make some of your code into lines, instead of this:

    G90
    M8
    S900 M3
    M98 P1
    O1
    G0
    X0 Y0
    G1
    F12
    G91
    Z-.005
    G90
    X-15.4
    G91
    Z.005
    G90
    G0
    X0
    G91
    G1
    Z-.005
    G90
    M0
    M99

    More like this:

    O1
    G00 X0 Y0
    G91 G01 Z-.005 F12
    G90 X-15.4
    G91 Z.005
    G90 G0 X0
    G91 Z-.005
    G90
    M99

    I would put the M0 in the main instead of the sub. You will write the call in the main to loop it as many times as it takes to go from Z 2.433 down to Z 2.250, so the main call looks like:

    M98 P1 L36 (.180" of depth at .005 per pass is 36 passes, and you have maybe taken .003 not enough)

    I use G54 on my machine, but I'm not honestly sure how you implement it in Mach 3. On mine, I home the machine, that is machine 0,0,0, then you indicate in the corner of the part, center of the bore, whatever you want to be fixture or part 0,0, and then I hit G54 X and G54 Y and the machine remembers those positions as now being 0,0. I can re-home the machine, then go to MDI and put in G0X0Y0 and the machine goes to part home. This way I don't have to write down the values to part home, input them and shift over... it's just easier. Remember though, if you call up X12.0, depending upon where part 0,0 is, you might be outside of your mechanical work envelope.


  • #8
    Registered
    Join Date
    Aug 2010
    Location
    USA
    Posts
    340
    Downloads
    0
    Uploads
    0
    Thanks Brian and Gerry. I'll look into your suggestions. I was hoping there was a way to simply specify Z2.250 as the lowest Z and have it step down in .005 increments until it hit that level regardless of where the current Z is so I wouldn't have to calculate how many passes it would take to get there, taking up time and increasing the risk of a miscalc. and over/under shooting it.


  • #9
    Registered
    Join Date
    Sep 2010
    Location
    Phoenix, AZ USA
    Posts
    202
    Downloads
    0
    Uploads
    0
    We don't have that level of intelligent programing yet... shy of putting the part into a CAM system and let it write the number of passes, but it's still going to be based on parameters you have to input.


  • #10
    Registered
    Join Date
    Aug 2010
    Location
    USA
    Posts
    340
    Downloads
    0
    Uploads
    0
    With the "ignore M calls while loaded" checked it still hangs but I noticed a quick message flashes a couple of times in the status bar that reads:

    "Return called with no sub in effect...looping"

    Edit: just figure it out, must include a program stop
    Last edited by SWATH; 03-12-2012 at 12:13 PM.


  • #11
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    I don't use subs, but it sounds like it's not programmed right, and mach3 is stuck in the loop.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #12
    Registered
    Join Date
    Aug 2010
    Location
    USA
    Posts
    340
    Downloads
    0
    Uploads
    0
    I figured out it was looping because even though I specified O1 to run 5 times the M98 was getting called an infinite number of times with no program stop, so here is the revised code that appears to be working (at least in my simulation). I added an M30 to break the loop.

    G90
    M6 T2 G43 H2
    M8
    S900 M3
    G00 X0 Y0
    M98 P1 L5 (number of rough step down passes)
    M98 P2 L2 (number of finish passes)
    M30
    O1 (roughing step down subprogram)
    G00 X0 Y0
    G91 G01 F12 Z-.005 (step down increment)
    G90 X-.4
    G91 Z.005
    G90 G0 X0
    G91 Z-.005
    G90
    M99
    O2 (finishing subprogram)
    G00 X0 Y0
    G91 G01 F12 Z-.002 (finish pass increment)
    G90 x-.4
    G91 Z.005
    G90 G0 X0
    G91 Z-.005
    G90
    M99


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Strange behavior with VFD
      By BanduraMaker in forum Gecko Drives
      Replies: 3
      Last Post: 11-15-2011, 09:00 AM
    2. NM-200 - strange behavior?
      By kvom in forum Novakon Systems
      Replies: 1
      Last Post: 07-28-2011, 07:14 PM
    3. NM-200 - strange behavior?
      By kvom in forum Novakon Systems
      Replies: 3
      Last Post: 05-24-2011, 09:28 AM
    4. New Machine Build- Strange Behavior.
      By riveracnc in forum Mach Software (ArtSoft software)
      Replies: 2
      Last Post: 11-28-2008, 07:54 PM
    5. odd stepper behavior?
      By opusinwood in forum Stepper Motors and Drives
      Replies: 5
      Last Post: 07-05-2006, 08:30 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.