586,036 active members*
3,757 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    40

    Flatten/Squash G-code to constant Z

    Hello all,

    I need a little help with something. I have a program that has many different Z heights (all G01 are negative Z) that range from Z-0.002 to Z-0.124. I would like to force all of the negative Z values to be at a constant Z height.

    I thought it would be easy to open an editor and do a search and replace. But none of the editors that I have tried will allow you to use a wildcard for the search. (ex. search Z-0.***, replace Z-0.020)

    Is there an easy way to do this?

  2. #2
    Join Date
    Nov 2005
    Posts
    1468
    Yep,

    Use Excel to open the file (select all files so it can see it)

    Use "Fixed Width" option.
    Tell it where you want the column separators to be

    Select the column you want to delete and delete it

    Stick your value 0.0000 (for example) on the first cell you want and copy and paste that to the rest of the column cells.

    Save the file using a different file name but with the original extension.

    :::ting::: :idea:

    If there's any spaces, commas etc you dun want just use Word to Replace (EG Find Z,00.000 Replace with Z0.000 etc).


    ANy probs gimme a shout- hope this helps! home time for me nearly so if I dun reply am not ignoring you.

    Iain
    I love deadlines- I like the whooshing sound they make as they fly by.

  3. #3
    Join Date
    Mar 2003
    Posts
    35538
    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
    Join Date
    May 2006
    Posts
    40
    This is what I was looking for. Thank you. At first I had a little problem getting it to work the way I wanted it to.

    When I checked the use wildcars box I still had this problem;
    Example: search for Z-0.0** , replace with Z-0.050
    Results: Z-0.044 would be replaced with Z-0.05044. (not good)

    But toward the bottom of the page in link http://www.gmayor.com/replace_using_wildcards.htm There is an option ^# for any digit.

    Example: search for Z-0.0^#^# , replace with Z-0.050
    Results: Z-0.044 would be replaced with Z-0.050. (perfect)

    Thank you for your help.

Similar Threads

  1. Constant clock
    By kylemp in forum Stepper Motors / Drives
    Replies: 3
    Last Post: 01-29-2008, 12:33 AM
  2. constant velocity help
    By shnitzel in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 01-03-2008, 03:10 PM
  3. Constant digitizing
    By tt_raptor_90 in forum Digitizing and Laser Digitizing
    Replies: 2
    Last Post: 02-07-2006, 02:39 AM
  4. PWM Vs constant current
    By JerryFlyGuy in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 10-25-2005, 10:48 PM
  5. Constant feed
    By Tyraslin in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 09-03-2003, 01:33 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
  •