586,009 active members*
4,899 visitors online*
Register for free
Login

Thread: major pain

Results 1 to 13 of 13
  1. #1
    Join Date
    Mar 2004
    Posts
    7

    major pain

    when downloading from machine to computer, the program has spaces after every line. It looks like this,

    G0G40G80G90G54

    X0Y0

    M03S1200T02

    G43H01Z.5

    You get the idea. The entire program is this way.
    Now, for anyone who has put spaces in between lines knows the next time you upload that program ther will be an eob((in the macine) wherever there was a space.
    How do you change this?

  2. #2
    Join Date
    Apr 2003
    Posts
    1876
    Not knowing machine/controller type or other transfer settings, I would look for something called strip CR/LF or something similar.

    'Rekd
    Matt
    San Diego, Ca

    ___ o o o_
    [l_,[_____],
    l---L - □lllllll□-
    ( )_) ( )_)--)_)

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

  3. #3
    Join Date
    May 2004
    Posts
    14
    You are probably gonna hate this answer, but I would do it easily with the "sed" editor in Linux.

    sed '/^$/d' infile > outfile

    Most likely you are using Microsoft 98/2000/NT/XP etc. I'm not sure if there is an easier method for a Windows platform,
    (maybe with Word?). If you don't get a better solution I know you could download a version of sed that works on Windows platforms. Also the scripting language "Perl" accels at stuff like this.
    http://gnuwin32.sourceforge.net/packages/sed.htm
    http://www.perl.org

    Hope this helps
    Brian

  4. #4
    Join Date
    Mar 2004
    Posts
    7
    The controll is a Fanuc o-m, the software is master cam v-8, and the platform is windows 2000.

    I have also tried the strip line feeds, don't work -darnit!!

  5. #5
    Join Date
    Mar 2003
    Posts
    499
    Try a different editor, I had this problem and I believe that
    was the only fix.

    PEACE

  6. #6
    Join Date
    Mar 2003
    Posts
    4826
    You might be able to pull this editing trick off with a Hex editor, in fact I know you can, because I tried it

    Open the file in a hex editor and do a "Replace".

    Search for Hex string:
    0D 0A 0D
    and then replace all instances of it with:
    0D
    Save and close the file. All better

    I just use the first hex editor that comes up in a google search, called a Freeware Hex Editor XVI32. It is a nice little program.
    First you get good, then you get fast. Then grouchiness sets in.

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

  7. #7
    Join Date
    May 2004
    Posts
    14
    I know that in Windows world the end of the lines should be OD (return) OA (linefeed) and in Unix/Linux its just OA (linefeed),
    but if he replaces OD OA OD with just OD shouldn't it be instead replace OD OA OD with OD OA?

    I don't know about the software packages or the controller that JPann's using, but I know certain programs will complain that there
    is no end of line.

    Brian

  8. #8
    Join Date
    Mar 2003
    Posts
    4826
    No, because the offending string is
    0D 0A 0D 0A
    but the hex editor only has a 6 character "replace" field. So I fudged it.
    The results come out
    0D 0A which is correct.
    First you get good, then you get fast. Then grouchiness sets in.

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

  9. #9
    Join Date
    May 2004
    Posts
    14
    Ah I see what you are doing now... I thought you were saying that the last OA wasn't even there. Makes sense now.

    Brian

  10. #10
    Join Date
    Apr 2003
    Posts
    3578
    Jpann, what are you using to upload and down load in mastercam ?
    Are you using the Cimco editor or just the basic Mastercam communications?
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
    Cadcam
    Software and hardware sales, contract Programming and Consultant , Cad-Cam Instructor .

  11. #11
    Join Date
    Mar 2004
    Posts
    7
    Iam using basic mastercam comm.

  12. #12
    Join Date
    Sep 2003
    Posts
    6
    If you have this program in Windows, and have Word, you should be able to bring the file up in word. Then save as a TEXT ONLY file. The software should ask you how you want to handle the lf/cr.

  13. #13
    Join Date
    Apr 2003
    Posts
    3578
    Jpann, I would set it for Cimco comm, this will give you more control to remove space . MC does just the basic.
    this why we offer the cimco editor with communications.
    What version of MC.
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
    Cadcam
    Software and hardware sales, contract Programming and Consultant , Cad-Cam Instructor .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •