Ability to control lights & fan on enclosure mid-print

Hi. I have the new enclosure for the a350. It is pretty great. My biggest complaints thus far are that the sliders aren’t very smooth (which I can live with), and that the lights/fan cannot be turned on & off while printing (or laser etching, or, I imagine, cnc milling). Unless I’m missing something here…

Any chance that can be implemented in the next firmware revision?

Thanks.

-mg

Which firmware do you have installed ?

Normally this is possible with a swipe to the left during a print. There should be a enclosure tap accessible where you can turn on/off lights and fan.

1.10 – which was current at the time of my post… but it looks like 1.10.1_20200822 is out now… I’ll give that a try…

@moonglum Both of your problems can be solved.

For the sliders take a Q-tip and some grease (I’ve used sanitary silicone grease) and put a small amount in the sliding slot just close to the plastic sliders.

You can turn on LED and fan mid print via touch screen by swiping from the right side.
There is a “enclosure” menu.
I’ve also managed to turn on the lights mid print with WiFi. The printer was paired before the print.
Just start the print and then you can reconnect with Snapmaker Luban and swith the enclosure features.

You can also change work speed and some other settings from Luban during print.
When you press “disconnect” in the software there is a warning screen that the print will stop if you disconnect. But with the latest firmware the print continues as nothing happened.
(I have just tried all this things to confirm).

Hi Michael,

You are too fast! :slight_smile: I did update my firmware, and the fan/light issue seems to be working fine now. Not sure what was up there… but it wouldn’t “slide left” for me.

I’ll definitely try your suggestion with the grease. That is a good idea. I think I have something like you describe already.

I typically print from USB… in case my pc gets rebooted, the network goes down, or something stupid, so I haven’t tried printing from luban directly in a while… but what you are suggesting with regards to changing settings on the fly, sounds pretty cool (I think I saw that in an update the other day). I will have to play with that.

Thanks again for your advice.

-mg

or use octoprint enclosure plugin…

Here are some gcodes for controlling the fan or LEDs…

M1010 S3 P100 ; LED’s On at 100%
M1010 S3 P0 ; LED’s OFF

M1010 S4 P100 ; Enclosure Fan 100%
M1010 S4 P25 ; Enclosure Fan 25%
M1010 S4 P0 ; Enclosure Fan OFF

3 Likes

During printing it does not matter that your PC gets a reboot.
Luban will send the code to the printer and after that the printer can run on it’s own. It does not need a persistent connection to your PC.

Really? That is fantastic. My prints have been too big lately, and I was too scared to try… That is good to know! Thanks.

Hey Gonk, I missed your post.

That is really cool, thank you. That will come in handy.

just what i was looking for THX :wink:

Since this information helped me so much just a little bit ago, I thought that I would tell you that I just updated to SM 2.0 FW Version 1.12 and these values are now between 0 - 255 ! (Not 0 - 100) now. I noticed that the enclosure lights were not as bright with the new FW, and I messed around in Octoprint sending raw G-Code for the lights and fan. It turns out that they are now on a different scale! I updated my G-Code commands for the Octoprint “Enclosure Plugin”" to reflect these new values and now the lights and fan are back to full bright and full tornado! Yay. So to summarize, the new commands are as follows:

M1010 S3 P255 ; LED’s On at 100%
M1010 S3 P192 ; LED’s On at 75%
M1010 S3 P128 ; LED’s On at 50%
M1010 S3 P64 ; LED’s On at 25%
M1010 S3 P0 ; LED’s OFF

M1010 S4 P255 ; Enclosure Fan 100%
M1010 S4 P192 ; Enclosure Fan 75%
M1010 S4 P128 ; Enclosure Fan 50%
M1010 S4 P64 ; Enclosure Fan 25%
M1010 S4 P0 ; Enclosure Fan OFF

1 Like

Thank you for your post and these codes are correct.
Actually, you guys can learn how to use the M1010 command via our GitHub repository.

Summary

void GcodeSuite::M1010() {
uint8_t s, p;

if (!parser.seen(‘S’)) {
enclosure.ReportStatus();
return;
}

// if chamber is not exist, not allow other operation
if (!enclosure.IsOnline()) {
SERIAL_ECHOLN(“Enclosure is not online.”);
return;
}

s = parser.byteval(‘S’, 12);
p = parser.byteval(‘P’, 0);
switch (s)
{
case 0:
enclosure.Disable();
break;

case 1:
enclosure.Enable();
break;

case 2:
ModuleBase::UnlockMarlinUart();
break;

case 3:
enclosure.SetLightBar(p);
break;

case 4:
enclosure.SetFanSpeed(p);
break;

case 10:
enclosure.door_state(ENCLOSURE_DOOR_STATE_OPEN);
SERIAL_ECHOLN(“triggered door open”);
break;

I saw that with the new FW 1.12.1 these values are fixed back to 0 - 100. Thank you.

1 Like

Sorry for the inconvenience regarding to this bug.

Please pull your requests in our GitHub repository if you find any problems.
https://github.com/Snapmaker/Snapmaker2-Controller/pulls

Edwin

Are they back to 100? I’m running the latest FW and if I issue:

M1010 S3 P100 ;

I get a different brightness level than I do with:

M1010 S3 P255 ;

Also @Edwin there is a bug with what is reported back. Aside from the spelling mistake in the word enclosure (missing ‘n’) it reports back that the fan has been set but it should say lights or LED etc:

Eclosure: set FAN speed 255

Regards
Mark

Sorry, I take that back. I am certain I checked my firmware version but just noticed it was still reporting a new version was waiting to install.

It was fixed in FW 1.12.1. You will know that it is fixed by issuing the same “M1010 S4 P255” and it will respond with: “Eclosure: set FAN speed 100”. Not sure about if I remember if the misspelling and FAN vs LIGHT response was fixed. My printer is off now so I can’t check but it will should (if on the correct FW) correct it to 100 (MAX) if you send it anything greater than 100.

I just verified that the response for FAN and LIGHT controls are still misspelled as “Eclosure” (missing the ‘n’).

Terminal Response from commands below:

Send: M1010 S3 P100
Recv: Eclosure: set LIGHT power 100
Recv: ok
[…]
Send: M1010 S3 P0
Recv: Eclosure: set LIGHT power 0
Recv: ok
[…]
Send: M1010 S4 P100
Recv: Eclosure: set FAN speed 100
Recv: ok
[…]
Send: M1010 S4 P0
Recv: Eclosure: set FAN speed 0
Recv: ok

Our firmware developer did not check the codes and he is not excellent at English spelling. We are sorry for the typos.

We will spend some time checking the typos these days.

Edwin