Welcome! Log In Create A New Profile

Advanced

Swapping the X and Y axes

Posted by KenF 
Swapping the X and Y axes
May 16, 2014 12:54AM
Hi folks. I'm new on here ... one of those who bought an Ormerod kit from RS without doing much research, and was, how shall we say, 'surprised' by what I got. Having redesigned most of it, I've now got something that works. Anyway, that's a long story.

One thing I found confusing was the arrangement of the X and Y axes of the thing. I normally sit with the end of one of the Ormerod legs nearest me, usually the right leg (not that my printer has those legs any more) and it seems all wrong having the 'origin' of the bed coordinate system at the far corner and 'upside down.' I kept making mistakes when controlling the thing manually with Pronterface.

So I decided to swap the X and Y axes, by plugging the X axis motor into the Y motor header on the Duet board, and vice versa. (I use microswitches for homing all three axes, and so the X and Y microswitch connections are also swapped.) To get the origin near the end of the Ormerod's left foot (if it still had one), the direction of the X axis also needs swapping. That's simply done by plugging the X motor connector onto the Duet board upside down. Surprise, surprise, all four motor connectors are then the same way round, whereas, just to confuse, with the original RRP arrangement the X motor connector is upside down compared to the other three. So now, sitting with the bed heater connectors nearest me, the X axis goes from left to right over the bed heater connectors, and the Y axis goes up the left hand side. Suits me just fine.

What I'd really like is for the X and Y axes to be the new way round, but for the origin to be bang in the centre of the bed. With the origin at the near left corner, it just seems odd that you can't actually print anything at the origin. But the current firmware versions, as far as I understand, don't allow the X or Y coordinate to go negative. Would it be possible to modify the current M208 command (or add another command) to let the user specify minimum, as well as maximum, values for the coordinates?

By the way, very impressed with this forum and the amount of long hard work that some of you are putting in to get the Ormerod to work better.

Ken.
Re: Swapping the X and Y axes
May 16, 2014 02:10AM
Which one is X and Y axis and which way they go is more of a convention than any solid rule, so you should be able to have them any way you want. I guess setting print center at 0,0 in Slic3r should generate valid coordinates as well (+/-100 on X and Y axes).

If you want the origin to be in the center, you could either move to the middle and run "G92 X0 Y0", alternatively when homed and with the print head in the corner, run something like "G92 X-100 Y-100" (or whatever the coordinates might be, depends on which corner you are in). However, I think there is no way to specify "minimum" coordinates for M208 (i.e. what is the biggest negative value allowed), but that it just blocks at zero. To get around that, you either need a firmware change with a new command to specify those values (or a flag saying "these are minimum values"), or you can just disable all the range checking altogether with "M564 S0". That means you can run outside of the travel range of the printer, having motors or belts skip and make noise. I have had that happen quite a lot though, and it has never lead to anything actually breaking (even though it sounds like it).
Re: Swapping the X and Y axes
May 16, 2014 02:35AM
Quote
jstck
... or you can just disable all the range checking altogether with "M564 S0". That means you can run outside of the travel range of the printer, having motors or belts skip and make noise. I have had that happen quite a lot though, and it has never lead to anything actually breaking (even though it sounds like it).

Ah, thanks very much Jstck. I hadn't noticed the M564 command before.

Ken.
Re: Swapping the X and Y axes
May 16, 2014 04:08AM
My bed is completely non standard now and I have a need to go negative on the X axis. I am going to use the "M564 S0". for now, but it would be nice to be able to specify the maximum and minimum range for the X & Y axis.

As a side note, you can edit the homing files to set your zero positions. I have mine set so that 100,100 is exactly in the middle of the glass, which means I can print the full 200x200 if I need.

Regards,

Les


Pointy's Things
Pointy's Blog
Re: Swapping the X and Y axes
May 16, 2014 08:52AM
I've just implemented a change to M208 to allow the user to set lower limits as well as upper limits. Will be released in 0.59b.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Swapping the X and Y axes
May 16, 2014 09:04AM
Quote
dc42
I've just implemented a change to M208 to allow the user to set lower limits as well as upper limits. Will be released in 0.59b.

Man you are efficient! I was going to ask about this in the firmware thread, but you are just too quick!

Regards,

Les


Pointy's Things
Pointy's Blog
Re: Swapping the X and Y axes
May 16, 2014 09:47AM
Surely if you reverse the direction of one of the motors but not the other, your prints are going to come out as mirror images?

I am really not sure why you want to change. The axes are correctly oriented when looking from the Duet enclosure side of the machine, and it is a simple mental transform to visualise the bed that way around when you need to. I'm also not sure why you find it better to have the 0,0 point at the center rather than the bottom left - any graphs that deal only in positive values will have their 0,0 at bottom left, which I would say is far more common than having the negative quadrants available. It is very seldom that you will find physical objects being measured in terms of positive and negative offsets. If you are writing down the measurements of a room, do you note the position of windows and doors etc. as + and - distances from the center of the floor, or as only + offsets from one corner? With most of my designs I will put the origin at the bottom left corner of the design unless it is pretty much a symmetrical part. The majority of blueprints and data sheet drawings also have a corner as an origin unless there is good reason to express measurements from a different place.

Dave
(#106)
Re: Swapping the X and Y axes
May 17, 2014 12:49AM
Quote
Pointy
Quote
dc42
I've just implemented a change to M208 to allow the user to set lower limits as well as upper limits. Will be released in 0.59b.

Man you are efficient! I was going to ask about this in the firmware thread, but you are just too quick!

Regards,

Les

I'll second that. Thanks very much Dave!
Re: Swapping the X and Y axes
May 17, 2014 01:26AM
Quote
dmould
Surely if you reverse the direction of one of the motors but not the other, your prints are going to come out as mirror images?

Indeed, Dave, they will. But I've also swapped the X and Y motor connections to the Duet, and that on its own also makes them come out as mirror images. The two mirror images combined result in no mirror image, but a rotation of 90 degrees and a translation of the origin.

Quote
dmould
I am really not sure why you want to change. The axes are correctly oriented when looking from the Duet enclosure side of the machine, and it is a simple mental transform to visualise the bed that way around when you need to.

It's mainly a case of personal preference. Also, what one person may find as a simple mental transform, another befuddled old person like me may find difficult.

Quote
dmould
I'm also not sure why you find it better to have the 0,0 point at the center rather than the bottom left - any graphs that deal only in positive values will have their 0,0 at bottom left, which I would say is far more common than having the negative quadrants available. It is very seldom that you will find physical objects being measured in terms of positive and negative offsets. If you are writing down the measurements of a room, do you note the position of windows and doors etc. as + and - distances from the center of the floor, or as only + offsets from one corner? With most of my designs I will put the origin at the bottom left corner of the design unless it is pretty much a symmetrical part. The majority of blueprints and data sheet drawings also have a corner as an origin unless there is good reason to express measurements from a different place.)

Again, it's mainly a case of personal preference. But is also means: (1) I can actually print at the origin without fouling the RRP fold-back clip (till I've got rid of it); (2) The origin is at the same place as it was when I was designing the item with DesignSpark Mechanical (the only 3-D drawing program I've played with so far); and (3) the centre of the bed around which all the action takes place has the same coordinates (0, 0) regardless of whether I'm thinking in millimetres, centimetres or inches.
Re: Swapping the X and Y axes
May 17, 2014 03:23AM
Although I'm not planning to put the bed centre of my machine at (0,0) I do want to shift the x origin to a negative value so that x=0 is the edge of the bed. Slic3r can cope with an offset, but Cura cannot.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Swapping the X and Y axes
May 17, 2014 10:09AM
If you want the origin on the edge of the bed, put something like M206 X10 at the end of your homex.g. This effectively send G1 X10 and G92 X0, which does the same thing.
It's odd that Cura doesn't support a central bed origin (though I haven't checked), as I think Ultimaker used to use the centre of the bed as 0,0 and Cura is developed by them!

Ian
RepRapPro tech support
Re: Swapping the X and Y axes
May 19, 2014 08:11AM
I found a bug in your firmware this weekend, David. I haven't updated for a few weeks (I was using 057zb) so maybe it's fixed now.

I had a print that was a bit bigger in Y than the bed size I have set in config.g, but would still just fit on the glass. So I sent the "M564 S0" command by hand to remove the firmware limit and started the print. The octagonal outer perimeter printed fine (outside the bed limits). The infill also worked fine at first - but then it suddenly did about 10 short and overlapping infill lines at the Y bed limit, and then the 45 deg infill lines changed direction by about 5 degrees and it started filling beyond the perimeter (with the Y movement larger than the print or bed size). The 2nd layer started printing fine (so the position was still correct) but then did the same thing at a different place when infilling. Thinking it was a Slic3r bug, I re-sliced with Cura, but the same thing happened. That's when I realised it must be a firmware issue. I increased the bed size in config.g, set a new center coordinate and ran exactly the same G code file, which then worked OK.

Dave
(#106)
Re: Swapping the X and Y axes
May 19, 2014 08:54AM
Hi Dave, I'm surprised that it printed outside the bed limits at all using 057zb, because I didn't implement M564 until version 059-beta2.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Swapping the X and Y axes
May 19, 2014 09:19AM
Quote
dc42
Hi Dave, I'm surprised that it printed outside the bed limits at all using 057zb, because I didn't implement M564 until version 059-beta2.

That probably explains it!
Yes, it definitely printed for quite a distance outside the bed limit. The base of the part is only 2 mm bigger than the bed I'd set. The outer perimeter appeared to print the correct size - I did not measure it but the skirt was outside the part. The infill printed to about 5mm outside the skirt.

I'm always wary of updating firmware when I'm in the middle of getting prints I need, but I'll update to your latest sometime this week. I wish Cura was a bit more versatile - this particular part has a base that fits on the glass, but has a bracket that is built up at 45 degrees and overhangs the base by 12mm. Both Slic3r and Cura include that overhang when positioning the print on the center of the bed - but of course in this case I want the overhang to print off the edge of the glass. I can adjust Slic3r's center coordinates, but not Cura's, and trying to move a print into an exact position with the mouse and no numerical references is impossible.

Dave
(#106)
Re: Swapping the X and Y axes
May 19, 2014 09:56AM
Dave, in my latest (experimental) firmware, you can set the lower limit of axis travel as well as the upper limit. So you can set the x-homing position to e.g. X=-10 so that X=0 is the edge of the bed, if that helps you use Cura. I have my axis limits set so that they reflect the amount of movement available, even though that exceeds the bed dimensions.

You are quite right to be wary of updating firmware when you have something that is working well for you. Just be careful not to rely on a new feature or bug fix that isn't in the version you are running.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Swapping the X and Y axes
May 20, 2014 10:58AM
Quote
dc42
You are quite right to be wary of updating firmware when you have something that is working well for you. Just be careful not to rely on a new feature or bug fix that isn't in the version you are running.
I'd be fine if you weren't fixing and improving things faster than I can update my firmware! :-)

I loaded your latest last night. I've set my bed size to 240 X 240 and set the center to 120,120 in Slic3r and Cura, also adjusted the "park" position, so I don't have to worry about firmware limits now. I should have done that a while ago.

Dave
(#106)
Re: Swapping the X and Y axes
May 20, 2014 11:19AM
Bear in mind that the point of the firmware limits is to protect you from commanding a move outside the physical limits of the machine, which isn't good for the drive belts.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Swapping the X and Y axes
May 20, 2014 11:48AM
Quote
dc42
Bear in mind that the point of the firmware limits is to protect you from commanding a move outside the physical limits of the machine, which isn't good for the drive belts.

The most common times that happens with me is if something goes wrong during homing (e.g. a wire fallen off the Y limit switch), which the firmware limit won't prevent. I'll find and enter the physical limits somewhen, or maybe put them back to 200,200 in firmware and put a "remove limits" command in the start code and "apply limits" in the end code, seeing that it is unlikely that the physical limit will be exceeded by the print file even if I want to print an overhang outside the glass - other than homing errors it's usually caused by finger trouble while manually setting up the machine to print.

Dave
(#106)
Re: Swapping the X and Y axes
May 20, 2014 02:42PM
Quote
dc42
Dave, in my latest (experimental) firmware, you can set the lower limit of axis travel as well as the upper limit. So you can set the x-homing position to e.g. X=-10 ...

Thank you much for this, Captain snot-cutter will be very happy, now he can blow the nozzle's nose outside the bed

Erik
Sorry, only registered users may post in this forum.

Click here to login