What does the Gcode command G4 S0 do?

Basic Information:

Printer Model:
MCU / Printerboard:
Host / SBC
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:


There are many G4 S0 in Orca slices, what does it represent? If Klipper attempts to support this instruction, what elements does it affect?

I think it should be a bug. There are countless instructions like this in any multi-color slicing file!!!

Hello @morixinguan !

Could you please shorten the topic. It should be a brief description, not the complete issue.

https://reprap.org/wiki/G-code#G4:_Dwell

https://www.klipper3d.org/G-Codes.html

How much are there? Do you have an example gcode file?

Does Klipper react to these in an unproper way?
Please attach the klippy.log to your next log.

Interesting. Are you sure that the gcode flavor is set to Klipper, since

  1. Klipper does not support S parameter in G4
  2. G4 P0 is a completely useless command that does just nothing == Wait 0 seconds

I am certain that the Orca slice can choose the “Marlin/Klipper” style, which means that the generated instructions may contain both Marlin supported commands and Klipper style commands; For example, in my recent experiments, I found that there are a large number of commands such as M205, M73, and G4. When the frequency is too high, Timer too close may also occur. I tried to ignore them and improved my problem after processing.

If it’s like Sineos’ statement, I even think that Klipper code can add 0-value filtering and return directly when a 0-value is matched, which can improve the robustness of the software and avoid performing useless operations

Not quite correct:

You either choose Marin or Klipper

Perhaps my version is indeed quite different from yours

I’ve got

You may should update

I now update to V2.2.0

It’s the same as with V2.1.1

Why should Klipper do this? Why should Klipper clean up after bugs in different software products? Such issues (if it is one) needs to be fixed where they are created and not down-stream in a totally different product.

1 Like

Yes, this may be due to a bug in our custom slicing software

I have found a way to reproduce this problem. Just take any model and paint it with two colors to reproduce it

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.