fra589/grbl-Mega-5X

[Solved] Grbl Reset on C axis reverse moves - Triple check pin and port defination in cpu_map

samitray opened this issue · 4 comments

Here is a strange observation on grbl-mega-5x, been a long time user of grbl 3 axis.
Some times i set up one or more rotary axis to make simultaneous jobs, by repeating
the the job at a different offsets, this way i can load another work piece on the first rotary
as the machine starts working on the second rotary job. this works good to two simultaneous
work pieces on A and B axis. Now I wanted to load 3 jobs together, so I setup grbl-mega-5X
with N_AXIS as 6 and N_AXIS_LINEAR 3. Then cleared EEPROM with $RST=*

After setting up the firmware on a stand alone Mega board with nothing connected to any of the
pins. I sent a bunch of test Gcode, All 5 axis XYZAB works OK, but whenever i give any reverse
movement absolute or increment on C axis. grbl always resets with ALARM:3
I have enabled Pin State reporting and grbl does not report any pins trigered.

below is my $$ settings ( note this is a test setup, not on real machine)
$0=10
$1=254
$2=0
$3=0
$4=0
$5=0
$6=0
$10=1
$11=0.020
$12=0.002
$13=0
$20=0
$21=0
$22=0
$23=0
$24=25.000
$25=250.000
$26=250
$27=5.000
$30=12000
$31=550
$32=0
$100=400.000
$101=400.000
$102=400.000
$103=400.000
$104=400.000
$105=400.000
$110=3000.000
$111=3000.000
$112=3000.000
$113=3000.000
$114=3000.000
$115=3000.000
$120=50.000
$121=50.000
$122=50.000
$123=50.000
$124=50.000
$125=100.000
$130=400.000
$131=400.000
$132=400.000
$133=360.000
$134=360.000
$135=400.000

Hi @samitray,

Can you add the Grbl $I command result ?

@++;
Gauthier.

Hi @fra589
Thanks for your amazing port of grbl-Mega-5x and your super quick response for my issue yesterday.
Today morning I checked all the configuration changes and sure enough the Port
definition for C direction was incorrect and caused overlap on the feed hold pin, which may have been
causing the reset (actuall.

So I changed the port definition and everything is happily working as expected. Apologies for causing
the false alarm.

For other going through this post. I suggest to list down all the Pin number and port numbers in CPU map
and triple check, if there are any absurd behavior.

Gauthier, if you ever visit India / Goa I would like to buy you dinner.

Regards
Samit

Hi @samitray,

Thanks for reporting. I'm glad to see you found the source of your problem.

For other going through this post. I suggest to list down all the Pin number and port numbers in CPU map
and triple check, if there are any absurd behavior.

Perhaps the pinout wiki page is not enough? If yes, you are invited to add what you think necessary.

@++;
Gauthier.

My board is a custom board, I did not know that a pin out wiki existed...The wiki page is definitely detailed.
I think i was being overly careful and since there are a lot more pins than plain grbl, I lost track....

Thanks gain..