- Posts: 478
- Thank you received: 83
gcode format
13 years 2 months ago - 13 years 2 months ago #37610
by billykid
gcode format was created by billykid
Hello, I' m using linuxcnc 2.6.0 pre
executing this code, the x-axis start before reaching Z 5.
N6135 G3 X 133.9400 Y -138.0000 I -2.0000 J 0.0000 F800
N6140 G0 Z 5.0000
N6145 X 166.5000
correcting the third row so the fault disappears.
N6145 G0 X 166.5000
already happened to someone?
executing this code, the x-axis start before reaching Z 5.
N6135 G3 X 133.9400 Y -138.0000 I -2.0000 J 0.0000 F800
N6140 G0 Z 5.0000
N6145 X 166.5000
correcting the third row so the fault disappears.
N6145 G0 X 166.5000
already happened to someone?
Last edit: 13 years 2 months ago by billykid.
Please Log in or Create an account to join the conversation.
13 years 2 months ago #37611
by ArcEye
Replied by ArcEye on topic gcode format
Hi
Although G00 and G01 should be modal, I always head each line with the relevant code for readability if nothing else.
It is strange, only thing that occurs is was the file created under windoze? (or the output from a windoze CAM program)
If it does not have linux line termination and the next line does not have another modal code, the third line could be being read as part of the second line.
When a modal code of the same group is encountered, it is treated as another line again possibly.
regards
Although G00 and G01 should be modal, I always head each line with the relevant code for readability if nothing else.
It is strange, only thing that occurs is was the file created under windoze? (or the output from a windoze CAM program)
If it does not have linux line termination and the next line does not have another modal code, the third line could be being read as part of the second line.
When a modal code of the same group is encountered, it is treated as another line again possibly.
regards
Please Log in or Create an account to join the conversation.
13 years 2 months ago #37613
by billykid
Replied by billykid on topic gcode format
thanks for the quick reply!
the file has been generated by DeskCNC under Windoze 7.
the first impression for me was just what you said ..
is performed together with the previous line
regards
the file has been generated by DeskCNC under Windoze 7.
the first impression for me was just what you said ..
is performed together with the previous line
regards
Please Log in or Create an account to join the conversation.
13 years 2 months ago #37616
by BigJohnT
Replied by BigJohnT on topic gcode format
Also you can turn off the line numbers as Linuxcnc just ignores them.
JT
JT
Please Log in or Create an account to join the conversation.
13 years 2 months ago - 13 years 2 months ago #37617
by ArcEye
Indeed, it really clutters the code too.
I use this script to do it
It overwrites, so always use it on a copy of the code to be safe
regards
Replied by ArcEye on topic gcode format
BigJohnT wrote: Also you can turn off the line numbers as Linuxcnc just ignores them.
JT
Indeed, it really clutters the code too.
I use this script to do it
Code:
#!/bin/bash
## inserts or removes line numbers at start of each line
## usage: linenumbers insert oldfile newfile
## linenumbers remove filename (overwrites so perform on a copy)
case $1 in
insert ) exec < $2
d="N"
e=" "
a=1
while read LINE ; do
c=$d$a$e$LINE
echo $c >> $3
((a++))
done ;;
remove ) sed -i "s/^ *N[0-9]* //g" $2 ;;
esac
exit 0
It overwrites, so always use it on a copy of the code to be safe
regards
Last edit: 13 years 2 months ago by ArcEye.
The following user(s) said Thank You: BigJohnT
Please Log in or Create an account to join the conversation.
13 years 2 months ago #37618
by BigJohnT
Replied by BigJohnT on topic gcode format
That's pretty neat!
JT
JT
Please Log in or Create an account to join the conversation.
Time to create page: 0.054 seconds