587,202 active members*
2,833 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Posts
    590

    Mach won't load this parametric g-code

    Mach3 won't load this parametric code. Is it a syntax error or just not within Mach's capabilities? It's hanging on line 4 not liking the word 'If'.

    Thanks.

    Chris

    O001
    N1#123=0
    N2#100=[5/.125]
    N3#101=[#123*.125]
    N4IF[#123EQ#100]GOTO7
    N5#123=[#123+1]
    N6GOTO8
    N7M30
    N8G1 X[#101] Z0 Y0
    N9Z0.037 Y0.0054
    N10Z0.0643 Y0.0156
    N11Z0.0924 Y0.0313
    N13Z0.1144 Y0.0469
    N14Z0.1332 Y0.0625
    N16Z0.1646 Y0.0938
    N17Z0.1904 Y0.125
    N20Z0.2115 Y0.1563
    N21Z0.2288 Y0.1875
    N23Z0.2434 Y0.2188
    ....etc.
    N121Z0.1227 Y11
    N122Z0.1095 Y11.125
    N123Z0.0961 Y11.25
    N124Z0.0825 Y11.375
    N125Z0.0687 Y11.5
    N126Z0.0549 Y11.625
    N127Z0.0409 Y11.75
    N128Z0.0268 Y11.875
    N129Z0.0127 Y12
    N130G0Z.75
    N131Y0
    N132GOTO3

  2. #2
    Join Date
    Mar 2003
    Posts
    35538
    As answered on the Mach forum, Mach3 doesn't support conditional stuff in the g-code.

    You can work around this by creating VB macros and calling them via M codes.
    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
    Oct 2004
    Posts
    590
    Can you point me to any info on writing VB macros for Mach? My understanding of the Mach macro stuff on the Mach website is that it's for controlling the Mach screen interface which isn't what I'm trying to do...but maybe I'm confused about this.

    Thanks.

    Chris

  4. #4
    Join Date
    Mar 2003
    Posts
    35538
    You can send g-code commands via VB.

    A good source of info is the wizards. View the VB code in the buttons for examples. Use operator>edit button script and click the flashing buttons to see the vb code.
    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)

Similar Threads

  1. HOW DO I CODE FOR PARAMETRIC CURVES IN MACH3?
    By TheNigerian in forum Mach Software (ArtSoft software)
    Replies: 4
    Last Post: 02-28-2011, 08:50 AM
  2. Won't load G Code?
    By robertmonroe in forum Mach Software (ArtSoft software)
    Replies: 2
    Last Post: 04-13-2009, 07:07 PM
  3. Bar code scanning to load program to controller
    By pmarques in forum Controller & Computer Solutions
    Replies: 0
    Last Post: 07-30-2008, 04:10 PM
  4. Mach Screens won't Load
    By TurboStew in forum Mach Mill
    Replies: 2
    Last Post: 10-17-2006, 03:54 AM
  5. How do I load an edited G code program
    By Stile2 in forum MadCAM
    Replies: 1
    Last Post: 05-22-2006, 09:26 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
  •