Firmware request: Tool Change Mode with enclosure lights left ON

If the SM2 is off, its hard to reach the toolhead for change at home position where it usually is.
Currently have to turn it on and move head to middle of X and lower on Z to reach easily inside enclosure to change toolhead.
Unplugging toolhead makes the whole thing go a bit crazy and shut off lights in enclosure which I need to be able to see what I’m doing.

Please have a toolchange mode that puts the machine in easy position to change tool and leaves lights ON please!

Otherwise having a great time with the machine with laser and CNC. Haven’t tried 3d printing yet.

Photo of latest little project. Need to learn to finish / paint but otherwise great!

1 Like

It’s not recommended.

If I had the SM enclosure I would bypass and hardwire the lights to a physical switch and power supply.

-S

Yeah, no kidding. It seems like something that should already be that way

with that said, it would be convenient if you could at least have a pre-set destination for removing the tool head before powering down instead of fiddling around with jogging the machine. seems like a relatively simple thing to accomplish and thru luban im sure a simple macro would make that work.

they could add something like that in the settings real easily and i think people might appreciate that little added touch.

pick an x y z location then just make the gcode to set absolute positioning than move to that position in a luban macro

1 Like

If just a macro is needed for some users, here it is (ATTENTION, NO UNPLUGGING WHILE POWERED!):

G28 O F3000; Move home if needed
M1010 S3 P100; Turn the lights on
G0 X250 Z150 F500; Move to X250 Z150 with Speed of F500

See update here:

3 Likes

Thank you for the macro. Too bad turning the lights on is pointless in combination with the no unplugging while powered. So controller / power supply are unable to cut power to toolhead for a tool change? I’ll see what I can rig up to power the enclosure separately and still have at least a switch or remote control on fan/lights.

Toolhead specific initialization is done at machine startup. Of course it would’ve been possible to design hot-pluggable tools into the firmware, but it isn’t there now.

The power bus for the toolhead does not have a disconnect in the controller - that is not something that can be fixed without a new PCB. EDIT: toolhead and linear modules are separated from the touchscreen, and the add ons.

I agree the best bet is going to be an aux switch. I bet it would be trivial to add some diodes so that software control of the enclosure lights could be maintained, but there’s really no need for that if there’s a switch on the outside.

Just a thought, since the enclosure module firmware has been released, it would be pretty trivial to rewrite the controller so that any time power is applied it just turns the lights on. Fan would have to be dealt with. Probably not worth is over just splicing the lights directly and removing the enclosure control box.

1 Like

I still havent even assembled my enclosure. i think i might do that this weekend.

Def agree with the default ON for lights. Not sure why default is OFF. Day or night, ON and some additional light isn’t a problem while OFF is well… dark.

OK, well here’s a module firmware that turns the lights on at startup

Snapmaker_V1.9.3_20201230.zip (32.9 KB)

Much better. The controller does think the lights are off, but if you turn on and then off the lights will respond. https://github.com/brent113/Snapmaker2-Modules/tree/enclosure_lights_startup

2 Likes

Are you sure about that? There is firmware code for controlling three power domains, one of which is for the toolhead and linear modules. I haven’t tested this but I would expect that disable_power_domain(POWER_DOMAIN_EXECUTOR) should make it safe to change the toolhead while keeping the lights on.

1 Like

Looks like the toolhead and linear modules are in the same power domain. That would allow the enclosure lights to stay on though. Just need to reboot the controller after it’s done I think.

I think this would require touchscreen firmware modifications in addition to controller firmware. But it does look like this can be software patched.

1 Like

Lookin good! Thanks for that firmware brent!
I’ll install it today after current laser cut is done. Loving the community.
sooo… has it been long enough with your platform in the mail for us to request replacements of ours? :smile: My A350 platform is over 1.2mm off in z from one side to the other. Going to shim for now.

1 Like

Thank you for this piece of firmware.- This in combination with the macro mades it.
I have edited the macro, so toolchange is possible and a bit more comfortable now, unfortunately i am not able to keep the work origin if i run the macro…

YOU WILL LOOSE YOUR ACTUAL WORK ORIGIN!

G28 O F3000; Move home if needed
M1010 S3 P100; Turn the lights on
M82
G53 G1 X250 Z150 F5000; Actual Machine Coordinate System,- Move to X250 Z150 with Speed of F500
G4 P5000; Wait 5Sec, so you could be ready
M1999; restart the machine controller, this needs about 12sec

I have now recognized, the touchscreen has its problems about tool detection,- could we restart the touchscreen from the console as well?

I think you can unplug it and replug it, but otherwise it requires firmware changes.

Give me some time to write a test a firmware modification based on zauguins info that disables power too. The touchscreen can be restarted from the controller if I add a command for it

1 Like

I added the M2001 gcode command to control power domains. When certain domains are enabled the screen and controller are automatically rebooted.

Snapmaker_V4.0.1_20201231.zip (141.1 KB)

And example pair of Luban macros to do a toolhead would looks like this now:
Macro 1: “Start Tool Change”

G28 O F3000; Move home if needed
M1010 S3 P255; Turn the lights on
G53 G1 X250 Z150 F5000; Actual Machine Coordinate System,- Move to X250 Z150 with Speed of F500
M2001 T0 ; Disable power to the toolhead

Macro 2: “Finish Tool Change”

M2001 T ; Enable Tool Power, rebooting machine

Command documentation:

/*
 * Power domain control:
 *   S: just for screen
 *   T: for the toolhead and all linear modules
 *   B: for bed and addons, like the enclosure
 * 
 * Call with:
 *   M2001 S{0} T{0} B{0}
 */

Example usage:
M2001 ; Get status of each power domain
M2001 T0 ; Turn off the toolhead/linear modules
M2001 T0 B0 ; Turn off the toolhead/linear modules and bed/enclosure
M2001 S T B ; Turn everything on. Will reboot, if T or B was off previously

1 Like

@brent113 Is this zip a new firmware from you?
If so whatb are the changes to the latest from snapmaker?
Only the M2001 or more?

Only M2001, based on top of the current Snapmaker 4.0.0 branch.

Full changes here: https://github.com/Snapmaker/Snapmaker2-Controller/pull/47/commits/3f5d1a608bed770a9c5cb3634718ce8b2473a4ce

so you just made a hot swap module macro for use with your custom firmware?

edit: when is snapmaker going to start paying you to make their products better?

1 Like

Brent, does this firmware also include the laser grayscale you came up with?

You should branch off and start your own custom firmware - Brentmaker or something like that

Feature request, implement that bed heater on and off we talked about hehe.

Altho i ran it with the bed on and I think it went ok im sure that it would be more proper yeah