-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Hi, I'm trying to compile for imxrt1062, t41u5xbb, so I can have two spindles in laser mode (CO2 and diode) and use one at a time. I'm attaching parts of the code used in
my_machine_map.h
// Define auxiliary output pins
#define AUXOUTPUT0_PIN (31U)
#define AUXOUTPUT1_PIN (32U)
#if SPINDLE_ENABLE & (1<<SPINDLE_PWM2|1<<SPINDLE_PWM2_NODIR)
#define AUXOUTPUT0_PWM_PIN (33U)
#else
#define AUXOUTPUT2_PIN (33U)
#endif
#define AUXOUTPUT3_PIN (12u) // Spindle enable
#define AUXOUTPUT4_PIN (11u) // Spindle direction
#define AUXOUTPUT5_PIN (13u) // Spindle PWM
#define AUXOUTPUT6_PIN (19u) // Coolant flood
#define AUXOUTPUT7_PIN (18u) // Coolant mist
// Define driver spindle pins
#if DRIVER_SPINDLE_ENABLE & SPINDLE_ENA
#define SPINDLE_ENABLE_PIN AUXOUTPUT3_PIN
#endif
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
#define SPINDLE_PWM_PIN AUXOUTPUT5_PIN
#endif
#if DRIVER_SPINDLE_ENABLE & SPINDLE_DIR
#define SPINDLE_DIRECTION_PIN AUXOUTPUT4_PIN
#endif
my_machine.h
// If none are specified the default PWM spindle is instantiated.
// Spindle definitions can be found in grbl/spindle_control.h.
// More here https://github.com/grblHAL/Plugins_spindle
//#define SPINDLE0_ENABLE SPINDLE_HUANYANG1
#define SPINDLE0_ENABLE SPINDLE_PWM0_NODIR
#define SPINDLE1_ENABLE SPINDLE_PWM2_NODIR
//#define SPINDLE1_ENABLE SPINDLE_PWM0
//#define SPINDLE2_ENABLE SPINDLE_PWM1
//#define SPINDLE2_ENABLE SPINDLE_NONE
#define SPINDLE_OFFSET 1 // Uncomment to enable settings for laser spindle XY-offset.
//#define SPINDLE0_ENABLE SPINDLE_PWM0
//#define SPINDLE1_ENABLE SPINDLE_PWM2
config.h
#if !defined N_SPINDLE || defined DOXYGEN
#define N_SPINDLE 2
#endif
/*! \def N_SYS_SPINDLE
\brief Defines number of simultaneously active spindles supported - minimum 1 (none), maximum 8.
*/
#if !defined N_SYS_SPINDLE || defined DOXYGEN
#define N_SYS_SPINDLE 1
#endif
$pins
[PIN:16,Feed hold]
[PIN:17,Cycle start]
[PIN:14,Emergency stop]
[PIN:15,Probe]
[PIN:20,X limit min]
[PIN:23,X limit max]
[PIN:21,Y limit min]
[PIN:28,Y limit max]
[PIN:22,Z limit min]
[PIN:36,Aux in 0,P0]
[PIN:30,Aux in 1,P1]
[PIN:34,Aux in 2,P2]
[PIN:35,Aux in 3,P3]
[PIN:41,Aux in 4,P4]
[PIN:28,Aux in 5,P5]
[PIN:29,Aux in 6,P6]
[PIN:2,X step]
[PIN:4,Y step]
[PIN:6,Z step]
[PIN:3,X dir]
[PIN:5,Y dir]
[PIN:7,Z dir]
[PIN:10,X enable]
[PIN:40,Y enable]
[PIN:39,Z enable]
[PIN:12,Spindle on]
[PIN:13,Spindle PWM]
[PIN:31,Spindle 2 PWM]
[PIN:18,Mist]
[PIN:19,Flood]
[PIN:32,Aux out 1,P0]
[PIN:11,Aux out 3,P1]
[PIN:33,Aux analog out 0,Spindle PWM]
[PIN:0,RX,UART1]
[PIN:1,TX,UART1]
but the $spindles command only lists the first spindle