Tonight I started with a new microsd card, which thankfully fixed my random boot black screen issues as I’d hoped.
This helped me discover a possibly expected bug. I pi imaged the card with 1.3.1, then browser “Upgrade via File” to 1.4.0 Alpha 2. Then I restored backup of my configuration taken from my previous sd card. Everything looked good, and my previously customized macro buttons all showed, but since the backup doesn’t contain G-code files, none of my macros were actually there, and when run, the G-code preview said Code:400. Unable to read file doesn’t appear to be GCode. (see photo below)
Hope this helps refine the process! Thanks for your hard work on this firmware.
edit: interestingly, i also noticed the select dropdown contained real names of my latest GCode uploads, but they were also non-existent files, except the default “Team Onefinity.ngc” file.
Learner question:
I frequently use this bit of code
G0 X123 Y321
Can I put in a conditional code that either will not move the spindle if it is not at a safe height or will move the spindle to a safe height before executing the above code, and put it into a macro?. I worry that I will run afoul of the Z axis homing.
Also the software am using does not have the ability to move to a new work center and automatically re run the carve, will it be possible to have a macro that moves the spindle then re runs the carve, x number of times, I forsee needing to set up possible 10 or 12 work pieces. Because these are two sided carves I hold the work in place with two bolts, on the center line of the work, it saves me having to run each blank through the table saw to size them. Will I be able to set up a macro to do this as well.
For your first question I would think this would be what you are after:
G53 G0 Z0
G0 X123 Y321
For your second question using G52 or G92 in a macro may work. Coordinate Systems (linuxcnc.org)
I have not got time now to dig deeper.
1 Like
Aiph5u
(Aiph5u (not affiliated with Onefinity))
24
Hey Tony,
This will only go directly to your given X and Y if Z is already at the safe height, otherwise it will first lift Z to safe height and only then go to your given X and Y. Simply not moving the spindle if not at safe height is also possible, in this case one branch of the condition would simply say "(debug, Not moving spindle, since we’re not at a safe height), and just do a “o10 return”
o10 sub
#31 = [#<_z> + #<_offset_z>]
o20 if [#31 LT #3]
; check whether current Z position is at
; safe height
(debug, Z position is #31, so first moving Z to safe height #3,
only then going to X=#1 Y=#2)
G53 G0 Z#3
G0 X#1 Y#2
o20 else
(debug, Z position is #31, which is already at the safe height #3,
so directly going to X=#1 Y=#2)
G53 G0 Z#3
G0 X#1 Y#2
o20 endif
o10 endsub
o10 call [123] [321] [-10]
; set X and Y to move to; also set safe Z
; height here (the latter in G53 machine
; coordinates)
I tested it by first entering G21 G53 G0 X100 Y100 Z-133
and then uploading and running the file.
I have not tested the macros update (don’t want to take away the pleasure of having fun with alpha state from the others (I’ll test it when it’s gamma), so I don’t know how you usually pass the parameters, here I do this as the g-code subroutine parameters #1, #2 and #3
PS: Here is another for returning to home position:
o10 sub
#31 = [#<_z> + #<_offset_z>]
o20 if [#31 LT #1]
; check whether current Z position is at
; safe height
(debug, Z position is #31, so first moving Z to safe height #1,
only then going to X=#5161 Y=#5162 Z=#5163)
G28 Z#1
o20 else
(debug, Z position is #31, which is already at the safe height #1,
so directly going to X=#5161 Y=#5162 Z=#5163)
G28
o20 endif
o10 endsub
o10 call [-10]
; set safe Z height here (in G53 machine
; coordinates)
Note: With Z-16 assembly, Z travel goes from −133 mm (lowest position) to 0 (topmost and home position), with Z-20 assembly the lowest position is −160 mm.
G-code natively supports pre-loading the positions of nine coordinate systems that you can then select with the commands G54 – G59.3. After selecting the next one, you can run the same program. This can be used for a workpiece to which you apply up to nine identical toolpaths at different positions on the workpiece, or if you have up to nine fences on your wasteboard to which you clamped nine workpieces to which you want to apply the same toolpath.
A bit more 1.4.0 Alpha 2 feedback. Running a macro makes my file select dropdown forget the previously selected GCode file, instead it has nothing selected.
@Aiph5u
Once again a massive font of knowhow, willingly shared to help us lesser folks.
Note: tried my first inlay yesterday, now am all excited & off to try some more.
Cheers Mate.
I have an issue that happens randomly but happened already 5 or 6 times in the last few days. Sometimes after the gcode is ran and finished, the CNC become unresponsive. Meaning I cannot move it with the remote or from the screen or from the computer and none of the buttons on the screen is responsive. I have to restart the whole thing. I think I tried the e-stop, but I’m not sure if it worked.