MPos is not 0 after homing

Répondre
3DStyle
Messages : 108
Enregistré le : 22 févr. 2018 14:34

MPos is not 0 after homing

Message par 3DStyle »

Hello,

After homing cycle, the MPos should be 0 for X,Y and Z axies.
However, after homing, the MPos on my CNC with 32-bit board is not 0, but a negative number. Why? How can I make it to be 0?
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: MPos is not 0 after homing

Message par mstrens »

There is a convention in CNC word that says that 0 is on the back and right and it moves positive when it goes to the back and right.
So, it means that the Mpos are always negative.

On rs-cnc, the end switches are at front+left.
When you perform a Home, GRBL automatically set X and Y on the negative width and length of the machine as defined in the GRBL parameters.
So when you move the machine to the limits back and right, Mpos is 0.

If you do not like this convention, it is possible to change it but you have to change some set up from GRBL. See the grbl doc on official grbl site on github.
3DStyle
Messages : 108
Enregistré le : 22 févr. 2018 14:34

Re: MPos is not 0 after homing

Message par 3DStyle »

Thank you for clarifying that mstrens.

I want that my machine will home at front + left, therefore $23 is set to 3 (homing is X- Y- Z+), but the MPos is still negative and not 0 after homing.

Can you please tell me what setting need to be changed in order to achieve 0 MPos after homing? I can't find the solution for it.
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: MPos is not 0 after homing

Message par mstrens »

in config.h file (for grbl), there is this text

// After homing, Grbl will set by default the entire machine space into negative space, as is typical
// for professional CNC machines, regardless of where the limit switches are located. Uncomment this
// define to force Grbl to always set the machine origin at the homed location despite switch orientation.
// #define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.

remove the // at the beginning of the last line.
#define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.

Note: I am not sure that GRBL will check soft limits in this case. So test it carefully.
3DStyle
Messages : 108
Enregistré le : 22 févr. 2018 14:34

Re: MPos is not 0 after homing

Message par 3DStyle »

Thanks, it's working well! I appreciate it.

By the way, about the Tool menu in the LCD screen. Is there any way to modify the parameters for each button?
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: MPos is not 0 after homing

Message par mstrens »

Yes, some commands behind the buttons are in the config.h file (from esp32)
Read the description, because it uses special codes to capture/restore some GRBL parameters.
reis
Messages : 30
Enregistré le : 03 janv. 2019 23:16

Re: MPos is not 0 after homing

Message par reis »

mstrens a écrit : 22 déc. 2020 19:38 in config.h file (for grbl), there is this text

// After homing, Grbl will set by default the entire machine space into negative space, as is typical
// for professional CNC machines, regardless of where the limit switches are located. Uncomment this
// define to force Grbl to always set the machine origin at the homed location despite switch orientation.
// #define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.

remove the // at the beginning of the last line.
#define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.

Note: I am not sure that GRBL will check soft limits in this case. So test it carefully.
i dont have these text lines at my config.h grbl controller

i have on TFT screen when homing
2
2
-2
and i get allways A8 alarm on homing i cant find the solution for this error
i did change the switches and new stm32 aswell got from hteatre same issue.
with bcnc i send $ command and get respons on TFT Nxline Jline SLP C X H ctrl-x]

before using the machine do we have to add some parameters in grbl controller like Mpos etc. becouse im very confused er is planty of information at forum and that makes me confused im strugling with alarm8 hard limit reached when i check on tft for info

Grbl 1.1f ['s' for help]
[MSG; '$H':'$X' to unlock]
[MSG: Caution: Unlocked]

i used shielded cable for switches even between rx tx is single core schielded.
Avatar du membre
HTheatre
Messages : 5962
Enregistré le : 31 mars 2019 08:21
Localisation : Rivesaltes

Re: MPos is not 0 after homing

Message par HTheatre »

Hi reis,

To start your RS-CNC32, you do not need to modify any parameters in GRBL.

I believe I shipped you endstop switches with wheel, isn't it ? I am sorry I can't remember. If it is, your A8 message does not come from the switches themselves, but could come from their wires or a bad solder that you done.

You can do this test. Put jumpers on Endstop X, Endstop Y, Endstop Z and Endstop A pins on the 32bits GRBL board instead of your actuel endstop switches. Place you spindle/router to the center of all axis of your RS-CNC32. Power on your RS-CNC32. BE CAREFUL, DO NOT PERFORM ANY HOMING, YOU DO NOT HAVE ANYMORE ENDSTOPS ON YOUR RS-CNC32. Carefully move your spindle/router without reaching the extremities of the axes. Does the A8 message still appear ? If not, check each of your Endstop lines with a multimeter in ohmmeter mode or continuity mode.

Another thing you can do is to re-calibrate your touch screen. Sometime a bad calibration generate ALARMs. I experienced it. If you are using the last version of the ESP firmware available here, just create a .TXT file you name Calibrate.txt (with a capital at beginning). Do not write anything in the .TXT file. Put it at the root of your SD card then power on your RS-CNC32, SD card inserted. You will be prompt to recalibrate your touch screen. Before to restart your RS-CNC32 with the SD card inserted remember to remove the Calibrate.txt file from the SD card or you will be prompt to recalibrate the touch screen to every starts of your RS-CNC32.

See ya
reis
Messages : 30
Enregistré le : 03 janv. 2019 23:16

Re: MPos is not 0 after homing

Message par reis »

thank you for your reply HTeatre

yes i used your switches even the stm32 i had the same issue i had also spare part of grbl flashed and used
i did same what you suggested me believe me or not i bridged switch pins i whas playing and got angry i pushed on homing :D :D :D :D :D :D
yes i heared crack on z limit switch nothing on x and y you hear pushings on x and y later i connected limit switch cables and whas playing again
and voilla miracle has happened :oops: :oops: :oops: :oops: :D :D :D damn its homing perfectly limit switch on Z axis with forcing came little bit above
that whas the devil no my machine lives like a charme.
btw when i start the cnc i mean powering it starts with an alarm on info it says

Grbl 1.1f ['s' for help]
[MSG; '$H':'$X' to unlock]
nothing else i clear the message it works

tomorrow i will force litlle bit to test what happens and i update the tft

btw on homing i got now different position on tft
Wpos same as for Mpos
-536.00
-566.00
-4.00
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: MPos is not 0 after homing

Message par mstrens »

The alarm at start up is normal.
It is a security feature from GRBL in order to avoid using the CNC as long as you did not perform a home (or after a power down).

It is possible to deactivate this security if you really want.

The values you get for Mpos are normal. As I explained those are based on the size of your machine.
MPos X/Y will become 0 when you reach the end at back and right side.
Répondre