code changes to implement G38 commands
1) modified 3 code files Marlin.h Marlin_main.cpp endstops.cpp 2) modified config files so I could test on my machine Testing was done on an AzteegX3pro based machine. The probe was hooked to the Z_MIN endstop. My controller doesn't have a dedicated Z_PROBE input so I couldn't test that functionality. Verified that a large file (without any G38 commands) executed the same before and after the changes. Verified that the head moves as expected when G38.2 and G38.3 commands are issued. Single & multiple axis moves were tested along with + and - directions. Code was added to the main ISR. In normal operation only one extra IF statement is evaluated. I didn't notice any performance degradation because of the added code. The G38 commands are expected to be issued manually by the operator during machine setup. The G38 commands wait until the machine is idle before proceeding. That way the other commands are minimally impacted by the extra ISR overhead when a G38 command is in the queue. The G38 commands are very similar to the G28 commands except 1) only the Z_PROBE is used and movement can be in the + or - direction. See issue 4677 for a discussion on adding G38 commands to Marlin. Feature request: add ability to use G38.2 command (CNC) MarlinFirmware/Marlin#4677
This commit is contained in:
committed by
Scott Lahteine
parent
74d048e77e
commit
2911aa7ffa
@ -209,6 +209,12 @@ void manage_inactivity(bool ignore_stepper_queue = false);
|
||||
|
||||
#endif // !MIXING_EXTRUDER
|
||||
|
||||
#define G38_2_3
|
||||
#ifdef G38_2_3
|
||||
extern bool G38_flag ; //flag to tell the interrupt handler that a G38 command is being run
|
||||
extern bool G38_flag_pass ; //flag from the interrupt handler to indicate if the endstop went active
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The axis order in all axis related arrays is X, Y, Z, E
|
||||
*/
|
||||
|
Reference in New Issue
Block a user