Setting Z_MAX_LENGTH via M251...

All things related to the Rostock MAX 3D Printer, the worlds FIRST Delta kit!
Post Reply
geneb
ULTIMATE 3D JEDI
Posts: 5358
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Setting Z_MAX_LENGTH via M251...

Post by geneb »

There was some discussion about the M251 command not changing the X_MAX_LENGTH and Y_MAX_LENGTH values after an M251 command was issued. I can't find the thread any longer, but someone offered up a patch to "fix" this. It's not something that needs a fix.

Here's a thread I fell across while looking for something else:
http://forums.reprap.org/read.php?267,235416

Essentially, for a delta printer like the Rostock MAX, the X_MAX_LENGTH and Y_MAX_LENGTH values are ignored, so the patch that "fixes" what M251 does will actually screw up the firmware if you try to use the same source code on a cartesian printer.

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
User avatar
Nylocke
ULTIMATE 3D JEDI
Posts: 1418
Joined: Sun Jun 23, 2013 1:43 pm
Location: Iowa

Re: Setting Z_MAX_LENGTH via M251...

Post by Nylocke »

Actually, the X and Y values are important, just not in the same way as the Z, at least in the Marlin front. It seems that the X and Y values scale the homing speed in relation to the other axes, so if X and Y are larger than Z, they home at different speeds. As long as the difference between all the axes mins and maxes are the same, all towers home at the same speed.
geneb
ULTIMATE 3D JEDI
Posts: 5358
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Setting Z_MAX_LENGTH via M251...

Post by geneb »

The issue isn't related to Marlin at all - only the Repetier firmware.

I'm going with the fact that the guy that wrote the firmware probably knows more about it than anyone else. :)

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
edward
Printmaster!
Posts: 207
Joined: Mon Jun 03, 2013 8:55 am
Location: Fort Wayne, IN
Contact:

Re: Setting Z_MAX_LENGTH via M251...

Post by edward »

The discussion you are thinking of took place in the "That's all for now!" thread. http://forum.seemecnc.com/viewtopic.php?f=60&t=2313

That forum post that you linked is making me wonder if my "fix" will actually work. As I've stated, my machine is still down and I have not tested it. I should be back up either later tonight or tomorrow.

The odd part is that repetier states that for Delta machines, only the Z_MAX_LENGTH is needed. Users have clearly noticed that when all three of the X,Y,Z aren't the same, things don't work as expected.
My Thingiverse profile: http://www.thingiverse.com/edwardh
geneb
ULTIMATE 3D JEDI
Posts: 5358
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Setting Z_MAX_LENGTH via M251...

Post by geneb »

Thanks for the link Edward. You might want to email Repetier and ask him for clarification. He's been a huge help in answering my questions regarding the auto-level system he's built into the new alpha firmware.

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
User avatar
Flateric
Printmaster!
Posts: 811
Joined: Fri Feb 15, 2013 4:35 pm
Location: Calgary, Alberta

Re: Setting Z_MAX_LENGTH via M251...

Post by Flateric »

I <3 0.90 so far.
"Now you see why evil will always triumph! Because good is dumb." - Spaceballs
edward
Printmaster!
Posts: 207
Joined: Mon Jun 03, 2013 8:55 am
Location: Fort Wayne, IN
Contact:

Re: Setting Z_MAX_LENGTH via M251...

Post by edward »

geneb wrote:Thanks for the link Edward. You might want to email Repetier and ask him for clarification. He's been a huge help in answering my questions regarding the auto-level system he's built into the new alpha firmware.

g.

I have the machine moving again and the HBP upgrades didn't blow up. I think I'm running into the EEPROM issue now, so once I sort that out I'll give the M251 a try.

I've been searching through the code some more trying to verify repetier's statement about only Z_MAX_LENGTH being used, and I think he was mistaken (it is a rather large code-base, afterall). All of the calls including the Z length are also identical to the calls to the X and Y max lengths. I cannot find any location in the code that accesses the Z maximum length that does not access the X or Y, except for the single M251 routine in question. I also might not be searching for the right thing, but I've done this before...

I'll keep you posted, hopefully tomorrow, with results of the "fixed" code.
My Thingiverse profile: http://www.thingiverse.com/edwardh
edward
Printmaster!
Posts: 207
Joined: Mon Jun 03, 2013 8:55 am
Location: Fort Wayne, IN
Contact:

Re: Setting Z_MAX_LENGTH via M251...

Post by edward »

Ok I'm back up and running. My "patch" works, but I have not yet contacted Repetier to include it into the main tree. I will. I just need to get ahead of other things...

You can grab the fixed version here: https://github.com/edwardhughes/Repetier-Firmware

Use the master branch.
My Thingiverse profile: http://www.thingiverse.com/edwardh
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Setting Z_MAX_LENGTH via M251...

Post by 626Pilot »

geneb wrote: Essentially, for a delta printer like the Rostock MAX, the X_MAX_LENGTH and Y_MAX_LENGTH values are ignored, so the patch that "fixes" what M251 does will actually screw up the firmware if you try to use the same source code on a cartesian printer.
They may be ignored for pure Z travel, but they are all considered for lateral moves. I used them last night to re-level my bed after putting Kapton on it, and it worked. Similarly, incorrect values in X, Y, or Z will result in head crashes, lensing, etc. The code we added is wrapped in a #define that makes sure it only takes place when compiling for delta arm printers.
edward
Printmaster!
Posts: 207
Joined: Mon Jun 03, 2013 8:55 am
Location: Fort Wayne, IN
Contact:

Re: Setting Z_MAX_LENGTH via M251...

Post by edward »

In fact the entire M251 command is wrapped in an if statement that only applies to Delta machines, i.e., #if DRIVE_SYSTEM == 3...
My Thingiverse profile: http://www.thingiverse.com/edwardh
edward
Printmaster!
Posts: 207
Joined: Mon Jun 03, 2013 8:55 am
Location: Fort Wayne, IN
Contact:

Re: Setting Z_MAX_LENGTH via M251...

Post by edward »

Hey guys over the weekend Roland accepted my patch into the master branch. I just submitted a second request to include the fix in the development branch as it had the same Z-only routine.

Just FYI in case anyone was still waiting for a fix.
My Thingiverse profile: http://www.thingiverse.com/edwardh
Post Reply

Return to “Rostock MAX”