I've modified my post processor to make line numbers increment by 1 instead of 10.
However, the line numbers start at 10 instead of 0.
I changed this:
function OnNewLine()
post.Text ("N")
post.Number (lineNumber, "0000")
lineNumber = lineNumber + 10
end
to this:
function OnNewLine()
post.Text ("N")
post.Number (lineNumber, "0000")
lineNumber = lineNumber + 1
end
which made the lines increment by 1, but no idea how to get them to start at zero.[/code]
Here's the start of the code:
N0010 (Filename: BOLT TAB.tap)
N0011 (Post processor: NeuronThcUccncPost (BEEFY).scpost)
N0012 (Date: 28/12/2017)
N0013 G90
N0014 F1
N0015 (Part: BOLT TAB)
How to make line numbers start at zero.
-
- Posts: 161
- Joined: Tue Feb 25, 2014 6:53 am
- Les Newell
- Site Admin
- Posts: 3665
- Joined: Thu May 11, 2006 8:12 pm
Add this as the first line of function OnInit()
Code: Select all
lineNumber = 0
-
- Posts: 161
- Joined: Tue Feb 25, 2014 6:53 am
Re: How to make line numbers start at zero.
Thanks Les,
the reason I'm doing this is so the gcode line numbers match the way my cnc controller reads them.
Keith.
the reason I'm doing this is so the gcode line numbers match the way my cnc controller reads them.
Keith.