G-Code question: How to highlight XYZ... coordinates lacking a "dot"?
Posted: Mon Mar 31, 2025 1:27 pm
Hi all,
I'm using textpad to write G-Code for a CNC mill, the issue is that in this mill in you forget a "dot" in the number you use for coordinate the machine defaults to microns.
So if I write for example the machine will move (G01 command) to coordinate 120.0mm in whatever coordinate system is selected at 1000mm/min (F command) but if type then the machine will move to coordinate 120 microns (so 0.12 mm)
This is hard to spot and can lead to some bad crashes.
To make thing even worse the dot needs to be used for coordinates (so XYZIJKARQ characters) but not for other commands like spindle speed (S), cutting speed (F), iterations (L) calls (P) etc... it's a fuckign mess...
I'm using my custom syntax coloring to make the code easier to visualize and I've defined with a nice dark red and numbers in black
What I would like to do is have any operator chars where I have forgotten the bloody dot to get highlighted
So woudl appear as a Red X followed by black 451.
but would appear highlighted until I type that bloody dot
Is this feasible ?
I'm using textpad to write G-Code for a CNC mill, the issue is that in this mill in you forget a "dot" in the number you use for coordinate the machine defaults to microns.
So if I write for example
Code: Select all
G01 X120. F1000Code: Select all
G01 X120 F1000This is hard to spot and can lead to some bad crashes.
To make thing even worse the dot needs to be used for coordinates (so XYZIJKARQ characters) but not for other commands like spindle speed (S), cutting speed (F), iterations (L) calls (P) etc... it's a fuckign mess...
I'm using my custom syntax coloring to make the code easier to visualize and I've defined
Code: Select all
OperatorChars = XYZIJKLNPSRFQAWhat I would like to do is have any operator chars where I have forgotten the bloody dot to get highlighted
So
Code: Select all
X451.but
Code: Select all
X451Is this feasible ?