584,865 active members*
4,842 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2017
    Posts
    591

    Any masters at editing with notepad++?

    This is more of a notepad question, but wasnt sure where to ask it. I have a mill turn setup with a brake for locking the spindle and i need to take gcode files and enter a specific M code before and after every line with an "A" in it. This will unlock the spindle before every A axis move, and lock it after every A axis move. Eventually i want to get this working in the post processor, but for now i think this will be more simple.

  2. #2
    Join Date
    Nov 2005
    Posts
    222

    Re: Any masters at editing with notepad++?

    Are you looking to change something like this:

    "A"
    "B"
    "A"

    to something like this:

    M1 "A" M2
    "B"
    M1 "A" M2

    If so, press Ctrl+H or select "search" and then "Replace..." from the menu bar. Then enter "A" in the Find What field and then M1 "A" M2 in the replace with field and then click on replace all.

  3. #3
    Join Date
    Nov 2017
    Posts
    591

    Re: Any masters at editing with notepad++?

    No, I need a new line before and after like this:
    From:

    "B"
    G0 A180
    "B"

    to:

    "B"
    M1231
    G0 A180
    M1230
    "B"


    It needs to find all lines of G code with an "A" in them, add a new line "M1231" before it, and a new line "M1230" after it. Can notepad do this? Actually better yet, if it could search instead for "G0 A". Fusion 360 uses all capital letters in tool descriptions so searching for only "A" would occasionally give some unneeded M codes

  4. #4
    Join Date
    Apr 2014
    Posts
    215
    Quote Originally Posted by QuinnSjoblom View Post
    This is more of a notepad question, but wasnt sure where to ask it. I have a mill turn setup with a brake for locking the spindle and i need to take gcode files and enter a specific M code before and after every line with an "A" in it. This will unlock the spindle before every A axis move, and lock it after every A axis move. Eventually i want to get this working in the post processor, but for now i think this will be more simple.
    easier in the postprocessor than via notepad++

  5. #5
    Join Date
    Nov 2017
    Posts
    591

    Re: Any masters at editing with notepad++?

    I posted in the notepad forum and got the code needed to make it happen, but i would much rather do it in the post. Do you know how? Or did you just mean its easier because i dont need to modify every gcode file? In that case, yes, definitely agree, but no idea how to make that edit. I posted in fusion 360 forum, we'll see if someone responds

  6. #6
    Join Date
    Apr 2014
    Posts
    215

    Re: Any masters at editing with notepad++?

    I edit the sheetcam post processors easy enough, I've not used Fusion360 to output gcode (yet) but I can't see it being that difficult

    https://www.youtube.com/watch?v=5EodQIY25tU

    don't "look" that complicated

  7. #7
    Join Date
    Dec 2013
    Posts
    5717

    Re: Any masters at editing with notepad++?

    I sent you a present, check your PMs
    Jim Dawson
    Sandy, Oregon, USA

  8. #8
    Join Date
    Nov 2017
    Posts
    591

    Re: Any masters at editing with notepad++?

    This turned out to be ridiculously simple to do on the post. The mach3 post in fusion which is based on fanuc, already has the feature of locking an axis for indexing. All i had to do was search the post for on command axis lock/unlock, and insert my m codes, done. When posting code it now automatically inserts my macro for unlocking before any A axis index and locking after A axis index. What's really cool is that fusion also knows the difference between indexing and 4 axis simultaneous, so if I do any continuous 4 axis stuff, it stays unlocked for all of it. Turned out so much simpler than I thought it would be.

Similar Threads

  1. Notepad++ Gcode Lexer
    By safecnc in forum OpenSource Software
    Replies: 12
    Last Post: 05-12-2016, 04:04 PM
  2. Bamboo Notepad Covers
    By svaustin in forum Videos
    Replies: 0
    Last Post: 10-24-2014, 04:18 AM
  3. Notepad++ G CODE EDIT ANY ONE?
    By VoKuS in forum Coding
    Replies: 8
    Last Post: 10-23-2012, 03:34 AM
  4. Creating TAP files from Notepad
    By ViperTX in forum Mach Mill
    Replies: 5
    Last Post: 03-16-2010, 02:05 AM
  5. Notepad G code?
    By disinformation in forum G-Code Programing
    Replies: 24
    Last Post: 02-26-2007, 11:11 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
  •