585,676 active members*
5,241 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2014
    Posts
    89

    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.

  2. #2
    Join Date
    Jun 2014
    Posts
    89

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

    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
    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)

  4. #4

    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

  5. #5
    Join Date
    Jun 2014
    Posts
    89

    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
    Join Date
    Apr 2006
    Posts
    512
    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.

Similar Threads

  1. references
    By albasha mohmed in forum FeatureCAM CAD/CAM
    Replies: 0
    Last Post: 07-03-2010, 11:47 PM
  2. Elementary help with equations
    By Sinistersam in forum Solidworks
    Replies: 7
    Last Post: 09-06-2008, 06:55 PM
  3. Milling Force Equations
    By cncbob in forum MetalWork Discussion
    Replies: 4
    Last Post: 10-16-2007, 06:31 PM
  4. Equations in assemblies
    By teebee in forum Solidworks
    Replies: 1
    Last Post: 07-25-2006, 06:02 AM
  5. Parametric equations
    By itsme in forum Uncategorised CAM Discussion
    Replies: 4
    Last Post: 06-16-2004, 09:34 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
  •