Subject says it all, how can I enter a control character (namely ctrl-X to reset) into a macro?
I think this works… I use it on my lasers…
I think it’s the $x. If you are connected via a dumb terminal, then ctl-x will work also…
Good luck
Not thesame, ^X is a soft reset while $X is “kill alarm lock”
In a post a while back Oz notes
“The macros are just GCode sent exactly as entered to the laser.”
So maybe there isn’t a way to do that… good question…
Maybe @JohnJohn could dig that up. You can’t enter it from the console either…
I’ll dig into sending a control character in a macro. I have a couple of ideas.
LightBurn resets a connection after an alarm lock to proceed, on at least 2 other machines, so I’d like to understand why this might not be happening automatically.
It’s possible that it’s looking for an initial unlock to begin but it’s not typical in GRBL setups.
Please copy the alarm lock message (and at least 5 or so lines on either side of it) from the Console window and paste it into a reply here. It may be automatically resetting.
I’d also like to get confirmation of which g-code variant that applies to your SnapMaker 2. It should state GRBL version (or Marlin or Smoothieware) when it first connects. With GRBL there’s two or three lines of letters which also offer information about the build date and firmware options.
A copy and paste including that initial connection message would help inform our next steps.
I skimmed the link you shared.
The grbl commands with the leading $ sign are literal.
$$ dumps the console settings
$# dumps the workspace offsets and coordinate system info.
Please test $X in the context you are experiencing.
The $X comes with a lot of dire warnings in the link you offered. I’d like to run through the questions I asked and see if the error / lock can be handled differently.
@JohnJohn I had to modify the Maslow M2 Firmware in order to get LB to recognize the machine. It appeared to me that LB was expecting as ‘ok’ prompt to appear in response to a G0 command. The Maslow firmware was responding with an ‘error: 2’ because it was in alarm lock. I added an ‘ok’ to the error messages and LB now recognizes the machine.
Interesting.
Please send me a link to the Maslow M2 Firmware you’re using.
I’d like to know more about versions and what might be setting the alarm-lock.
Here ya go:
This is really cool. I’m going to flash a 2560 and see how far I get before I have to buy a shield. Thanks!
Let me know when and if you fix LB to recognize the Maslow so I can go back to original firmware.
What is accepting the CTRL character? Is it the actual Arduino or is it Ground Control or ??
As for LB recognizing the Maslow, what is the actual issue? Typically our response to this is if you are not running a standard GRBL flavor YMMV. There are so many variants out there to track and test for it becomes a daunting task to monitor.
The original question was how to enter and send ^x from a macro. Standard grbl does support a reset this way… at least it does in all the little cnc machines I own. Via a terminal, I can send a ^x and get a machine reset…
Grbl 1.1f by LsrSal for forum.lightburnsoftware.com ['$' for help]
[HLP:$$ $# $G $I $N $x=val $Nx=line $J=line $SLP $C $X $H ~ ! ? ctrl-x]
ok
Grbl 1.1f by LsrSal for forum.lightburnsoftware.com ['$' for help]
The last entry of the help line is ‘ctrl-x’ and it’s been entered after the ‘ok’ where the board does a reset…
Irrelevant of machine type, if you need to send some kind of a control sequence, you should have some way to enter it, and an associated way to handle it in a macro…
I noticed you can’t enter any kind of control code via Lightburn console either… entered control code appear to go down the bit bucket…
I see what you are talking about now. It’s right there in the GRBL docs haha. We will look into it for future releases. @JohnJohn is putting in a issue right now Thanks Jack!
@JohnJohn while your in that part of the code add a delay to issue of G0 when trying to connect. You’re sending so fast my Snapmaker 2 doesn’t always have time to respond with an ‘ok’. I have to keep launching LB and/or the SM2 to get an ok and connect and its a RPITA.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
In LightBurn 1.5.00 Public Beta, Ctrl-X is Emitted by the Stop button in the Laser window. The Pause button emits a Ctrl-Break. Attempting to emit other control characters through the Console window or the Macro buttons appears to sanitize the control codes out.