Close



Results 1 to 10 of 757

Hybrid View

  1. #1
    Hi I was hoping someone could help me, ive just tried to change a new version of marlin_main.cpp with the new code youve supplied but i cant get it to compile in arduino. Keeps pointing to the static float probe_pt saying too few arguments to function. I must have done something wrong but cant see what it is.
    Any help is much appreciated.

  2. #2
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by brainscan View Post
    Hi I was hoping someone could help me, ive just tried to change a new version of marlin_main.cpp with the new code youve supplied but i cant get it to compile in arduino. Keeps pointing to the static float probe_pt saying too few arguments to function. I must have done something wrong but cant see what it is.
    Any help is much appreciated.
    Not a big deal! Go back and re-read the directions: Pay attention to the part in BOLD: Holler if you have any more problems or questions...


    • At the top of the newly inserted code, enable one of the four lines that corresponds to your printer's configuration. If your origin is at the front left of your bed, you don't have to do anything. That is enabled by default.


    //#define ORIGIN_BACK_LEFT
    //#define ORIGIN_FRONT_RIGHT
    //#define ORIGIN_BACK_RIGHT
    #define ORIGIN_FRONT_LEFT


    • Search for the probe_pt() function. It will look like this: static float probe_pt(float x, float y, float z_before) Delete it. It is roughly 20 lines long. Replace it with the probe_pt.c code attached to this post.



    • Save the changes to Marlin_Main.cpp and pull your Configuration.h file into the text editor.
    Last edited by Roxy; 06-23-2014 at 08:03 PM.

  3. #3
    Yeah done that, deleted and replaced code, origin already at front left. Still says too few arguments. Thank you for the fast response. I'll try and do the whole thing again in the morning, it's 2:25am here.

  4. #4
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by brainscan View Post
    Yeah done that, deleted and replaced code, origin already at front left. Still says too few arguments. Thank you for the fast response. I'll try and do the whole thing again in the morning, it's 2:25am here.
    It's possible the code base has been updated... And if that is the case, I'll need to warm over the patch. I'll take a look at it in the morning. One way or the other, we'll get it going. Can you .ZIP up your Marlin directory with all the files and attach it to a post? I'll do a DIFF of all the files and figure out what is sick. And with a little luck, I'll be able to get it fixed. And then I'll upload that as a .ZIP file for you to grab.

    Update:

    I just took a quick look at the current code base on Erik Zalm's site. Not much has changed for 2 or 3 months. So, the easiest way to proceed is what I suggested up above. .ZIP up your code and attach it to your next post. I'll do a diff and probably be able to fix it pretty quickly.
    Last edited by Roxy; 06-23-2014 at 09:51 PM.

  5. #5
    Quote Originally Posted by Roxy View Post
    It's possible the code base has been updated... And if that is the case, I'll need to warm over the patch. I'll take a look at it in the morning. One way or the other, we'll get it going. Can you .ZIP up your Marlin directory with all the files and attach it to a post? I'll do a DIFF of all the files and figure out what is sick. And with a little luck, I'll be able to get it fixed. And then I'll upload that as a .ZIP file for you to grab.

    Update:

    I just took a quick look at the current code base on Erik Zalm's site. Not much has changed for 2 or 3 months. So, the easiest way to proceed is what I suggested up above. .ZIP up your code and attach it to your next post. I'll do a diff and probably be able to fix it pretty quickly.
    Thank you so much for helping me so quickly, I just don't understand programming enough so it could be blatantly obvious what I've done wrong. I've probably deleted something I shouldn't have. Your instructions are really clear so i'm annoyed with myself that I haven't just got it going myself. I tried putting everything in a .zip but its still too big to upload. Ive added marlin_main.cpp and configuration.h I will try and upload a .zip of everything if i can get the file small enough. Thank you again.

    Roxy Edit:
    Just make a new directory somewhere on your hard disk and copy all the .h, .cpp, .pde and .py files to it. And then .ZIP that up. It is probably the .obj (or what ever they are called in Arduino) making things too big. But this is enough to get started. I'll see what I can find.

    Roxy Edit #2:
    I checked your Configuration.h file and it looked reasonable. You had a big block of bogus code at the end of the G29 code in the Marlin_main.cpp file. I commented it out so you can see what was there. I tried to compile it but there are some mismatches between the code base you have and what I have. I'll need your entire file set (as a .ZIP file) to go any further. Try the newly attached file: Marlin_Main-Brain_Scan.cpp and see if that helps. It should get rid of a lot of the errors, but I was having trouble getting through the RS232 code with your files in place. You can delete the old Marlin_Main.cpp and replace it with the Brain_Scan version that is attached. I also crossed over the M48 command so when you get it to compile you can check the accuracy of your Z-Probe.

    Roxy Edit #3:
    Just for kicks I tried to compile against my Configuration.h file. I don't have the problems with the RS-232 (serial) code that you do. I found one problem that needs to be changed in your Configuration.h file. At the end, there is a #define for the number of Servo's. You have it set at 1. I realize you only have one servo, but the software is looking at a table of X,Y and Z for the angle locations. This should be set at 3 because it is the third axis and you need to be able to mess with it. I've attached the new file with that too. It is possible this will compile cleanly on your machine with the rest of your files.
    Attached Files Attached Files
    Last edited by Roxy; 06-24-2014 at 12:16 PM.

  6. #6
    Hi Roxy, wow, wasnt expecting you to have gone to so much trouble! I might have had problems with my configuration.h as i've been copying it from an older version so maybe something was changed. After you mentioned something was wrong with it I thought i'd try and start again from scratch and it has compiled now so something must be different. I had to split the files into 3 to get the .zip files small enough, sorry for being a pain. Im just about to try uploading and run some tests. The marlin_brain_scan.cpp wouldnt download so I cant try that yet but M48 was next on my list. I'll see how things go and report back, thank you so much again for your help.

    Roxy Edit:
    I just download the Marlin_main-Brain_Scan.cpp file with no problems. Maybe you should try again? I'll wait to hear from you before I do anything with the 3 .ZIP files.
    Attached Files Attached Files
    Last edited by Roxy; 06-24-2014 at 03:49 PM.

  7. #7
    Hi I just tried again and its downloaded fine this time, weird. The new copy ive made seems to be working better as it compiles and uploads and now when I run a g29 it doesn't do the annoying servo retract every move but at the end the nozzle stays above the bed and cant be moved down to touch it, it actually raises the nozzle a fraction and shows as being at 0. Im using the probe as a z endstop so do I need to change M206 offset? The last code I tried using added the two together so if both had an offset it would double the distance.
    The other thing is the n parameter doesn't seem to have any effect, it always does 3x3 although it moves around in a different pattern. Ive copied the output from the bed level matrix and topology map for you if that is of any help? Might be best to just leave the old copy alone as its a bit of a mash-up of different code. Sorry if i've wasted any of your time.

    22:07:11.001 : Bed Level Correction Matrix:
    22:07:11.009 : 0.999997 0.000000 0.002244
    22:07:11.009 : 0.000000 1.000000 0.001029
    22:07:11.009 : -0.002244 -0.001029 0.999997
    22:07:11.312 : echo:endstops hit: Z:-0.40
    22:08:14.532 : N180 G28 X0 *114
    22:08:15.940 : N182 G28 Y0 *113
    22:08:20.974 : N184 G28 Z0 *116
    22:08:34.858 : N190 G29T0 *94
    22:09:58.962 : Eqn coefficients: a: 0.00 b: 0.00 d: -1.02
    22:09:58.962 :
    22:09:58.966 : Bed Height Topography:
    22:09:58.966 : --0.08199 +0.11606 +0.31254
    22:09:58.970 : --0.27027 --0.05777 +0.11606
    22:09:58.970 : --0.14293 --0.02691 +0.03520
    22:09:58.970 :
    22:09:58.974 : planeNormal x: -0.00 y: -0.00 z: 1.00
    22:09:58.974 :
    22:09:58.974 : Bed Level Correction Matrix:
    22:09:58.978 : 0.999997 0.000000 0.002283
    22:09:58.978 : 0.000000 1.000000 0.001003
    22:09:58.982 : -0.002283 -0.001003 0.999997
    22:09:59.285 : echo:endstops hit: Z:-0.40
    22:10:43.899 : N213 M81 *58

    p.s Is there anyway to have the nozzle lift before the servo retracts at the end of G28 and G29? A few other people wanted the same thing and i'd tried using some of their code which might have caused me these problems in the first place. Thank you again for all the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •