Welcome! Log In Create A New Profile

Advanced

G-code alternation

Posted by Rapp 
G-code alternation
June 30, 2014 02:31AM
Hi there

I converted a CNC-machine 2000 x 1500 x 1000 for printing purpose. It has a HDI controler.
The problems are: The code from Cura or Slic3r are without line numbers ...N10 N11 N12.... ,The feedrate must be given in full numbers F7500.000 not good F7500 OK, brackets instead of semicolons are required for text in the code.
any ideas?
Re: G-code alternation
June 30, 2014 02:40PM
On linux it is fairly easy..

cat some.gcode | perl -ne 'print "N".++$a." $_" if /^[GM]/' | perl -pi -e "s/(Fd+).d+ /1 /"

I don't know if any native Windows tools will do the job, but if you are on Windows it is possible to install Perl.
Re: G-code alternation
June 30, 2014 04:56PM
It also depends on your host program. Pronterface pre-pends the line number (N0001..) To the front of every g code line that comes from a loaded file. It does not modify the commands you enter interactively.
Re: G-code alternation
July 01, 2014 03:16PM
A small c program could do that ! I could certainly write it if you really need it winking smiley
Re: G-code alternation
July 01, 2014 03:27PM
N 10 n11 n12... What s that ? Line number ?
What kind of brackets do you need? '(' or ')' ?
and my version of cura: cura 14.01 give full numbers for feedrate. F2100 for example.

Edited 1 time(s). Last edit at 07/02/2014 03:01AM by victorjung.
Sorry, only registered users may post in this forum.

Click here to login