-
Update for new behavour of GCC 7.3.0
12/09/2018 at 03:52 • 0 commentsUpdate for GCC 7.3.0
The latest gcc has changed. I have had to recompile Xbgi library (i.e. 2D graphics) and I found sscanf() works differently (i.e. 0X? is recognised as hexadecimal).
I have opted to migrate from BGI (Windows) and Xbgi (linux), to ezxdisp.
"ezx" is short and sweet and is available for Windows and Linux.
The latest version is available at http://morihit.net/ezxdisp/
Previously I used sscanf() as follows:
for (j=0;Line[j];j++) Line[j]=toupper(Line[j]);
tmp=strchr(Line,'G');
if (tmp!=NULL) {
sscanf((tmp+1),"%lf",&f1);
if (f1<0) f1=0;
block[i]->G=(long)f1;
}It should read any number as a double which can be converted to long later.
Now "G0X7.122" is read as G=7, X=0.0 but "G1X7122" still works fine.
Now I have now coded:
for (j=0;Line[j];j++) Line[j]=toupper(Line[j]);
tmp=strchr(Line,'G');
if (tmp!=NULL) {
sscanf((tmp+1),"%ld",&d1);
if (d1<0) d1=0;
block[i]->G=d1;
}AlanX
-
Feed Override
08/20/2016 at 12:46 • 0 commentsOverride Feed Rates
Added two options:
- -G0 FeedRate
- -G1 FeedRate
These options override the file feed rates (i.e. deletes feed rates in the file and uses the option rate instead).
Example:
GCodeFilter.exe -i fish6.nc -o LaserFish6.nc -t 0.01 -l -g0 600 -g1 120
This line (usually in a batch file) overrides both the G0 and the G1 feed rates. Also sets "laser" mode.
AlanX
-
Laser G Code converter
07/30/2016 at 04:01 • 0 commentsLaser gCode
It is a pretty simple exercise to convert milling G Code to laser G Code.
Turn off the laser (M5) for G0 movements and turn on the laser (M3) for G1 (also G2 and G3) movements. May as well delete all the old M3, M5 and Z movements as they will be redundant.
I will add a "-L" or -"l" to the command line options for "laser code".
AlanX