Plugin support for multiple mcu?

Hello,

(apologies if this is the wrong category for this question)

I am in the conceptual stage of an idex printer project. At this point, one path I'm considering for the prototype build involves the use of two separate MCUs, one for each toolhead, both connected to a Raspberry Pi running a single instance of octoprint. Now I'm trying to assess the feasibility of developing an octoprint plugin which can perform the following task:

Parse through gcode lines and, depending on the axis identifier: "E" or "A" for G1, G92, G0, etc, send that command to the appropriate MCU.

My question is does the current octoprint framework support issuing gcode commands to separate USB destinations? If so, what modules/classes/methods are the key to getting this to work? I have no experience making plugins, and have only had brief look through the master documentation. I'd greatly appreciate any help I can get.

Hello @stakei00 !

Are you by chance running on Klipper?

I agree with @Ewald_Ikemann on this one, Klipper does exactly what you are suggesting natively and OctoPrint does work with Klipper firmware.

Thanks for the quick responses!

I am running klipper on my homebuilt machine (loving it!) and I am familiar with the multiple_mcu feature.

To provide more info on the project: I'm trying to conceptualize a printer with two independent corexy gantries which share the same y-rails and bed (sort of like 2 printers smashed into 1). In this way, you can achieve a more independent dual extrusion system rather than forcing both toolheads to reside on the same x gantry. Unless the multiple mcu klipper feature allows defining an additional corexy kinematic coupling for two additional motors on the 2nd mcu, I don't think its going to work without some added feature support to klipper itself. Hence two mcus each with separate firmwares.

At this point, I'm really just going for a proof-of-concept, so starting with some really hacky is O.K. for now. The most clear path forward I've come up with is developing a plugin which can separate the command serial destinations depending on which extruder is in use: MCU1 for E0 and MCU2 for E1 etc. Can a plugin like this exist? or is octoprint strictly a 1 mcu kinda thing?

If you want to control several mcu with Klipper, then this is the wrong forum.

OctoPrint only sees the printer, not the mcu.

You should consult the Klipper forum.

To the best of my knowledge, OctoPrint only supports a single serial connection natively. The closest thing I can think of from a plugin perspective to get around this might be octoprint-comm-transport-serial-factory hook, and using it's write function to direct the data passed to the individual mcus.

@jneilliii I'll have to mess around with it, hopefully it works out. I really appreciate the quick responses.