How to make line numbers start at zero.

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)

Add this as the first line of function OnInit()

lineNumber = 0

Thanks Les,

the reason I’m doing this is so the gcode line numbers match the way my cnc controller reads them.

Keith.