hello there,
i have BIGTREETECH SKR PRO V1.2 32bit MotherBoard 3D Printer Parts TMC2209 based MPCNC and would like to use E2 channel for tangential knife control.
For testing, i have connected the Z-motor to E2 channel and run the commands:
G0 A1
G0 E21
No reactions. Does Marlin firmware supports E2 channel?
Marlin firmware in general can support additional axis.
I don’t believe the Marlin firmware we use on our machines has this configuration in place in stock form.
I think you’d need to edit the source and add whatever support you need back into the config and then recompile.
I only dabble with Marlin ocassionally, hopefuly one of the community more familiar with it will chime in and elaborate or correct me if I"m wrong.
I second MakerJim’s suggestion that it is likely you will need to make a change or two to the firmware, recompile, and reflash your board to make this happen. Like MakerJim, I only dabble with Marlin, but when I looked at the source, I did notice a few things. First, only five of the “axes” have stepper drivers defined. Pull up the configuration.h file and search for “Stepper Drivers” or “TMC2209”. You will find a list of the assigned axes, and there is only five of them.
Second, if you are trying to piggyback on the extruder code, there are no extruders defined. Here is the section:
// This defines the number of extruders // :[0, 1, 2, 3, 4, 5, 6, 7, 8] #define EXTRUDERS 0
I suspect if you change this to 1, you will have other issues. For example, I think if you change this to 1, Marlin will expect a temperature probe to be enabled. So, you may want to avoid trying to use the 6th stepper through the extruder interface.
My guess is that there are only a few lines of code that need to be changed for you to be able to use the 6th stepper driver. The trick will be finding the right few lines of code. If you don’t find your answer on this forum, there is probably a Marlin forum that can help you.
Also, if you are unfamiliar with compiling the Marlin firmware, the place to start will be to follow Ryan’s PlatformIO steps and get the firmware for your board compiling.
If you are going to use a stepper motor for a tangential knife, you will need to figure out how to home the knife since a stepper driver has no idea of its initial position. I would think a 360 servo might be a better solution. Marlin does have servo support, but it is not enabled in the current V1 firmware. Here is the line:
//#define NUM_SERVOS 3 // Note: Servo index starts with 0 for M280-M282 commands
Here are the pins on the SKR Pro defined for servos in pins_BTT_SKR_PRO_common.h:
// // Servos // #define SERVO0_PIN PA1 #define SERVO1_PIN PC9
Note PC9 is also used for laser PWM, so PA1 might be the better choice.
Another thing that occurs to me is that a dedicated rotary axis would need similar code changes. I noticed that @JohnSherman had such a project, so you might reach out to him and see if he would share his experience or code.
I wonder what program can generate gcode for a tangential knife?
hi @robertbu , thank you for an explanation!
I did a bit more looking around on tangential cutters and bumped into a couple of things. First, here is a Thingiverse page with models and more information about a tangential cutter for the MPCNC. Second, in that page there is a broken link to a forum page. This is the current link to that topic. I don’t know if he is still monitoring this forum, but you might reach out to @jamesd256 for his Marlin firmware files. Marlin has changed since 2017 when the topic was made, but you would have more of an idea of the changes that need to be made. Also, in scanning the Thingiverse page, it appears that he is using the extruder interface as the 6th axis.
I also agree that you will need to dive into Marlin to achieve this.
In Marlin (specifically Marlin-bugfix-2.1.x) there are a number of channels which are used to configure the stepper drivers, which in turn link to the end stops. I have pasted below a snipet from configuration.h which sets the different driver types for my MPCNC primo build using an SKR3 board. I have the no extruders set =0 which disables all the extruders, temp monitoring etc. that is used for 3d printing.
When you compile (I am using VScode + platformio + Auto Build Marlin extensions) the X2, Y2 are allocated one of the spare stepper motor channels on the physical board to control (E0 & E1).
To work with the way Marlin works i would suggest using I/J/K or U/V/W and get marlin to allocate the channels so that you dont pick up the other extruder etc. logic that is associated with the extruders within the application. Note the disctinction of within the software and the mapping to the channels on the actual board.
#define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE TMC2209
#define X2_DRIVER_TYPE TMC2209
#define Y2_DRIVER_TYPE TMC2209
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
//#define I_DRIVER_TYPE A4988
//#define J_DRIVER_TYPE A4988
//#define K_DRIVER_TYPE A4988
//#define U_DRIVER_TYPE A4988
//#define V_DRIVER_TYPE A4988
//#define W_DRIVER_TYPE A4988
//#define E0_DRIVER_TYPE A4988
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
//#define E5_DRIVER_TYPE A4988
//#define E6_DRIVER_TYPE A4988
//#define E7_DRIVER_TYPE A4988
this is the extruder setting in the Marlin configuration.h file
// @section extruder
// This defines the number of extruders
// :[0, 1, 2, 3, 4, 5, 6, 7, 8]
#define EXTRUDERS 0