Problem References, equations, and formulas


Results 1 to 6 of 6

Thread: References, equations, and formulas

  1. #1
    Member
    Join Date
    Jun 2014
    Posts
    89
    Downloads
    0
    Uploads
    0

    Question References, equations, and formulas

    G'day everyone. I'm a cnc programmer by day and now I've finally bought my own little hobby cnc. I got a x61500gt and its using mach3 to run it.

    at work I use masterwood project 317 and 327 (yep their old). But I've become pretty bloody good at running them. Everything I do I code by hand and I've been able to do some pretty detailed work with them.
    anyways. Here's my drama.

    the masterwood program uses a different code than what I'm now led to believe is standard gcode. But it's relatively the same. Ie: g1 = g101
    and in my programs I'm able to write equations with I can refer to to write the program. But now with Mach3 it seems I can't do this. Can anyone tell me if it's possible to write a similar way I'm used to or if I'm gonna have to re learn everything and write things the hard way.

    heres an example.

    when using MW, I can input the size of the job and then write the code. Something like this.

    #1=100
    #2=300
    #3=16
    #4=#1/2
    #5=#2/3
    #6=300
    G172 X0 Y0 Z0
    G101 X=#1 Y=#2 Z=#3 F5
    G102 X=#4 Y=#5 R=#6

    so this basically go from zero point to 100mm on x, 300mm on y, 16mm on z,,, then from there to
    50mm on x (ie half of 100), 100mm on y (ie 1 third of 300), with a clockwise arc with radius 300mm.

    to do the same with gcode (from what i gather... Please help) it requires I go.

    G17
    G0 X0 Y0 Z0
    G1 X100 Y300 Z16 F5
    G2 X50 Y100 R300

    now this is real basic I know but by using reference parameters (#1=100) I can easily alter the parameter at the top of the code to adjust the whole code below. This is also used when calculating trig and radius so that everything is mathematically precise.

    Is is there anyways I can do this with gcode on Mach3 or am I out of luck. If you need more in depth info please say and I'll try respond with more for you to go off.


    anyhelp is greatly appriciated.

    Similar Threads:


  2. #2
    Member
    Join Date
    Jun 2014
    Posts
    89
    Downloads
    0
    Uploads
    0

    Default Re: References, equations, and formulas

    Parametric programs... That's the word. How can I writer parametric programs for mach3? Or in standard g code



  3. #3
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: References, equations, and formulas

    Is is there anyways I can do this with gcode on Mach3 or am I out of luck.
    Yes, you can do that in mach3. Read the g-code section of the Mach3 manual. The Syntax might be slightly different, but I'm not sure, as I've never used it.

    I used to program and run a 327 for about 10 years.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  4. #4
    Registered Mhoppe's Avatar
    Join Date
    Oct 2014
    Location
    USA
    Posts
    35
    Downloads
    0
    Uploads
    0

    Default Re: References, equations, and formulas

    I know this isn't an answer to your question but worst case, you could write your parametric programs in VBA and have it spit out your code that way. I program in Macro B (which is the language you are referencing), I am not sure if Mach3 supports that natively but apparently Mach4 does according to this post: https://groups.yahoo.com/neo/groups/...essages/144464

    144464Mach4 does macroB and conditional
    Expand Messages
    vmax549May 1 7:13 AM

    Jumping Jimminy Crickets Mach4 can do Fanuc MacroB type macros AND conditional Gcode. There are few minor differences from MacroB and some Macro will not convert directly.

    BUT IT WORKS

    Never thought I would NEVER see it. That is the good news the bad news is it MAY only be available in the industrial version so it is OUT of my budget.

    Great Job Guys, (;-) TP
    http://www.cnczone.com/forums/mach-w...ng-systax.html


    Another thing you can do is write all of your programs in NCPLOT then hit the expand button. This will convert the parametric program directly into long hand G-Code in addition to backplotting the resulting toolpath to ensure it is doing what you want.
    NCPlot.com - Tools for CNC Programmers

    Last edited by Mhoppe; 05-01-2015 at 01:16 PM.


  5. #5
    Member
    Join Date
    Jun 2014
    Posts
    89
    Downloads
    0
    Uploads
    0

    Default Re: References, equations, and formulas

    ah excellent, got it. so annoying though now i have to go

    #101=[1+2]
    etc.

    and not use = signs on
    g1 x#101 y0 z0


    but now argue. the annoying part... Ive been using NC plot to write my codes. NC plot is good, and i do like it, except it fails to show tool compensation. any recommendations for something better?
    and mach 3 can't seem to understand conditional looping. WHILE END. this is very annoying, because almost all my codes use it. anyone use mach3 and know how to make it happen.

    I'm currently looking into EMC and using linex.... never done it before but ill give it a go. has anyone used EMC and a x61500gt usb?



  6. #6
    Member bigz1's Avatar
    Join Date
    Apr 2006
    Location
    NZ
    Posts
    512
    Downloads
    0
    Uploads
    0

    Default

    Sorry to bring back this thread but I am trying find out how to do variable looping and operators/ functions(i.e.. rounding numbers to a whole, square root, sine, cosine etc) on the Masterwood any help would be much appreciated.



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

References, equations, and formulas

References, equations, and formulas