Need Help! 5 Axis Gcode Interpreter for Mach4


Results 1 to 9 of 9

Thread: 5 Axis Gcode Interpreter for Mach4

  1. #1
    Registered
    Join Date
    Jul 2015
    Posts
    57
    Downloads
    0
    Uploads
    0

    Lightbulb 5 Axis Gcode Interpreter for Mach4

    Hello All!

    I've set about writing a macro for Mach4 that will take 5 axis Gcode, interpret it and return Gcode that Mach4 can read. The intent is for there to be an M11 call on every line of the 5 axis Gcode program and the custom macro will translate the line that it's currently on, there's a number of advantages to this that I won't bore you with now.

    The problem is that I've recently learned that Mach has a 500ms delay before executing an M code. That means every 1mm or less my machine will pause and start as it delays for the M code, this is completely unacceptable. Will writing a plugin be a better solution? If so, where do I start with that? There's not much documentation that I can find, but there's obviously people writing them for their motion controllers, can anyone shed some light on how I'd get started writing a plug in?

    Just to make myself seem more credible - I've already written a complete working 5 axis Gcode interpreter and machine simulator in Blender (the 3D modelling program), but that's in Blender and written in Python. I just need to translate the logic to work with Mach4 (or Mach3 if absolutely necessary).

    ANY advise is appreciated.

    Similar Threads:


  2. #2
    Registered
    Join Date
    Jan 2014
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default Re: 5 Axis Gcode Interpreter for Mach4



  3. #3
    Registered
    Join Date
    Jul 2015
    Posts
    57
    Downloads
    0
    Uploads
    0

    Default Re: 5 Axis Gcode Interpreter for Mach4

    That's excellent. I've decided to write a Wizard for Mach4 that does exactly the same as that Mach3 plugin, but Mach3FiveAxis will certainly be a plan B. I'm still trying to wrap my head around whether Mach3FiveAxis will work with my rotating BC head configuration, I think it would work pretty much the same as far as maths and how it compensates for rotation.



  4. #4
    Registered
    Join Date
    Jan 2014
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default Re: 5 Axis Gcode Interpreter for Mach4

    Hi ChristianLL,
    I saw your 5 Axis CNC Plastic Cutting Router, great job
    If you want use it with my plugin, it is completely possible, i have just to add a additional configuration. The problem will be rather for the simulator, a new algorithm for the removal of material although the principle remains the same. I'll have a little cogitating
    Meanwhile i think you can test the plugin with your machine just inverting the X axis with the Y axis, and the Y axis with the X axis in your mach3 ports and pins configuration and activate the right direction for all your axis. Then you have to find her RTCP, probe the workpiece origin and test some moves with the command "SPS..", see the tutorial for that.
    I can't help you more because because i don't have B/C head machine, but i await your test.



  5. #5
    Registered
    Join Date
    Jul 2015
    Posts
    57
    Downloads
    0
    Uploads
    0

    Default

    I'll be sure to test it out and report back to you when I get the rotary head built and operational. Right now I've just got the bearings and harmonic drive units sitting around.



  6. #6
    Registered
    Join Date
    Jan 2014
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default Re: 5 Axis Gcode Interpreter for Mach4

    Hi ChristianLL,

    In fact, it was not so easy as that, but since the last time i worked on it and here is the first videos.
    a plugin for 5 axis B/C head doughty drive type:

    Manual mode:




  7. #7
    Registered
    Join Date
    Jan 2014
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default Re: 5 Axis Gcode Interpreter for Mach4

    Editor mode:


    thank you



  8. #8
    Registered
    Join Date
    Jul 2015
    Posts
    57
    Downloads
    0
    Uploads
    0

    Default Re: 5 Axis Gcode Interpreter for Mach4

    Sorry for the delayed reply, I wasn't aware you'd posted anything more.

    That looks really awesome! I love the possibility of having a 3D simulation on screen! I have designed my control panel to work with a portrait display orientation and an optimised Mach4 screen layout for touchscreen, so I'll be trying to stick with that if I can. I'm still working on my Gcode interpreter and Mach4 has a problem with the mc.mcCntlGetGcodeLine() function that I'm waiting for Artsoft to fix. I'm also not putting it in a wizard anymore, I'm going to make it a simple process of:

    > Import 5 axis Gcode with I, J, K vector values
    > Insert tool and set tool length
    > Click a button called "RTCP" on the Program Run screen to translate Gcode
    > Register part zero location
    > Click Cycle Start

    I like the this idea a lot because it's well integrated into Mach4 and it's easy. One click and the program is ready again. Even if you have to change tools mid-program, just click the RTCP button and it will adjust the tool length compensation for the entire program for the new tool.
    I would also like to continue with my original idea of having a custom macro that applies RTCP compensation for when I'm working in MDI mode.

    I would like to ask you one question - does Mach3FiveAxis have an unwind feature to stop the wires of the BC head getting twisted too far? I'm trying to figure out how to program it, I have an idea in mind, but it's proving to be difficult to implement.

    Thank you very much for your help.



  9. #9
    Member
    Join Date
    Jun 2006
    Location
    Slovenia
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default Re: 5 Axis Gcode Interpreter for Mach4

    Doesn't Mach4 have ability to use kinematics which takes care for TCP in real time (for 5axis)?

    I use Lcnc on my 5-axis (BC head) and everything is solved with kinematcs module, I don't have automatic tool changer, but I use tool length sensor, so every time I change tool, it automatically measure its length which is then compensated real time, big advantage as I can use multiple tools in same g-code!



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
  •  


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

5 Axis Gcode Interpreter for Mach4

5 Axis Gcode Interpreter for Mach4