macdylan / 3dp-configs

My 3DP Configs
12 stars 0 forks source link

Copy / Duplication mode not working #2

Closed Googliola closed 1 year ago

Googliola commented 1 year ago

How to reproduce (in PrusaSlicer ; gcode attached, J1 Firmware 2.6.2):

  1. create simple shape on the left side of the plate

  2. select physical printer with IDEXCopy or IDEXDuplicate in the name

  3. Export to Octoprint and print it -> only left item gets printed

  4. Use same shape but export in "normal" (single) mode

  5. Print from USB stick in Copy Mode -> two copies

  6. Now go back to Octoprint and print the very same gcode from step 3 -> tadaaaa. duplication is ON!

In order to narrow it down, I checked Marlin documentation and found 2 : (DUPLICATION) [....] Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and follow with M605 S2 to initiate duplicated movement.

I was hoping that

M605 S2 X162 R0 ;IDEX Duplication
M605 S2;  

makes a difference as it says follow to initiate. It did not.

I have no clue why that happens.

Copy Test Gcodes.zip

macdylan commented 1 year ago

Let me explain how J1 works in Copy/Mirror/Backup mode:

so, I made the start gcode(#1 ):

{if physical_printer_preset =~/.*IDEXDupl.*/ || physical_printer_preset =~/.*IDEXCopy.*/ }
  M605 S2 X162 R0 ;IDEX Duplication
{elsif physical_printer_preset =~/.*IDEXMirr.*/}
  M605 S3 ;IDEX Mirror
{elsif physical_printer_preset =~/.*IDEXBack.*/}
  M605 S4 ;IDEX Backup
{endif}

and check M605 xxx in smfix to set Extruder Mode. so in this way the screen and the actual gcode command are the same.

Let's come back to topic, for some strange reasons in PrusaSlicer, something might not work when switching the physical printer. I recommend select the mode first(physical printer), then set other options, and finally slicing. But in OrcaSlicer, there is no such problem, you just need to set the plate name arbitrarily.

Feel free to ask that you are not clear about.

Googliola commented 1 year ago

Thanks for your time and explanation.

I think I understand the process as you lined it out. But the copy mode ONLY works when I select it on the display.

Long story short: copy mode exclusively works when started from either the touchscreen or Luban. But not in Octoprint. Mirror works; backup, I dunno.

I compared the output of Luban with smfix V1.9 both in normal / copy mode. Seems that the gcode headers and G605 instructions are pretty much the same. After more testing, I am sure SM firmware (or Octoprint - even in safe mode) is buggy. Maybe the parameters of M605 S2 X162 R0 do not get processed? Test files: Disable filament sensor and unload filaments (to speed up process) Copy_Mirror_OctoTest.zip

On another topic: Printing mode is sticky and persistent across prints. (see point 5 and 6 in my first post). So to make sure, prints are started in the correct mode, I would add this to the Start G-Code

{else}
  M605 S0 ;Normal Mode
macdylan commented 1 year ago

Long story short: copy mode exclusively works when started from either the touchscreen or Luban. But not in Octoprint. Mirror works; backup, I dunno.

That's weird, but copy mode works fine on my J1 and I use it a lot, fw 2.6.2/ps 2.6.0/orca 1.6.4/sm2up 2.2(smfix 1.9) CopyTest-Box_0.2mm_27m_J1.zip

Googliola commented 1 year ago

Uploaded your test files to octoprint, did not work. Like I said, since mirror mode works, I suspect that the parameters S2 X162 get lost somewhere...Hopefully, SM reads and fix the issues on their github repo in the near future. Probably wishful thinking.

macdylan commented 1 year ago

I rarely use OctoPi and usually for testing purposes. but i just linked to it and successfully tried the Copy mode:

I think the touchscreen is doing some black box things, from the debug log you can see it activate T1 after M605 S2 but I'm not sure exactly how that works yet, I'll keep digging it.

Googliola commented 1 year ago

Don't we love black boxes!

Found these lines in Marlin / Snapmaker-IDEX repo:

https://github.com/Snapmaker/SnapmakerController-IDEX/blob/ba60aace13038b46cb349f5b7a80076fe8de3ce2/Marlin/src/gcode/control/M605.cpp#L168-L174

No idea if that is related to the sneaky T1. Happy digging ;-)

TylonHH commented 6 months ago

@Googliola Hey hey, as you guys figured out its not a slicer problem, then more a black box. I just wanna share my workaround, when I wanna print in copy mode via OctoPrint. I saved a gcode like "SET copy.gcode" on a stick including this fast code:

M82 ;absolute extrusion mode
;--- Start G-code Begin ---
M605 S3
;M605 S2 X162 R0
G28 Z
M84
;--- End G-code End ---
M82 ;absolute extrusion mode
M104 S0
;End of Gcode

I saved this code on the printer internal storage for easy access and setting it when needed. After running this snippet, you can print in copy mode via OctoPrint.