-
-
Notifications
You must be signed in to change notification settings - Fork 536
Description
Hi,
I would like to create some custom buttons on LaserGrbl like a square around my picture (I found the program - Thanks Vankes) but I would like to make a program which will draw a square around my picture but with a space all around.
To do this I programmed my button like this and it's work, I draw a square around my picture 5mm larger on each side :
...
G0 X([left]-5) Y([bottom]-5) F500
M3 S250
G1 X([left]-5) Y([top]+5)
G1 X([right]+5) Y([top]+5)
G1 X([right]+5) Y[bottom]-5)
G1 X([left]-5) Y([bottom]-5)
M5
G0 X0 Y0 F3000
...
But now, I dont want to change all the "5" on my code one by one, I would like to use a local parametric variable.
I read on some topics that the locals variables are writing like #1 to #33 on Gcode language so I try to write this in my code :
...
#1=5
G0 X([left]-#1) Y([bottom]-#1) F500
M3 S250
G1 X([left]-#1) Y([top]+#1)
G1 X([right]+#1) Y([top]+#1)
G1 X([right]+#1) Y[bottom]-#1)
G1 X([left]-#1) Y([bottom]-#1)
M5
G0 X0 Y0 F3000
...
Unfortunately, this code it's not working, I think we don't have the access to write some locals variables.
Would someone have a solution to my problem?
Have a good Day
RJ