fra589 / grbl-Mega-5X

5/6 Axis version of Grbl, the open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
https://github.com/fra589/grbl-Mega-5X/wiki
Other
341 stars 159 forks source link

Clonned Y axis will home under $HY, but won't under $H #346

Closed ContinenteCNC closed 11 months ago

ContinenteCNC commented 11 months ago

I'm having trouble with homing on a cloned y-axis. I've read several similar topics but couldn't find whats wrong.

If there is any post with the proper answer I would like to take a read. If so, sorry for creating a new topic, but I just couldn't find it.

I have one motor for X axis and two motors for Y axis. No Z axis (it's a 2-axis machine). All axis have independent limit switches.

Switches are working just fine. I have checked with '?'. Both Y switches and also X are showing in serial monitor when they are pressed.

The issue is if I send the commands $HX followed by $HY homming will work just fine. But if I send $H, it will just move X and Y1.

Y2 never moves. Not even after X and Y1 finish homing.

These are my settings:

$0=10 $1=255 $2=0 $3=4 $4=0 $5=0 $6=0 $10=1 $11=0.020 $12=0.002 $13=0 $20=1 $21=1 $22=1 $23=6 $24=25.000 $25=1000.000 $26=250 $27=2.000 $30=10000 $31=0 $32=0 $100=160.000 $101=160.000 $102=160.000 $110=10000.000 $111=10000.000 $112=10000.000 $120=500.000 $121=500.000 $122=500.000 $130=900.000 $131=2000.000 $132=2000.000

In config.h I have just replaced 'Z' by 'Y'

define N_AXIS 3 // Number of axes (3 to 6)

define N_AXIS_LINEAR 3 // Number of linears axis, must be <= N_AXIS

// Axis indexing and names

define AXIS_1 0 // Axis indexing value. Must start with 0 and be continuous.

define AXIS_1_NAME 'X' // Axis names must be in X, Y, Z, A, B, C, U, V, W, D, E & H.

define AXIS_2 1

define AXIS_2_NAME 'Y'

define AXIS_3 2

define AXIS_3_NAME 'Y'

...

define HOMING_CYCLE_0 (1<<AXIS_1)

define HOMING_CYCLE_1 ( (1<<AXIS_2) | (1<<AXIS_3) )

...

define INVERT_MIN_LIMIT_PIN_MASK ( (1<<AXIS_2) | (1<<AXIS_3) ) // using normally closed switches in both Y MIN axis

define INVERT_MAX_LIMIT_PIN_MASK (1<<AXIS_1) // using normally closed switches in both Y MAX axis

I appreciate any help.

Thanks!

ContinenteCNC commented 11 months ago

I re-installed grbl and re-custumized config.h file and now it works.

Sorry.

And congratulations for the awesome firmware you been writing! Impressive coding.