GRBL and changing machine position reference

Hmm, mine did show 1 short of soft limit range, in the negative domain.

It is not, work zero is anywhere one choose to have it :slight_smile:
I intended only to specify that Machine/Work zero is not related to my typical work flow, MachineZero sets a reference (negative or positive reference do not matter) and Work Zero (Easel Home Position) is where I want my design to be relative to the material to be carved.

This made me think about it some, so I went back and did some testing.

When grbl is built to run in positive space (#define HOMING_FORCE_SET_ORIGIN // Uncomment to enable), then you can access the full range. (0 to soft limit setting).

When grbl is built to run in negative space, you don’t get the full range. the pull off is taken away from the soft limit setting.

@SungeunJeon

This is in version 1.1f

Which way is correct?

Since the pull-off is to avoid a false limit failure from the homed switch, I believe the error is in negative space setting of Machine Zero and that the Machine Zero setting of positive space is correct,

Didn’t read the whole thread, but I’ll try to answer your questions as best I can.

With HOMING_FORCE_SET_ORIGIN enabled, Grbl will set the origin wherever the homing cycle ends, after the pull-off motion. I believe Grbl will operate from zero to the positive or negative max travel of each axis, depending on which side of the axis the homing cycle completes.

Without HOMING_FORCE_SET_ORIGIN, the default, Grbl will set the origin at the homing switch point, NOT where the pull-off motion ends. Grbl will still operate between zero and the max travel of the axes. So, there is a shift between origins the size of the pull-off motion when HOMING_FORCE_SET_ORIGIN is enabled and disabled.

When soft limits are enabled, Grbl does hard checks of the machine coordinate frame with each motion command to ensure everything is between zero and max travel. It should never allow anything outside of that. Just make sure that you are looking at the machine coordinate frame, not work coordinate frame.

2 Likes

@SungeunJeon
I still think there is a problem. I’ve attached two files that show a session using version 1.0c from Inventables with the only change being (Force origin is set) and version 1.1f from Inventables.

My machine is a 500mm so that’s the source of my soft limits.

The most interesting parts are as follows:

Using Positive space (1.0c and quoting just to set apart the G-code not really a quote)

G0 X278 Y278
ok

G0 X290 Y290
ok

G0 X291 Y291
ALARM: Soft limit
[Reset to continue]

Using negative space (1.1f and quoting just to set apart the G-code not really a quote )

G0 X278 Y278
ALARM:2
[MSG:Reset to continue]

I didn’t include the test for 1.1f using positive space, however, when I ran it that way the soft limits responded exactly like the 1.0c test in positive space.

Am I missing some thing here? I always run grbl in positive space (just my preference) so I’m wrapping this up for me. Might be of some concern to those that run with negative space, or I could just be wrong.

Positive_Space_Check.txt (1.4 KB)
Negative_Space_Check.txt (621 Bytes)

Grbl v1.0c has never been an official release of Grbl. Inventables started using an edge version that wasn’t complete. I’m not exactly sure what other things they changed, but I don’t think it’s much. If Inventables has forked and started their own v1.1 version, I don’t know what they altered either. I generally don’t keep track of what others are doing to the firmware.

As for the negative space command, the alarm is proper for the G0X278Y278 command, since it’s moving into positive machine space. It’d provide a soft limit alarm if a motion is greater than G0X0Y0, like G0X1Y1, or less than the max travel G0X-291.

If I understand correctly, you want it to work for your 500mm travel? Just alter the max travel settings to 500mm. Also, you can operate in positive space with the standard build. Just set the G54 work coordinate system frame to bottom left corner. Your machine coordinates will still be negative, but all of your commands (except explicit G53 machine commands) will still operate in positive space.

Isn’t that command moving to a positive Work space? His work zero is at -280, -280 in Machine space. That move would put him at -2,-2 Machine Space.
(the max travel for the 500mm x-carve is 290mm)

@LarryM As I understand it, you must have $22=1 (homing enabled) to set soft limits.
Also, your work coordinate offsets would have to be established.

I think I see my problem. In the testing I used Work position co-ordinates to test soft limits, but I had not established a Work Zero relative to the home position.

If I have some time later on I might test it again with that information on board.

There it is. I assumed you were starting from a work zero.

Wouldn’t G90 vs G91 also affect the way soft limits are triggered?

If you’re in G90, it’s saying go to position +278,+278 which is a soft limits violation and should be flagged as such when in negative space. Positive space should be fine.

If you’re in G91, it’s saying go to Xposition+278,Yposition+278, which may or may not soft limit in either negative or positive space depending on where you’re located.

I’m assuming you’re in G90 mode for this and not G91.