Welcome! Log In Create A New Profile

Advanced

Setting Junction Deviation in firmware has no effect

Posted by costmo 
Setting Junction Deviation in firmware has no effect
October 29, 2019 07:35PM
I posted this on Stack Exchange already:
[3dprinting.stackexchange.com]

I'd like to repeat my question here since this is group group is more focused on my specific issue.

This is a copy of the question on Stack Exchange:

I have built a 3D printer with Marlin bugfix-2.0.x forked from github.

I am attempting to set the default value for junction deviation so that I don't have to change it through the printer's screen/interface every time I power cycle the printer, but what I thought would set it properly isn't doing the trick.

My thought was that uncommenting this in Configuration_adv.h would work:

#define JUNCTION_DEVIATION_MM 0.02


I have tried setting this define inside of and outside of the default "if" block in which it appears (more on that below), just to make sure the issue wasn't because I didn't have something else set, and I get the same behavior when this define statement is either protected or unprotected by an "if"

Also, the default if block is this:

#if ENABLED( JUNCTION_DEVIATION )
    #define JUNCTION_DEVIATION_MM 0.02
#endif

Uncommenting #define JUNCTION_DEVIATION leaves me with a compiler error telling me that I don't need to do that, so I'm not seeing anything that I am supposed to enable to get it to use the JUNCTION_DEVIATION_MM setting. In other words, I can't actually enable "JUNCTION_DEVIATION" any more, so I HAVE to break the JUNCTION_DEVIATION_MM setting out of the "if" but it still has no effect.

After setting this parameter, when I power cycle the printer, the junction deviation is set to 0 (although one touch of the adjustment knob makes it jump to 0.010, so I think that what is displayed as "0" may actually mean "unset"), which is causing a significant stop/start jerk on every angle change until I manually set the junction deviation.

My current Configuration.h and Configuration_adv.h are here: [github.com]

Any ideas what I'm missing? I'm sure it's something simple, I just haven't found it.

I appreciate any insight anyone can give as to how I can get this setting to stick in the firmware so I don't have to set it every time I power up the printer.

In case it matters, I'm running this on an SKR V1.3 with TMC2208 drivers at 24V.


Thanks!
Re: Setting Junction Deviation in firmware has no effect
October 29, 2019 08:09PM
You post all this stuff, but you don't post the error??

The erro being.

"Marlin/src/HAL/HAL_LPC1768/../../core/../inc/SanityCheck.h:410:4: error: #error "JUNCTION_DEVIATION is no longer required. (See CLASSIC_JERK). Please remove it from Configuration.h.""

So comment out #define JUNCTION_DEVIATION in Configuration_adv.h
Open up Configuration.h and enable this block of code by removing the //'s from the 3 lines.
// #if DISABLED(CLASSIC_JERK)
//   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
// #endif

Edited 2 time(s). Last edit at 10/29/2019 08:12PM by Dust.
Re: Setting Junction Deviation in firmware has no effect
October 29, 2019 09:06PM
Yes, that's the error. Sorry for not posting the exact words. I haven't actually seen it for over a week. I'm just coming back to this issue since I got everything else working on the printer.

I did as you suggested with no change to the symptoms.
[github.com]

Although I did try exactly what you suggested, I knew it wouldn't change anything. I already had the define for JUNCTION_DEVIATION_MM outside of any "if" on line 668 of Configuration_adv.h. I commented it out before compiling with your suggested changes. That should have already been doing the exact same thing as what you suggested would have done for me, and I'm reasonably certain that your suggestion is the very first thing I tried when I first tried to tackle the issue, and I got to what's there now after things didn't work as expected.

Thank you for your time and suggestion.

Edited 1 time(s). Last edit at 10/29/2019 09:25PM by costmo.
Re: Setting Junction Deviation in firmware has no effect
October 31, 2019 07:12AM
Should I report this as a bug? Am I mistaken to believe that having #define JUNCTION_DEVIATION_MM 0.02 uncommented is all I should need to have a default junction deviation set when the controller board boots?

Is there anything else I can try or any other information i can look into to provide?

Thanks again.
Re: Setting Junction Deviation in firmware has no effect
November 04, 2019 04:56PM
Nobody? Is it possible that this is a bug in the SKR 1.3?

If I don't hear back, this isn't something I've done wrong, and I should report it as a bug?
Re: Setting Junction Deviation in firmware has no effect
November 08, 2019 05:04PM
In troubleshooting further, I discovered that I can set the junction deviation with this:
M205 J0.020

I would then expect to be able to have that setting persist with this:
M500

But power cycling the controller reverts the setting. Am I mistaken to believe that M500 should be saving this setting into persistent storage?

P.S. Any way this thread can be moved to the Marlin forum? I posted to this group on accident, and someone deleted my cross-post when I tried to get a copy of my question to that group - which is significantly more appropriate for the topic than this one is.

Edited 1 time(s). Last edit at 11/08/2019 05:07PM by costmo.
Re: Setting Junction Deviation in firmware has no effect
November 08, 2019 10:41PM
How recent is your firmware?

In configuration_store.cpp bugfix 2.0 It looks correct,
#if DISABLED(CLASSIC_JERK)
        EEPROM_WRITE(planner.junction_deviation_mm);
      #else
        dummy = 0.02f;
        EEPROM_WRITE(dummy);
      #endif

check the above is in your version.

Edited 3 time(s). Last edit at 11/08/2019 10:56PM by Dust.
Re: Setting Junction Deviation in firmware has no effect
November 08, 2019 11:15PM
I just tried this on my SKR 1.3, latest marlin bugfix 2.0

Connecting...
Printer is now online.

>>> m503
SENDING:M503

{lots of crap we don't care about removed}

echo:Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
echo:  M205 B20000.00 S0.00 T0.00 J0.01

{lots of crap we don't care about removed}

>>> M205 J0.020
SENDING:M205 J0.020
>>> M500
SENDING:M500
echo : Settings Stored (616 bytes; crc 10054)
>>> m503
SENDING:M503

{lots of crap we don't care about removed}

echo:Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
echo:  M205 B20000.00 S0.00 T0.00 J0.02

{lots of crap we don't care about removed}

As you can see J changed to 0.02

powered it off and rechecked.. still 0.02

For reference I only changed the following after the git clone
In Configuration.h
#define SERIAL_PORT -1
#define MOTHERBOARD BOARD_BIGTREE_SKR_V1_3
#define EEPROM_SETTINGS
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
In platformio.ini
default_envs = LPC1768

That's it... and I only activated the lcd as I had that connected from yesterday.

Edited 5 time(s). Last edit at 11/09/2019 07:43PM by Dust.
Sorry, only registered users may post in this forum.

Click here to login