586,067 active members*
4,903 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Mikinimech > A few questions on Machine behavior with Mach
Results 1 to 17 of 17
  1. #1
    Join Date
    Aug 2010
    Posts
    599

    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

  2. #2
    Join Date
    Mar 2003
    Posts
    35538
    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

    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)

  3. #3
    Join Date
    Aug 2010
    Posts
    599
    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
    Join Date
    Mar 2003
    Posts
    35538
    I told you how to fix it.
    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
    Aug 2010
    Posts
    599
    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. #6
    Join Date
    Mar 2003
    Posts
    35538
    Quote Originally Posted by ger21 View Post
    1) In General Config, check "Ignore M calls while loading"
    .
    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)

  7. #7
    Join Date
    Sep 2010
    Posts
    529
    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. #8
    Join Date
    Aug 2010
    Posts
    599
    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. #9
    Join Date
    Sep 2010
    Posts
    529
    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. #10
    Join Date
    Aug 2010
    Posts
    599
    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

  11. #11
    Join Date
    Mar 2003
    Posts
    35538
    I don't use subs, but it sounds like it's not programmed right, and mach3 is stuck in the loop.
    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)

  12. #12
    Join Date
    Aug 2010
    Posts
    599
    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

  13. #13
    Join Date
    Aug 2010
    Posts
    599
    Well it seems I've encountered yet another Mikini surprise (although it could be a Mach issue but I don't think so). Last night I was engraving some wood when suddenly the Z axis failed to retract out of one letter when moving to the next, so it buzzed a rapid line right though the wood. So I paused the program then tried to jog the Z up and the motor stalled then eventually moved. I didn't do at all during the majority of the cut (a little over an hour) or since, but it did ruin my part right at the end.

    I checked the code and there is nothing wrong with it, and I air cut that section again and it went fine. The today I was running the same part and after a loaded the program the Z plunged to about 4 inches above the part and started cutting air. I looked at the DRO and it correctly read Z-0.1 even though the tool was way above Z-0.1. At first I thought the Z somehow rezeroed itself but then after stopping the program I discovered that I couldn't jog the Z. The machine Z wouldn't move at all even though the DRO would move. The other axes jogged just fine though.

    I checked the connections in the Z driver and they're fine, the motor appears to be ok even though it's almost impossible to get to. I got no Z response for about 5min then suddenly it just started working again, and I finished the part (holding my breath).

    What could this be and how can I troubleshoot it? Oh the all the ways and bearings are well lubed, in fact there is way oil dripping out the underside of the Z column. I've since jogged all over and cannot reliably reproduce the problem. This could cause a catastrophic malfunction should it happen unattended in a cut.

  14. #14
    Join Date
    Jan 2006
    Posts
    58
    I'm going to guess it's your main board going out. Next time it happens, try switch stepper drivers via the cables and try to operate the Z with one of the other axis... play mix and match drivers/controllers. This will narrow down the problem.

    Mine did this now and then before multiple failures.

  15. #15
    Join Date
    Aug 2007
    Posts
    26
    Swath,

    Just to add a few more cents worth to some of your original questions.

    4. The built-in or separately purchased New Fangled Wizards give you options to set up multiple cuts to a given Z level. I have had mixed success though and have usually just programmed loops by hand. You can also use the Mach Learn function and then modify the resultant Gcode file. If you can do a bit of Basic programming (easy enough to modify examples from the Mach Suport forum) you can make your own macros and wizards without too much difficulty.

    7. I have had no success with "run from here" in Mach when using subroutines. Some settings seem to get lost when you try to re-start even if you try to start in the main program and get a whole subroutine to re-run. I now don't use subroutines (mainly because my backplotter won't read them) although it may be possible to get the settings for Mach3 right so that you can re-start one as you want. "run from here" works when there are no subroutines.

    Other: re odd Z positions and drifting. Other posters may be right and the problem may be your controller board but I have also had issues with Mach3 itself sending odd signals and sometimes the DRO drifting without sending any movement signal to the machine. Problems with parallel ports on laptops are documented and I seem not to have had problems as you describe once I got a "new" (old IBM desktop) machine, removed networking, power saving and other functions as Mach recommend and dedicating it to the milling machine. That said enough other people have had trouble with the mill controller and spindle boards to be suspicious of them.

  16. #16
    Quote Originally Posted by kenealym View Post
    7. I have had no success with "run from here" in Mach when using subroutines. Some settings seem to get lost when you try to re-start even if you try to start in the main program and get a whole subroutine to re-run. I now don't use subroutines (mainly because my backplotter won't read them) although it may be possible to get the settings for Mach3 right so that you can re-start one as you want. "run from here" works when there are no subroutines.
    I have been successfully running dozens of subroutines on my Tormach/Mach3 machine for a month now. My subroutines are all in separate text files in their own folder, and get called with a line like this:
    G52 X-5.2 Y-1.5
    M98 (para2\Backside - lock side - Spot.TAP)
    Notice I'm using G52 offsets, I've got a large pallet with lots of parts loaded, this lets me run the same code in lots of different locations (don't forget to cancel G52). Run From Here is great because it does an alright job of getting all the modal commands right, but it has to read through the entire code first and that can take a while on longer ones.

    Now I use Set Next Line for EVERYTHING. I just have to be darned sure that my tool number is correct (crunched a micro endmill and collet into the workpiece really hard today because of that mistake), then I scroll down to the G52 offset line of my main code and hit Set Next Line, then it starts the subroutine with the proper offset and all the new modal commands are within the subroutine file, so it works out great!

  17. #17
    Join Date
    Jun 2007
    Posts
    3757
    For set line, as a matter of safety, I always select a line AFTER a G0 Z up (to a safe height) move, and never get surprises doing 'run from here' since doing that.

    I gave up on subroutines, mostly, due to the difficulty with 'run from here', and loop counts.
    Quite often I will put a heap of sub calls in main, interspersed with M1's so that when I want to finish a cycle(subroutine) I hit M1, and it returns,when finished, to main.

    Mostly just copy and paste repeated blocks if I need to do partial runs.
    Saving memory is no longer an issue, as it once was with 16K of memory.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •