End GCode Not Working

Discussions about ideaMaker and other printing software.
leonhart8888
Posts: 81
Joined: Tue Jul 07, 2020 12:02 am

End GCode Not Working

Postby leonhart8888 » Fri May 07, 2021 6:18 pm

Hi,

I'm trying to have a custom script in the "End GCode" section of Ideamaker. Basically I want to control how fast the heated bed slows down.

I can see these commands in the gcode after slicing - however it doesn't operate the way it's supposed to on my E2.

The M190 command is supposed to wait until the temperature reaches the set points, but it seems to go straight to the G4 command. It doesn't look like it's waiting to reach any of the set points requests.

Anyone have suggestions on how to make this work?

leonhart8888
Posts: 81
Joined: Tue Jul 07, 2020 12:02 am

Re: End GCode Not Working

Postby leonhart8888 » Fri May 07, 2021 6:18 pm

Picture attached.
Attachments
Screenshot 2021-05-07 111651.png

Jetguy
Posts: 3215
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: End GCode Not Working

Postby Jetguy » Sat May 08, 2021 1:06 am

You failed to read a key detail on that command.
https://marlinfw.org/docs/gcode/M190.html
Description
This command optionally sets a new target temperature for the heated bed and waits for the target temperature to be reached before proceeding. If the temperature is set with S then it waits only when heating.


So no, your code is flawed that the bed is likely higher than 80C entering the first command which because it's not heating UP to 80C, it's cooling down, the command doesn't work. You then proceed to do this a couple of times with G4 dwell commands that honestly don't do jack squat either. Read up on that command because G4 P5000 https://marlinfw.org/docs/gcode/G004.html is 5000 milliseconds or 5 seconds.
Again, effectively, you turn off the heater, the bed cools at rate based on thermal mass. Your heat commands are flawed and even if they worked by removing the S, you add NO significant time to the cool down. The heater is off because the bed is hotter than the set point. Once it reached that set point temp, maybe the heater kicks on, the code then waits for the firmware built in stabilization check (normally 3 temp reads within a timeframe that are within the threshold of the set point), then you G4 dwell for 5 seconds, and then the next set point would just turn off the heater for the next drop, the heater blips for maybe less than 5 seconds, and back to off again.

Remove the S, but even then, this probably won't work that well. It's not going to slow the way you are wanting.

You are creating a 20C stepping cooling off at best, and that's not great, your last 20C is flawed in that unless the room is BELOW 20C, the bed will never cool to 20C and your print will never end.

Either make timed G4 dwells and do not use M190, instead use M140. You can try 190 minus the S, but again, not really doing anything.
Just pick your timespan- you want it to cool to 80C for 30 minutes, then set cool to 60C waiting 30 minutes, then wait until 40C, and then end the print.

Again, you've created logic and conditions that would never be met. Your print gcode even if execute would get hung up at the end.

leonhart8888
Posts: 81
Joined: Tue Jul 07, 2020 12:02 am

Re: End GCode Not Working

Postby leonhart8888 » Sat May 08, 2021 2:19 pm

After posting this I tried changing it to M190 R which also didn't work properly even without and dwell commands. It would only wait for the first command and then skip all the way to the end. I basically created a gcode text file with below and then just plugged it into the machine via USB.

M190 R40
M190 R30
M190 R20
M140 S0

I realize the logic may be "flawed" for the 20C step, but that was just an example that I'm trying to test to make sure this works at all hence the low dwell and silly temperature set points. I want to be able to see it actually wait for temperatures when running the machine and watching the touchscreen, then I will implement something that makes more sense.

Even doing the following doesn't seem to work properly. I expect to see the touchscreen update the setpoint after each delay but it doesn't. Maybe this is a touchscreen refresh issue, but I have no other way of verifying whether this is working or not.

M140 S40
G4 S10
M140 S30
G4 S10
M140 S20
G4 S10
M140 S0

Jetguy
Posts: 3215
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: End GCode Not Working

Postby Jetguy » Sat May 08, 2021 3:31 pm

You do have a way, it's unplugging the USB cable from the motion control board and plugging it into a computer and using a 3D printer control console program to actually see what the motion board firmware is doing without the raisetouch software.

Jetguy
Posts: 3215
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: End GCode Not Working

Postby Jetguy » Sat May 08, 2021 3:45 pm

Truth be told, on E2, being DUET based, we probably should use the DUET firmware gcode guide for what that board accepts.
https://duet3d.dozuki.com/Wiki/Gcode
https://duet3d.dozuki.com/Wiki/Gcode#Se ... arget_temp
And there are notes:
Example

M190 S60
Set the temperature of the bed to 60C and wait for the temperature to be reached.

Note: M190 will not wait for temperatures below 40c because in many cases they may never be reached due to ambient temps. So if you want to wait for a bed to cool, use 41c or higher.

1 Only supported in RepRapFirmware 1.20 and later.


And so here lies the issue. Raise3D in their infinite wisdom made a custom modified DUET board, and then custom modified DUET firmware to work with the raise touch front panel interface all of it undocumented publicly. You beg them for support or firmware source to even understand what an abortion they have created and it never goes anywhere.

leonhart8888
Posts: 81
Joined: Tue Jul 07, 2020 12:02 am

Re: End GCode Not Working

Postby leonhart8888 » Sat May 08, 2021 3:51 pm

Ah didn't realize it was based on the DUET, thanks for pointing that out. I definitely can confirm that for temps around 30/40C, M190 R does not behave as expected.

I'll try temps > 40C now.

And yes, understand that maybe their custom implementation is done incorrectly, or doesn't support commands fully. Will let you know what I find out.

leonhart8888
Posts: 81
Joined: Tue Jul 07, 2020 12:02 am

Re: End GCode Not Working

Postby leonhart8888 » Sat May 08, 2021 3:56 pm

Nope - doesn't work (see below). I think that perhaps Raise3D did not implement the "R".

The below waits until it gets to 60C and then completes immediately.

I'll try this with M140 and dwells, but the dwell command seem to cause other issues. I'll see if I can plug it in directly and bypass the touchscreen later.

M190 R60
M190 R55
M190 R50
M190 R45
M140 S0


Return to “Software”

Who is online

Users browsing this forum: No registered users and 2 guests