584,826 active members*
5,021 visitors online*
Register for free
Login
Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2009
    Posts
    20

    G-Code Template - error 207

    Hi all,
    I have built a cnc lathe, with gang tooling, which runs ok with turbocnc.
    But, what I have found is that "there is no cheap software for generating gcode for a lathe" in high level language.
    There is "ACE converter", and it is a great utility, but I want to do more with less effort (in "daily" basis - hobby machine).
    So I learned about "machine by features" (great concept), and I'm trying to make something like it. But I have to learn Gcode and have a template.
    First of all, I'm using the XY plane for a lathe. I know, its wrong, but I have to use it for now, because the drawing software (2d cad).
    This template will be used as a starting point for a gcode generator. So I made a g-code script that has some subroutines (M98/M99 - "gosub/return").

    How it works:
    The first thing was to define many variables like "part size - length", "raw material diameter", "Tooling offsets and types", "facing options", "parting options", and others.
    Next step is zero (g92) in machine coordinates (g53). The X axis (Z in lathe coordinates) is user defined when the script is first run (g92 X0). And the Y axis (X in lathe coordinates) is zeroed by g28 (sensor).
    When tools are sharpened, I use a subroutine to Check Tools Positions (N300) and align it, otherwise this line is kept commented (; ).
    After that it procceds to Position Raw Material (N500). This consists in placing the Left Cutting Tool at Part Length (#1120) + facing options (#1520) and pausing (M00).
    Then the part is faced #1522 times, removing #1521 mm in each pass.
    Only now the part is made (N3000).
    And after that starts the parting sequence (N900), with parting options (#1530/#1531).
    Program ends.

    What doesn't work:
    Following this method, I made a subroutine to cut threads.
    As I'm using the XY plane the only way to thread is using G33 (one pass thread). To make many passes, must use a repeat until or while arrangement (IF/M97).
    It is done in N2000 to N2090.
    THE PROBLEM: It threads ok, when it gets to the M99 (N2090), it gives an error that says:
    "Searching for return line N3040...
    Runtime error 207 at 001A:0D57.
    c:\TCNC>_"
    And dumps to DOS, exiting turbocnc badly.

    I looked at yahoo group "turbocnc" but the reported "error 207" doesnt seem to apply to my problem.
    Can anybody help? Or have a template that works?

    Ps: there is two files attached, one that "works.txt", and doesnt have the threading routine.
    And the other that doesnt work ("notwork.txt"), and I want to fix it.

    Thanks.
    Attached Files Attached Files

Similar Threads

  1. ps 101 error code help!
    By AC_Engineering in forum Bridgeport / Hardinge Mills
    Replies: 2
    Last Post: 11-13-2007, 01:01 PM
  2. Fanuc OM 086 error code
    By SpringKing in forum Fanuc
    Replies: 8
    Last Post: 08-03-2007, 06:32 AM
  3. Error code help on Fanuc
    By digger1969 in forum Fanuc
    Replies: 8
    Last Post: 03-29-2007, 10:38 AM
  4. art code error
    By Mike Boarman in forum Mach Software (ArtSoft software)
    Replies: 4
    Last Post: 12-31-2006, 05:46 AM
  5. M01 error code
    By MRU in forum Mazak, Mitsubishi, Mazatrol
    Replies: 2
    Last Post: 06-12-2006, 01:59 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
  •