Closed Avataar120 closed 2 years ago
Note : it was the same issue with GRBL ESP32 (but I was not using soft limits)
It is looking like a rounding error. 78.74 * 5 = 393.7 . 393 / 78.74 = 4.991
Where does the X=3.998 come from? On Discord you said 4.991
The soft limit is cause by the combination of positive_direction: false and mpos_mm: 5. With positive direction false, 5 is the low limit, so the travel envelope is 5 .. 315 . 0 is outside that range.
Where does the X=3.998 come from? On Discord you said 4.991
That's true but I tried in the meantime to modify mpos to 4 instead of 5 -> that's why I gave all consistent figures in the issue
The soft limit is cause by the combination of positive_direction: false and mpos_mm: 5. With positive direction false, 5 is the low limit, so the travel envelope is 5 .. 315 . 0 is outside that range.
G0 X0Y0 is trying to move to 3.988, 3.988. If it was X=4 & Y=4 soft limit won't be triggered no?
I modified info message to give more information in the console.
When issuing G0 X0Y0 I get :
[MSG:INFO: Soft limit on X target:3.988 Limits:4.000..314.000] [MSG:INFO: Soft limit on Y target:3.988 Limits:4.000..214.000]
You keep saying 4, but the config file above says 5.
My mistake ... I'm working on 2 computers ... I update config file. It's 4
Even after I fix the rounding problem, there will still be a slight offset because internal positions are stored in integer steps.
Assume that mpos_mm = 4 and steps_per_mm = 78.74. Thus 4 mm is 314.96 steps, but we cannot store 314.96 as an integer, so we round it up to 315. Then if you convert that back to mm you get 4.001 .
The easiest way to deal with this problem is not to work right up to the limit. Set your work zero a few millimeters inside the limit envelope.
I've found a dirty patch that works well for me. Issue was more to inform you of this rounding problem
Thanks for your quick analysis :)
Oh, by the way, G0 X0 Y0 tells us nothing about whether it is inside the limits . Limits are in machine coordinates, while G0 is in work coordinates unless you say G53 .
I'm not at all an expert in GCODE for machining as you can see :)
What I can say is that my GCODE is like that : G00 G17 G40 G21 G54 G90
Then blabla
Then G0 X0Y0
As machine position is X=3.988 Y=3.998 and work position is 0 0 after homing, I assume G0 X0 Y0 will come back to work position 0 0 so meaning machine position 3.988 3.988 which triggers the alarm
Any way, thanks. I took your fix + my workaround and it's working for me.
Read about work coordinate systems. You should set the work offset explicitly instead of relying on a default value
I think that all the topics raised in this issue have been addressed. File a new issue if not.
Controller Board
Perso 4 pack board
Help From Board Vendor
Machine Description
K40 with MXL belt & pulleys. Steps / mm = 78,74 and not 80 like if I were using BT2 Pull offs are 5mm on X & Y axis mpos are 4mm on X & Y axis
Configuration file
Startup Messages
User Interface Software
Lightburn
What happened?
After homing, I'm expecting to get X=5 & Y=5 when issuing ? command But I get X=3.988 & Y=3.988 instead
When my job is finishing, lightburn calls G0 X0 Y0 to come back to home position. Soft limit is triggered with message :
[MSG:INFO: Soft limit on X target:3.988] [MSG:INFO: Soft limit on Y target:3.988]
Don't know if it's coming from my weird steps / mm and calculations coming with.
Other Information
No response