Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octoprint counts all print layers twice (solved) #240

Closed
sebbl2 opened this issue Oct 17, 2021 · 14 comments
Closed

Octoprint counts all print layers twice (solved) #240

sebbl2 opened this issue Oct 17, 2021 · 14 comments
Labels
status: markedForAutoClose Issue will be closed automatically

Comments

@sebbl2
Copy link

sebbl2 commented Oct 17, 2021

It seems that I am the only person with this issue.
Since the update to 1.27.1, DisplayLayerProgress shows exactly twice the number of actual layers. In Prusaslicer the layer count is still correct.
The whole thing in connection with Prusa MK3s+

Tried: Plugin uninstalled, FW MK3s reloaded

It could be related to OP 1.7, because when downgrading DLP the problem still exists.

@LUFEZ
Copy link

LUFEZ commented Oct 17, 2021

I have the same issue.
PrusaSlicer 2.4.0-alpha3, OctoPrint 1.7, DisplayLayerProgress Plugin 1.27.1

@OllisGit
Copy link
Owner

@sebbl2 , @sebbl2 please add a screenshot so that I have a better understanding what you mean with "twice the number".

My current assumption is that the GCODE include to many comments like this:

;LAYER_CHANGE

Please attach your uploaded gcode and also download the gcode from OP. Then I can take a look and confirm my assumption.

Thx, in advance
Olli

@sebbl2
Copy link
Author

sebbl2 commented Oct 17, 2021

Bildschirmfoto 2021-10-17 um 17 10 58
IMG_0510

@sebbl2
Copy link
Author

sebbl2 commented Oct 17, 2021

@sebbl2
Copy link
Author

sebbl2 commented Oct 18, 2021

Bildschirmfoto 2021-10-18 um 08 48 54
Bildschirmfoto 2021-10-18 um 08 49 03

gCodes: 1.OP 2.PS
530-11-11_Horse_body_2_FDM__repaired_0.12mm_PLA_MK3S_6h49m.gcode.txt
PS_530-11-11_Horse_body_2_FDM__repaired_0.12mm_PLA_MK3S_6h49m.gcode.txt

You seem to be right with your assumption. A lot of "Layer Change" or "M117 Indicator layer" are displayed.

@LUFEZ
Copy link

LUFEZ commented Oct 18, 2021

I think it is because of the [BEFORE_LAYER_CHANGE] setting in DisplayLayerProgress.
In the gcode file of PrusaSlicer are [LAYER_CHANGE] and [BEFORE_LAYER_CHANGE].
If you remove "count [;BEFORE_LAYER_CHANGE] Slic3r" in the DisplayLayerProgress settings, it counts correctly.
No idea why this was not the case before.

Bildschirmfoto 2021-10-18 um 09 15 42
.

@sebbl2
Copy link
Author

sebbl2 commented Oct 18, 2021

Great, that is it !! works flawlessly again. Thank you.

@sebbl2 sebbl2 closed this as completed Oct 18, 2021
@sebbl2 sebbl2 reopened this Oct 18, 2021
@sebbl2
Copy link
Author

sebbl2 commented Oct 18, 2021

We should leave this open/visible to others

@sebbl2 sebbl2 changed the title Octoprint counts all print layers twice Octoprint counts all print layers twice (solved) Oct 18, 2021
@OllisGit
Copy link
Owner

Hi @sebbl2 , @LUFEZ,

the last line count [;LAYER_CHANGE] Prusa was added in the last release 1.27.0 via a PullRequest.

Unfortunately I didn't know that the prusaslicer generate g-code with both comment-lines:

;LAYER_CHANGE
;Z:0.2
;HEIGHT:0.2
;BEFORE_LAYER_CHANGE
G92 E0.0

Or is that not the default behaviour of the slicer...did you add this comment lines to the gcode via custom slicer settings?

@sebbl2
Copy link
Author

sebbl2 commented Oct 18, 2021

Nope, I didn't customise anything in there

@kcdr
Copy link

kcdr commented Nov 8, 2021

Same for me.
At least my PrusaSlicer (v2.3.3) emits both (;LAYER_CHANGE and ;BEFORE_LAYER_CHANGE)

@OllisGit
Copy link
Owner

Discussion from PR #238 (comment)

  1. revert this pull and back out, and update docs to tell people to add BEFORE_LAYER_CHANGE to their printer profile
  2. if plugin matches more than one filter use only first match (i am unclear if it does this already?)

Hi @scyto,

I think option 2 is the correct solution.

Currently the plugin scans each gcode-line agains each layer-expression. That doesn't make sense and reproduce the mentioned error.

I will change it to this behaviour: scan each gcode-line agains each layer-expression, after one expression matched it will be taken for the rest of following gcode-lines.

OllisGit added a commit that referenced this issue Nov 16, 2021
- B #240 the first matched layer-expression is used for the whole file
@OllisGit OllisGit added status: waitingForTestFeedback and removed status: inNextRelease Will be implemented/fixed in next release labels Nov 16, 2021
@OllisGit
Copy link
Owner

Hi,

now implemented in Version 1.27.2.

Please test and give me feedback

Thx, in advance
Olli

@stale
Copy link

stale bot commented Dec 18, 2021

This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.

@stale stale bot added the status: markedForAutoClose Issue will be closed automatically label Dec 18, 2021
@stale stale bot closed this as completed Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: markedForAutoClose Issue will be closed automatically
Projects
None yet
Development

No branches or pull requests

4 participants