Dual Endstop - Squaring, setting offsets

It is an honest question. I think Dark is calling mach3 and LinuxCNC real time controllers. But the term “Real Time” has a different technical meaning to me. I was just trying to clarify. Micro controllers are more real time than either windows or linux. Although I can see the confusion, because Linux CNC runs on the real time version of Linux, and I assume Mach is similar with windows.

1 Like

No, Mach runs on Windows 7-10… I even double checked before I replied. I’m sure there are a number of hacks/settings changes made to minimize the argle-bargle of having an update kick off mid-job, but it’s still the Windows kernel under the hood.

And as much as I hate to admit it, you’re right, even the RT Linux kernel isn’t quite real-time. But it’s a damn sight better than any other micro-kernel architecture available to consumers out there. And micro-controllers are, in fact, real-time controllers. They just don’t have all the bells and whistles that Mach and LinuxCNC have, except via asynchronous mechanisms like CNC.js and the like.

Dealing with pedantic engineers is a pain, isn’t it? :wink:

I should take a moment to say that despite my good-natured mockery of Windows, I do understand what you mean. You like having a full-featured system in direct control of the machine, not a middleman. And frankly, if I had the resources (including the time), I’d build out a LinuxCNC controller for my setup. :slight_smile:

But I don’t, so I’ll keep working with a gcode sender talking to a microcontroller, with perhaps a hardware e-stop wired in for safety.

Bit late to the party here, but found this thread as I’ve just had to rebuild my MPCNC to put taller legs on.

Have just drawn the largest rectangle I can draw (550mm x 300mm) and measure across the diagonals. I’m now out by four mm across the diagonal. The diagonal should be 626mmm. I have 628mm and 624mm.

I though I understood the principle in the original post but apparently all M666 does is adjust the end stop position. I thought it would apply a slight adjustment in firmware to compensate for the unsquareness of the bed, e.g. apply 101 steps occasionally instead of 100 steps.

Is this the only way to adjust for unsquareness and do I have to dismantle everything again :frowning:

Thanks

Rob

Have since found bed skew so that might well do what I’m after. I think 4mm is to much to just let stay.

Rob

I’m a linuxcnc convert myself. It just plain feels more like a big boy machine! (I’m in no way knocking anyone elses setups and do know for my self that arduino solutions are entirely capable. It’s reasonable to argue that at the hobby level that anymore functionality than marlin/grbl provides is just superfluous)

@darxide head’s up for next time, for less than the price of mach3 you could buy an Mesa ethernet b.o.b. and avoid some hardware dependency issues it sounds like you were having. People are experimenting with rpi+Mesa+linuxcnc for a relatively cheap linuxcnc solution.

You’re thinking a compensation kind of along the lines of bed leveling? The idea is to rack the rails square after finding home. The machine will find the home limit switches, then it will move one of the two motors that are on the same axis by the amount you’ve told it while keeping the other motor at zero, racking x and y rails perpendicular to each other. Because the motors are always engaged after homing and racking no more compensation needs to be made for movements.

@kd2018

Ah that makes more sense, so we’re pulling the frame true by a small amount by holding the frame adjustments against the motors.

As I’m already doing homing, I wonder if my end stops are incorrectly positioned. I took them off whilst I raised the height of the frame and I wonder if I put them on incorrectly. I’m not sure I paid enough attention when I did that.

I’ve just been looking at https://github.com/MarlinFirmware/Marlin/commit/0154e3480c44bf9d96d662382da25afaaf3fd854 about using SKEW_CORRECTION and have just updated my firmware code in platform.io. It’s so long since I’ve updated my firmware I’ve forgotten how to compile (I keep doing ESC-M compile as I use Emacs as my daily editor). Is there any advantage to doing the end stops (assuming I got back and check that they look right) over building the error correction into firmware or using M852 to set it at runtime? It seems pretty simple to do it in firmware OR do it as a scale factor OR do it using M852.

Thanks

Rob

I’m not familiar skew correction or M852. I will admit that in regard to M666 I was lazy and opted to just put the M666 adjustment in my estlecam pp settings rather than bother with reflashing my firmware.

If I remember @vicious1’s instructions correctly if your adjustment is more than 2mm (your belt pitch) then just move stop block back/forward a notch and try again.

Et. al., Can all boards save settings to eeprom or just certain models? I can’t remember.

1 Like

@kd2018

I’m going to try moving the end stops first and see what that does. I’m recompiling the firmware anyway as I want to change the maximum bed size from the default of 200mm (X_BED_SIZE) to 590mm as it was something I should have done months ago. Amazing how long you can tolerate silly issues :slight_smile:

If that doesn’t work the with end stops I’ll investigate the SKEW_CORRECTION.

From memory I think the SKR V1.3 allows saving to EEPROM. I’ll find out very shortly once I work out how to transfer the new firmware via SD card. Normally I’d just attach a laptop but its in the garage, I can’t access the jumper on the SKR MB as I forgot to leave a slot in the case when I built the case . So now I have to export it from platform.io to an SD cad and can’t recall how to do that either.

(Figured it out, see here for neat way to do it Simple way to get platform.io to write to the SD card)

It’s just one thing after another today :slight_smile:

Rob
[edited for clarity]

Found the problem. I had <ahem> forgotten to put back two M8 nuts into the gantry when I reassembled. Put those on and tightened it all up and its spot on (at least to a mm).

I have also fixed the issue with the homing going past 200mm and allowed SKEW_CORRECTION just in case. Seems fine at the moment.

Now back to replacing the spoilboard. Thanks for the help and apologies for high-jacking this thread.

Rob

3 Likes

I was ready to jump in and answer a bunch of questions…but you went and figured it all out. Glad you are back in business.

1 Like

I would stay away from skew correction until you have eliminated everything else. The stuff you described in the first post sounded like normal endstop adjustments.