Welcome! Log In Create A New Profile

Advanced

m340 servo sends z0 in eprom

Posted by adambrum 
m340 servo sends z0 in eprom
February 03, 2014 04:08PM
Im having a little problem with servo control,

Firmware version 0.91 rev 4
host 0.95f

If i send script M340 P1 S500 i get "20:49:34.184 : Printer height:0.01" basicaly i sets whtever height im at to 0,

I have tried with different s values and servo0 and servo1 pins and the same result



Really have no idea whats happening ?

I did find another post about this in german but no answer

Thanks Adam

Edited 2 time(s). Last edit at 02/03/2014 04:36PM by adambrum.
Re: m340 servo sends z0 in eprom
February 04, 2014 09:46AM
There was a break; missing in Commands.cpp . Please download the latest version to fix.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: m340 servo sends z0 in eprom
February 04, 2014 11:16AM
One step closer to z-probing smiling smiley

Thanks again for your help
Re: m340 servo sends z0 in eprom
August 20, 2014 03:16AM
I am having the same problem. I am new to this and am missing something here... Inst .91 the latest firmware? is there a way to get the latest commands.cpp file by itself?

If someone could just point me in the right direction on how to fix this I would greatly appreciate it.
Re: m340 servo sends z0 in eprom
August 20, 2014 03:59AM
Just reload from github or online configuration tool. Both are fixed and at the same release,


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: m340 servo sends z0 in eprom
August 20, 2014 09:36PM
ok got it. So I downloaded the newest version from GetHub and went through all the settings in Configuration.h and made them match what I had in my old config.h file. Problem is as soon as I change the #define FEATURE_CONTROLLER X to 13 ( which is what i had before for my Rostock ) it causes the file to fail validation. I messed with it and it actually doesn't matter which option I choose, anything other than 1 or 0 produces the same error when verifying, posted below.


In file included from /ui.h:1142,
from /Repetier.h:271,
from Commands.cpp:22:
/uimenu.h:385:22: error: #if with no expression
/uimenu.h:656:22: error: #if with no expression


Any help would be greatly appreciated.
Re: m340 servo sends z0 in eprom
August 21, 2014 09:24AM
Just tested it and compiling with feature controller 13 and rambo board works perfectly with defaults. So not sureif you changed enything else or if you have a special combination that triggers the compile error. If it does not vanish with a clean version and your config post the config so I can test the compilation with that config.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: m340 servo sends z0 in eprom
August 21, 2014 12:30PM
So I emailed SEEMECNC and as it turns out they modify the firmware with specifics for the Rostock. So they said that I cant just update the firmware as the newer version wont have their custom configurations. Is there any way that I could just get the specific configuration changes necessary in the Commands.cpp to fix the issue with controlling servos?

I have attached the version of firmware that SEEMECNC provides with their changes ( Repetier_Rostock.ino) which works fine except for the servo control, as well as the latest version I got from GetHub with the Configuration.h file updated to match the one from SEEMECNC ( Repetier 0917_updated Configuration H ) which does not pass verification, presumably due to the changes that SEEMECNC has made in other files.

Thanks again for your help!
Attachments:
open | download - Repetier_Rostock.ino (6.1 KB)
open | download - Repetier 0917_Updated Configuration H.ino (6.3 KB)
Re: m340 servo sends z0 in eprom
August 21, 2014 12:34PM
Around line 1397 you need the following patch:

                    s = com->S;
                HAL::servoMicroseconds(com->P,s);
            }
            break;
#endif // FEATURE_SERVO

the break; line was added, that's all.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: m340 servo sends z0 in eprom
August 21, 2014 01:52PM
Awesome! Seriously I cant thank you enough! I thought for sure I was going to be SOL on this. So just to confirm...

This is whats there now:
#if FEATURE_SERVO
case 340:
if(com->hasP() && com->P<4 && com->P>=0)
{
int s = 0;
if(com->hasS())
s = com->S;
HAL::servoMicroseconds(com->P,s);
}
#endif // FEATURE_SERVO

and it should be changed to look like this:
#if FEATURE_SERVO
case 340:
if(com->hasP() && com->P<4 && com->P>=0)
{
int s = 0;
if(com->hasS())
s = com->S;
HAL::servoMicroseconds(com->P,s);
}
break;
#endif // FEATURE_SERVO
Re: m340 servo sends z0 in eprom
August 21, 2014 01:53PM
Exactly


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: m340 servo sends z0 in eprom
August 21, 2014 02:00PM
You sir, are a saint!
Re: m340 servo sends z0 in eprom
September 01, 2014 03:55AM
I have noticed that while printing, the servo seems to twitch just a bit randomly. Is this is know issue that there is a fix for?
Re: m340 servo sends z0 in eprom
September 03, 2014 09:03AM
The servos are controlled by an analog signal (pwm timing) and a simple poti inside servo, so minor work is always there. Also small changes in timing can effect the position. Hard to say which one is the main cause here. Timing is quite long (50Hz) so I think the pwm signal it self is quite stable. Maybe some users with servos can say how precise servos normally hold positions and which servos they used for this.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Sorry, only registered users may post in this forum.

Click here to login