Welcome! Log In Create A New Profile

Advanced

Homig & Go to dump area

Posted by TinHead 
Homig & Go to dump area
February 15, 2012 05:12PM
Hi,

I noticed that in the latest release of the host the "Go to dispose area after job/job kill" option in the Printer Setting menu does not apply consistently anymore.

So a lot of time it happens the after a print is finished the head is left on top the part and I have to home by pressing the manual controls.
Sometime it works but that happens rarely :/ This is true also if after the print is done and it get's stuck I hit the "Go dump area" ... nothing happens unless I home the machine first.

The same applies if the job is killed, sometimes it goes to the dump area but more frequently it just remains there.

I mentioned before I have been having issues with homing and in the mean time I'm pretty sure it's not hardware related:

1. Starting the machine un homed - I know you said that it should home but well it does not, even if the position of the unhomed axis is close to the homing switch. If I press the home button the motors are enabled and they just twitch a little, then the firmware blocks waiting for the switch to trigger. If I trigger the switch manually then the software starts working again but usually the axis is unusable, I get no response out of it whatever I send positive or negative moves. My guess is that at that point the counters get screwed up somehow, possibly being set to a very large negative value, as sometimes if I hit positive +100 and I'm not going over the software maximum set in the firmware I can get it to move.

This behavior happens sometimes after it finishes a print usually on Y remaining stuck in the last position, it might be related to the go to the dump command.

This never happens when I start the machine homed, and it would not be an issue if all the time the machine would be homed at shutdown but there are situations when it just a lot faster to just unplug the beast smiling smiley

2. I think it would be great if a simple debouncing would be done when checking if the home switch has been hit, with mechanical switches it happens you get a false positive just before it is actually "clicked". I think I could add that as a simple double read instead of a single.

Cheers!
Re: Homig & Go to dump area
February 16, 2012 12:43PM
I have to give you 10 points for your analysis.

1. Go dispose is dangerous if you move without having defined your position. Thats why go dispose only moves if the host has seen a home command. In the next host version (0.35), you can use
@isathome
to tell the host, that your printer position is at home, so go dispose will work. This host command is meant for people having no endstops or not using them.

2. The start position wasn't initialized to 0 causing software endstop to be triggered when not in rang 0 - maxAllowed. Changed this to init with 0 in the last update on Github. Make sure you have no min software endstops enabled, otherwise you will never get to the left side. I hope this should already make the homing work for you.

3. The endstop code was written with optical endstops in mind. A second read directly after the first is not enough. You have to add at least 20ms time difference, which is a problem, because it has to happen inside an interrupt route called with up to 30000 Hz. But this shouldn't be the greatest problem. The endstop during homing is always tested twice and for x and y it isn't a big deal if it is enabled 0.1mm earlier or not. Only for the Z-Axis it is important to be exact. There you could debounce it electronically, use a switch without bouncing or use a photocell.


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: Homig & Go to dump area
February 17, 2012 04:39AM
Ah good, thanks for looking into it.

About point 3, I thought as much, I think I'll have to build an optical switch for Z it should be much more precise.
Re: Homig & Go to dump area
February 19, 2012 06:22AM
OK feedback:

1. I understand your point I'll try that

2. I have added your patch to initialize at start but still I get the exact same behavior. I do not have software MIN limits enabled, and they were not enabled before. The weird part is that I have seen no one else complaining, is homing really unused? I mean at least for Z anyone should employ homing ...

3. I have made the optical switch it seems to work better.
Re: Homig & Go to dump area
February 19, 2012 06:56AM
You are the only one complaining that the endstops/homing doesn't work. How does it work with your new optical switch? Does homing for z now work?

There is not much, you can set up for endstops:

//// Endstop Settings
#define ENDSTOPPULLUPS 0 // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
//set to true to invert the logic of the endstops
#define ENDSTOPS_INVERTING false
//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here

If you have no resistors after your switch, you will have ENDSTOPPULLUPS, otherwise you get a short. So the default without anything connected is enabled.
Then you need ENDSTOPS_INVERTING true, so the default is high=not hit.
Your switch is connected to gnd and a closing switch? That way hitting the switch brings the signal to low and the endstop is triggered.

Is that the way you connected your switches?


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: Homig & Go to dump area
February 19, 2012 07:16AM
Homing works on all axes except the case of starting up un homed.
My new Z optical switch works better than the mechanical one as expected.

My setup is:

//// Endstop Settings
#define ENDSTOPPULLUPS 1 // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
//set to true to invert the logic of the endstops
#define ENDSTOPS_INVERTING false
//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here

-----

// Inverting axis direction
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false

//// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

//If true, axis won't move to coordinates less than zero.
#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false

//If true, axis won't move to coordinates greater than the defined lengths below.
#define max_software_endstop_x true
#define max_software_endstop_y true
#define max_software_endstop_z true

// You can disable endstop checking for print moves. This is needed, if you get sometimes
// false signals from your endstops. If your endstops don't give false signals, you
// can set it on for safety.
#define ALWAYS_CHECK_ENDSTOPS true
// maximum positions in mm - only fixed numbers!
#define X_MAX_LENGTH 200
#define Y_MAX_LENGTH 200
#define Z_MAX_LENGTH 100

My home switches for X and Y and the optical for Z are configured to stay low when not hit, go high when hit. For the mechanical this means that they are tied to GND when open and are pulled up by the internal pull-ups when closed. The optical one works like this also.

So to be clear: Homing works in normal operation, the problem is only when I start un homed.
Re: Homig & Go to dump area
February 19, 2012 07:39AM
> So to be clear: Homing works in normal operation, the problem is only when I start un homed.

So was always thinking in the wrong direction. If homing works, the endstop management is ok.
On the other hand you wrote " If I press the home button the motors are enabled and they just twitch a little, then the firmware blocks waiting for the switch to trigger." which says that homing doesn't work.

So you got me totally confused and I'm not sure I understand your problem.

I can move the head in any direction after the start without homing and have max_software_endstop enabled. As I understand your latest version you can't move the head at all, unless you do a home for that axis?


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: Homig & Go to dump area
February 19, 2012 08:02AM
Ugh it's hard to explain stuff in a non native language, OK let's try again:

My problem is that when I start up the machine un homed (meaning with one or more axis-es not on the home switches), what happens is that I can move the un homed axis only to the positive side (so +10 for example) not the negative (-10 for example).

Now if in *this* state I press home for that axis the motor is enabled but it does not move towards the home switch, it only twitches a step or so.

All I wrote was in this context, sorry for the bad explanation :/
Re: Homig & Go to dump area
February 19, 2012 08:18AM
English is also not my language, so double the language problem.
I see wee have different definitions of un-homed. For me un-homed is just before you do a G28 home-command.

Lets see, if I get it right.
Going to the positive side is never a problem. Thats understandable, because no endstop is tested in that direction.

If I understand you right, if you enable the printer with switches pressed, you can go to the positive axis and come back?

If you start somewhere else, homing does nothing not even going to the positive dir for a short time and going back?
The way homing works is go left until you trigger the switch, go right 5 mm, go left 10mm or until switch is hit. You see nothing of it at all.
As going to the right is no problem i would expect at least the 5mm move to succeed.

If I unterstand everything right, the big question is why the switches send the correct signal, when you start with them triggered and don't work if started anywhere else.


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: Homig & Go to dump area
February 19, 2012 08:36AM
OK I mean the hardware home smiling smiley

Quote

Going to the positive side is never a problem. Thats understandable, because no endstop is tested in that direction.

Yup indeed.

Quote

If I understand you right, if you enable the printer with switches pressed, you can go to the positive axis and come back?

Exactly it goes positive 5 mm, then back 10mm and finds the switch it expects. This does not happen if the hardware is not touching the switch at startup :/

Quote

If you start somewhere else, homing does nothing not even going to the positive dir for a short time and going back?

That's right.

Quote

As going to the right is no problem i would expect at least the 5mm move to succeed.

Nope nothing there.

Quote

If I unterstand everything right, the big question is why the switches send the correct signal, when you start with them triggered and don't work if started anywhere else.

Well I measured them and I get low on all ... not sure what to think about this.
Re: Homig & Go to dump area
February 19, 2012 09:04AM
That is a really strange problem. I'm quite sure it has nothing to do with the firmware.

Have you tried to measure the voltage on the arduino pin for the switch during your tests? You wrote
"My home switches for X and Y and the optical for Z are configured to stay low when not hit, go high when hit. "
but did you verify that is really behaves that way? I currently tend to believe the hardware does not what it should do.

How does your Z-Endstop work, now that it's optical. Does it behave the same as your switches (I say switches but I hope you meant and used push buttons, not real switches if you know what I mean).


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: Homig & Go to dump area
February 19, 2012 09:48AM
Perhaps cross talk between the motor cables and the endstop cables cause it get a false positive and stop early? Have you run the cables together?


[www.hydraraptor.blogspot.com]
Re: Homig & Go to dump area
February 19, 2012 10:43AM
I don't have the wires run together, so no crosstalk. I'll investigate further when I get some time, for now I'll just make sure I always start it up homed.
Re: Homig & Go to dump area
February 19, 2012 11:31AM
What happens if you start un-homed but with your finger over the switch?


[www.hydraraptor.blogspot.com]
Re: Homig & Go to dump area
February 19, 2012 12:59PM
Oh that's a good question!

I'll try this and report back.
Sorry, only registered users may post in this forum.

Click here to login