Octoprint and IDEX problem: extruders run into each other

When using octoprint (on RPI 3B+) the exported G-code (from Luban or Cura) let the extruders run into each other. For example: a print with PETG as support (right extruder) and PLA for the object (left extruder). When the right extruder printed the first layer it stops moving and stays at the last print position above the printbed, when in should have moved out of the way to the oozing shield (all the way to the right of the printbed). When the left extruder moves in to the printbed in runs into the rightextruder and prints in the wrong place.

Using the G-code directly from luban to the Snapmaker J1 results in correct moving and printing.

What do I have to do to print 'normally' via Octoprint with my IDEX machine?
1 other question: What is the safest en eadiest way to enable Host action commands?

What did you already try to solve it?

I read some fora about the same problem and using M605 S1 as standard G-code before the start of a printjob did not fix it.

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

octoprint-systeminfo-20241021071448.zip (83.4 KB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

OctoPrint version 1.10.2
OctoPi version 1.0
Snapmaker J1
Marlin
Chrome
Windows 10
Luban (or Cura)
corner cable guide_1729198643913.gcode (531.9 KB)

Hello @xboxhooah !

Please attach the systeminfo bundle to your next post.

Have you told OctoPrint that you use two independent extruders?

Pleas do so.

Thanks for your reply. I have edited my post and uploaded the system bundle.
I tried octoprint in safe mode, but that resulted in the same problem unfortunately.

Sorry, I said this for a reason.

Frequent readers always get the newest posts at first to see. It can be quite tedious to scroll back with every thread. Also, the chronological sequence is disturbed.

Sorry. Hereby the systeminfo bundle.
octoprint-systeminfo-20241021071448.zip (83.4 KB)

When T0 is active and above the print bed and you initiate T1, does T0 move back to it's parking position?

The gcode file you posted contains a M605 S0 (see Multi Nozzle Mode | Marlin Firmware for details) which means that parking the non-active extruder is the responsibility of the generated gcode. If you added the M605 S1 manually or at the beginning of the gcode without removing the M605 S0, then that would explain why it didn't work.

As @Ewald_Ikemann partially suggested, you can use the OctoPrint Terminal window to enter some gcode commands to verify that the firmware responds correctly.

  1. Enter M105 S0
  2. Enter T0
  3. Enter T1

This sequence should not move either extruder.

  1. Enter M105 S1
  2. Enter T0

The second extruder should move to the park position.

  1. Enter T1

The first extruder should move to the park position.

You may need to add some G0 X100 (I'm not sure what the dimensions are for the printer so pick a value for X that is somewhere in the printing area) commands to move the selected extruder away from its park position.

Once we know that the firmware is responding correctly, then we can move on to configuring the slicers to output the correct commands at the appropriate times.

Thanks for the extensive reply. I tried the commands, but none of the lines made any extruder move..

(post deleted by author)

It looks like Luban doesn't let me edit the standard G-code order/construction. So i tried Cura.
M605 S0 in the G-code before starting the print job (via Octoprint) doesn't work either with a G-code generated with Cura. It results in colliding extruders also.
SJ1_corner cable guide.gcode (418.0 KB)

As for this:

T0/T1 should work

I don't own one of these printers so I'm depending on you to perform any experiments needed to help figure this out. What version of Cura and what OS is the machine it is installed on running? If the answer is Ultimaker Cura 5.7.1 then what printer did you install because Snapmaker J1 isn't in the list.

The new gcode file you posted doesn't contain any M605 commands.

Let's try this:

  1. Enter G28
  2. Enter M605 S1
  3. Enter T0
  4. Enter M114

What is the output?

  1. Enter T1
  2. Enter M114

What is the output?

  1. Enter G0 X100
  2. Enter M114

Did the second extruder move? What is the output?

  1. Enter T0

Did the second extruder go back to the park position? If it did...

  1. Enter G0 X100
  2. Enter M114

Did the first extruder move? What is the output?

I understand. I used this for Cura 5.7.1: GitHub - Snapmaker/SnapmakerCuraPlugin: Snapmaker plugin for Cura 5

Here is the output:
A1) all axed homed
A2) received OK in terminal, no movement
A3) received OK and Extruder 0 as active in terminal, no movement
A4) received in terminal: X:-13.00 Y:0.00 Z:205.70 E:17.59 Count X:-1040 Y:0 Z:344000, no movement

B1) right extruder rammed into the left extruder
B2) received in terminal: X:0.00 Y:0.00 Z:205.70 E:17.59 Count X:0 Y:0 Z:344000, no movement

C1) right extruder moved to x100
C2) received from terminal: X:100.00 Y:0.00 Z:205.70 E:17.59 Count X:8000 Y:0 Z:344000

D1) right-extruder went to home position and the left-extruder left the home position (like getting ready to extrude), to position X100?

E1) received OK in terminal, no movement (I think left-extruder already was at X100)
E2) X:100.00 Y:0.00 Z:205.70 E:17.59 Count X:8000 Y:0 Z:344000

This already seems more promising, right?

After G28, where are both extruders? Is there a way to "park" both extruders?

  1. G28
  2. M605 S1
  3. T0
  4. T1
  5. T0
  6. M114
  7. T1
  8. M114

I believe both extruders should be in their "park" locations and the output of each M114 should reflect that.

  1. T0
  2. G0 X100
  3. M114

Should move one extruder to that location.

  1. T1

Should park the previous extruder.

  1. G0 X100
  2. 'M114`

Should move this extruder to the same location as the other extruder was moved to. Neither extruder should run into the other extruder.

After G28 the extruders are at home. This is the way the extruders are parked at home:

BTW, using the same G-code via a USB-stick results in good prints, so it looks like it really is an octoprint issue?

A1) all axes homed
A2) received OK in terminal, no movement
A3) received OK in terminal, no movement
A4) right extruder rammed into the left extruder (which was still at home position)
A5) parked the right extruder at home and moved the left extruder ready to extrude
A6) received in terminal: X:0.00 Y:0.00 Z:205.70 E:11.15 Count X:0 Y:0 Z:344000
A7) left extruder moved to home position and right extruder rammed into the left extruder
A8) received in terminal: X:0.00 Y:0.00 Z:205.70 E:11.15 Count X:0 Y:0 Z:344000

It looks like the right extruder wants to move to the location of the left extruder.

B1) parked the right extruder at home and moved the left extruder ready to extrude
B2) moved the left extruder to X100
B3) received in terminal: X:100.00 Y:0.00 Z:205.70 E:11.15 Count X:8000 Y:0 Z:344000

C1) moved the left extruder to home and moved the right extruder to X100

D1) no movement, the right extruder was already at that location (see previous)
D2) received in terminal: X:100.00 Y:0.00 Z:205.70 E:11.15 Count X:8000 Y:0 Z:344000

I am very confused. According to the specifications at:
https://us.snapmaker.com/products/snapmaker-j1-independent-dual-extruder-3d-printer
the printer dimensions are 300mm x 200mm x 200mm.

You are calling the extruders right and left and I'm selecting T0 and T1. Can you tell from the experiments we have done so far is T0 left or right? I expect the X axis to have 0 on the left and 300 on the right and the Y axis should run from front to back, i.e. 0,0 is on the left front.

If the extruders both start in the park position, then I don't understand how the experiments we have performed ever cause them to collide. The only thing I can think of is that M605 S1 doesn't do what the Marlin documentation says it does.

I also don't understand why the M114 output never shows X at around 300 (plus something for the park position).

Perhaps it is time to contact Snapmaker support and ask them for some documentation on the M605 command so we can make sure it complies with the Marlin documentation.

Did the printer come with any example gcode files? If so, can you zip them up and post them here, please.

How have you defined the printer in OctoPrint? Unless you have done something out of the ordinary, a gcode file printed directly from a USB-stick and uploaded to OctoPrint and printed from there should result in identical results. OctoPrint by default doesn't add (or subtract) any gcode commands.