[gnea/grbl-Mega Issue#173] X Axis on E0 Axis Pins?? MKS Gen_L V1.0 board

未分类 bolang 4个月前 (10-15) 28次浏览

Issue #173 | 状态: 进行中 | 作者: Horsboll | 创建时间: 2024-03-23


I have to throw in the towel. I’m stuck..
I’ve been trying for a long time now and I can’t get it to work. I am in the process of converting my 6040 CO1 laser to GRBL on an MKS Gen_L v1 board and everything works except the X axis. I’m sure the X axis is damaged.
I need 3 axis, X, Y and Z and there are 5 on the board, so I think that I shold be able to change the X axis to use E0 pins? I´m using external drivers, so I just have to change “E0 STEP” to “X STEP” and “E0 DIRECTION” change to “X DIRECTION”. But I simply cannot figure out how.
I’m just not good enough to code yet to figure it out.

The only change I have made is to switch to the Ramps board, I have also changed the Spindle pin to one of the servo pins with which I make PWM 5-0 volts for the laser tube


评论 (3)

#1 – Horsboll 于 2024-03-24

I have solved the problem my self
I couldn’t wrap my head around how I could determine which pins it has on X step and dir and on E0 step and dir and then have them swapped around.. I succeed by finding a GRBL that is set up to 5 akas and then went through what kind of pins it calls for the E0 axis and put them into the X axis on my own cpu_map file.. and I just went out and tried it out and now run my laser in all 3 axes ..!!

#define STEPPORT0 F // F–>A
#define STEPPORT1 F
#define STEPPORT2 L
#define STEPBIT0 0 // X Step – Pin A0 – 0 0 –> 0 4 = Pin D26
#define STEPBIT1 6 // Y Step – Pin A6
#define STEPBIT2 3 // Z Step – Pin D46
#define STEPBIT(i) STEPBIT##i
#define STEPBIT(i) STEP_BIT(i)
#define STEPDDR(i) DDR(STEPPORT##i)
#define STEPPORT(i) PORT(STEPPORT_##i)
#define STEPPORT(i) STEP_PORT(i)
#define STEPPIN(i) PIN(STEPPORT##i)

// Define step direction output pins.
#define DIRECTIONPORT0 F // F–>A
#define DIRECTIONPORT1 F
#define DIRECTIONPORT2 L
#define DIRECTIONBIT0 1 // X Dir – Pin A1 – 0 1 –> 06 Pin D28
#define DIRECTIONBIT1 7 // Y Dir – Pin A7
#define DIRECTIONBIT2 1 // Z Dir – Pin D48
#define DIRECTIONBIT(i) DIRECTIONBIT##i
#define DIRECTIONBIT(i) DIRECTION_BIT(i)
#define DIRECTIONDDR(i) DDR(DIRECTIONPORT##i)
#define DIRECTIONPORT(i) PORT(DIRECTIONPORT_##i)
#define DIRECTIONPORT(i) DIRECTION_PORT(i)
#define DIRECTIONPIN(i) PIN(DIRECTIONPORT##i)

// Define stepper driver enable/disable output pin.
#define STEPPERDISABLEPORT_0 D //D–>A
#define STEPPERDISABLEPORT_1 F
#define STEPPERDISABLEPORT_2 K
#define STEPPERDISABLEBIT0 7 // X Enable – Pin D38 – 0 7 –> _02 Pin D24
#define STEPPERDISABLEBIT_1 2 // Y Enable – Pin A2
#define STEPPERDISABLEBIT_2 0 // Z Enable – Pin A8
#define STEPPERDISABLEBIT(i) STEPPERDISABLEBIT_##i
#define STEPPERDISABLEDDR(i) DDR(STEPPERDISABLEPORT##i)
#define STEPPERDISABLEPORT(i) PORT(STEPPERDISABLEPORT##i)
#define STEPPERDISABLEPIN(i) PIN(STEPPERDISABLEPORT##i)


#2 – fra589 于 2024-03-26

Hi @Horsboll,

The pinout mapping in cpumap.h is describe here : https://github.com/fra589/grbl-Mega-5X/wiki/Pinout-mapping-in-cpumap.h

@++;
Gauthier.


#3 – Horsboll 于 2024-03-26

Thanks it would have been helpful 👍🏻
But I figured it out already by thinking for a loooong time 🤣


原始Issue: https://github.com/gnea/grbl-Mega/issues/173

喜欢 (0)