1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Marlin for the R2 - UBL Enabled

Discussion in 'Mods and Upgrades' started by WheresWaldo, Sep 8, 2017.

?

Would you like to see U.B.L. enabled for the R2?

  1. Of course!

    24 vote(s)
    92.3%
  2. Not really.

    1 vote(s)
    3.8%
  3. Why are you wasting your time with this?

    1 vote(s)
    3.8%
  1. sgomes

    sgomes Active Member

    Joined:
    Dec 29, 2016
    Messages:
    136
    Likes Received:
    55
    Oh, I think I figured it out. The gcode.cpp and gcode.h files shouldn't be there anymore, since they were renamed to parser.cpp and parser.h in a previous version of Marlin. Removing them makes it compile correctly. :)
     
    mark tomlinson likes this.
  2. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,865
    Likes Received:
    3,561
    Glad you figured it out
     
    sgomes likes this.
  3. Gary Boyce

    Gary Boyce Member

    Joined:
    Feb 26, 2016
    Messages:
    118
    Likes Received:
    22
    I am attempting this on a MKS GEN 1.4. I changed the board to

    Code:
    // The following define selects which electronics board you have.
    // Please choose the name from boards.h that matches your setup
    #ifndef MOTHERBOARD
      #define BOARD_MKS_13  // [MKS GEN 1.4]
    #endif
    I am getting this error:
    boards.h:150:46: error: operator '==' has no right operand
    #define MB(board) (MOTHERBOARD==BOARD_##board)
    ^
    sketch\pins.h:106:7: note: in expansion of macro 'MB'
    #elif MB(MKS_13)
    ^
    exit status 1
    operator '==' has no right operand

    Have I defined the board improperly?
     
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,544
    Likes Received:
    7,062
  5. Gary Boyce

    Gary Boyce Member

    Joined:
    Feb 26, 2016
    Messages:
    118
    Likes Received:
    22
    The problem was that I defined the board as
    Code:
    // The following define selects which electronics board you have.
    // Please choose the name from boards.h that matches your setup
    #ifndef MOTHERBOARD
      #define BOARD_MKS_13  // [MKS GEN 1.4]
    #endif
    instead of

    Code:
    // The following define selects which electronics board you have.
    // Please choose the name from boards.h that matches your setup
    #ifndef MOTHERBOARD
      #define MKS_13  // [robo]
    #endif
    After changing to MKS_13 from BOARD_MKS_13 it compiles.
    Thanks for pointing me in the right direction.
     
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,544
    Likes Received:
    7,062
    Compilers are really pedantic :)
     
    supercazzola likes this.
  7. Lance Weston

    Lance Weston Active Member

    Joined:
    Jun 2, 2018
    Messages:
    125
    Likes Received:
    42
    Robos labeling is just wrong, the actual pins are correct.
     
    supercazzola likes this.
  8. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,865
    Likes Received:
    3,561
    I have no idea, which earthly message you are quoting.
     
    supercazzola likes this.
  9. RinTinTin

    RinTinTin New Member

    Joined:
    Feb 12, 2019
    Messages:
    3
    Likes Received:
    0
    First, thanks to everyone for the hard work on this.
    After reading through all posts (several times), I eventually got it to work and the first print was pretty good.
    I ran into a problem, though: I was trying to move down the build bed but in fact in moved up into the extruder. I did some investigation and found that it would move up when setting the resolution to 0.1 mm and 1.0 mm, it actually moves down (about 0.2 mm) when setting it to 10 mm - really strange. „Up" is alway going up (just not at the correct resolution), so it is not reversed.
    I have the same behavior in the web-interface, directly on the printer and also when I enter it into the terminal. G1 Z0.1 goes „up“ by about 10 mm same as G1 Z1.0 or G1 Z-1.0 - only G1 Z10 moves down slightly.
    I reset the EEPROM defaults and it works again correctly. As soon as I run G29 P1 I seem to have the problem.
    It seems like no one else was having this problem, otherwise I assume it would have been posted somewhere (or maybe I missed it). Does anyone have an idea? If I can’t fix this I would have to go back to the Robo release without UBL. :(
    Moving into x and y direction works fine...
     
  10. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,865
    Likes Received:
    3,561
    That actually sounds like a Marlin issue, have you checked there to see if there was an issue with 1.1.9. Also I think someone here updated marlin for the R2 to version 2.0. That is the latest version of Marlin. But I believe that more stuff in the original UI is broken if you upgrade to 2.0, I just don't know what exactly is broken.
     
  11. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    266
    Likes Received:
    85
    Actually, I did have this problem when I first started UBL. The reason (for me) was that when I reset EEPROM, I did not set my z-offset before issuing the G29 P1 command. Anytime you reset the EEPROM or reload the firmware, the FIRST thing you need to do is set the z-offset; before doing anything else. If you don't, the printer will act like it is right now. I don't know why, but it does make sense. Before it can perform G29, it has to know where z=0.

    Don't forget to issue M500 after setting M206 Z#.###
     
    #171 adikted2astro, Nov 8, 2019
    Last edited: Nov 8, 2019
  12. RinTinTin

    RinTinTin New Member

    Joined:
    Feb 12, 2019
    Messages:
    3
    Likes Received:
    0
    Thanks for the replies. I actually did do the z-offset and it also showed up correctly in the EEPROM - also after running UBL. Also printing is working alright (I guess the gcode uses absolute numbers for setting the z value - I am not an expert here).
    I am using Waldo's 1.1.8 release - I was not able to compile 1.1.9., I ran into several errors.
    Shall I try downgrading from Robo OS 2.0 to 1.xx? Is that worth trying?
     
  13. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    266
    Likes Received:
    85
    Not sure. I think I'm actually running 2.0 and my UBL is perfect. I'll see if I am or not.
     
  14. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    266
    Likes Received:
    85
    Yep, I'm definitely running 2.0. Not sure what the problem is on your end. UBL can be hard to do (for me anyway). I definitely had lots of trouble when I first started doing it but now I'm doing good every time.
     
  15. RinTinTin

    RinTinTin New Member

    Joined:
    Feb 12, 2019
    Messages:
    3
    Likes Received:
    0
    Are you running Marlin 1.1.8 or 1.1.9?
     
  16. adikted2astro

    adikted2astro Active Member

    Joined:
    Aug 10, 2017
    Messages:
    266
    Likes Received:
    85
    1.1.8 actually
     

Share This Page