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

Layer information doesn't display when using slic3r gcode even with enhancement 8 settings #36

Closed
chris-schmitz opened this issue Apr 25, 2018 · 40 comments
Milestone

Comments

@chris-schmitz
Copy link

Hi,

I installed your plugin the other day. I use slic3r so I read up on enhancement #8 to figure out how I need to adjust my gcode settings.

From reading the discussion thread it seemed like all I needed to do was add the following text to my slic3r "before layer change g-code" section:

;LAYER:[layer_num]

I did that for a gcode I ran last night, but the layer information still didn't display.

I'm using the prusa flavor of slic3r so I have other information in that section of the settings and I'm wondering if it's causing an issue. Here's a screen shot of my print settings in slic3r:

screen shot 2018-04-25 at 7 19 58 am

Am I adding the text wrong? Thanks for the help and the cool plugin :)

I'm using:

  • Slic3r Prusa Edition version 1.38.7-prusa3d
  • Prusa i3 MK3 printer
  • OctoPrint 1.3.8 running on OctoPi 0.14.0
@OllisGit OllisGit added type: bug Something isn't working status: waitingForFeedback Wating for Customers feedback labels Apr 25, 2018
@OllisGit
Copy link
Owner

Is it possible to provide your gcode, so that I can analyse the commands?

@chris-schmitz
Copy link
Author

Sure thing.

rook.gcode.zip

@OllisGit
Copy link
Owner

OllisGit commented Apr 25, 2018

I added your gcode to my development infrastucture (only virtual, no real printer on my windows-system) and everthings looks fine.

Is the layerinformation shown in navbar or is it a general issue?

image

@chris-schmitz
Copy link
Author

It was the layer information in the side bar. In your screen shot where it says Layer: - / 200 mine just says Layer: - / -.

I'm at work so I can't double check my settings, but once I get home I'll try it again and let you know.

Thanks for taking a look at this so quickly.

@guardiande
Copy link

Just to let you know: Same here. Prusa MK2, Prusa slic3r 1.38.7.

@OllisGit
Copy link
Owner

@guardiande Please provide your g-code or do the following steps:

  • check precisely your g-code before uploading. the g-code must contain ;LAYER:10 or ; layer 10, Z = 1.640
  • after uploading to octoprint, download the file via download button. the file should now containing something like M117 INDICATOR-Layer10

@thebarto360
Copy link

Ami happens to me similar, I see layer 10 of - 0.0
it does not give me the total layers or the total height of z.

I checked the files as you say and I see the information you mention

@OllisGit
Copy link
Owner

I can't help without g-code!

@thebarto360
Copy link

bamarillo.zip
sorry

@OllisGit
Copy link
Owner

Thx, now I can see the problem!
Orig. G-Code you provided:

...
; layer 1, Z=0.200
;LAYER:[layer_num]
T0
...

There are both layer-pattern included Simplify3D AND CURA (without a number)
The plugin layer-preprocessor transforms the G-Code into this:

...
M117 INDICATOR-Layer1
M117 INDICATOR-Layer
T0
...

So, you need to check your slicer settings to provide only one correctly filled pattern and I will optimize my plugin as well.

BR
Olli

@chris-schmitz
Copy link
Author

I had a chance to test the rook gcode and I still don't get the layer progress readout in octoprint. I'm not sure how to try to narrow down the issue from here. Let me know if there's anything you think I should try. I'll be printing though out the weekend so if you have any suggestions I'll definitely give them a try.

@thebarto360
Copy link

I know that my problem is the gcode, with cure everything is shown correctly.

in s3d according to what I add in the scripts:

-I show me only the percentage layer - of - 0.0
-me shows percentage layer x of - 0.0

what is the correct parameter to add?

captura

@OllisGit
Copy link
Owner

@chris-schmitz To analyse the problem deeper, I need more information.
For that reason I created a version which is output a lot of more information (-> poor perfomance)
Beside the logging-info I also changed the pattern to detect cura layer-info. I found out that in your file is an empty line after each layer-comment.
Maybe my Dev-System (Windows) could work with that and your Linux system doesn't.

Please do the following steps:

  1. Delete "rook.gcode" from Octoprint
  2. DeInstall the current "DisplayLayerProgress-Plugin"
  3. ReStart
  4. Delete "octoprint.log" via Settings-Menu
  5. Install "Logging-Version" found here
    Plugin-Mananger ...from URL
  6. ReStart
  7. Drop ""rook.gcode" to "Upload localy"
  8. Wait 5-10 minutes (really it takes a lot of time now)
  9. Select "rook.gcode"
  10. Wait 5-10 minutes (it takes much longer then uploading the file. Please be patient)
  11. Download "octoprint.log" via Settings-Menu and attached the file to this issue

@OllisGit
Copy link
Owner

@thebarto360 Did you try the new Version 1.4.1?
With this version the second invalid cura-like comment will be ignored and it should work now.

By the way, I don't use s3d, so it is better to provide screenshots with english-language.

BR
Olli

@guardiande
Copy link

This is what slic3r produces:

M204 S1000
;BEFORE_LAYER_CHANGE
;2.2


G1 F5760
G1 X217.924 Y23.215 E-0.76000
G1 E-0.04000 F2100.00000
G1 Z2.600 F7200.000
;AFTER_LAYER_CHANGE
;2.2

This is configured in slic3r's printer settings under Custom G-Code:

image

Will change that setting to include the format that your plugin needs and try again.

Sorry for bothering you as I should have RTFM.

But since OctoPrint already knows the current layer or at least the G-Code viewer does, wouldn't it be possible to hook onto that?

@OllisGit
Copy link
Owner

@guardiande Well, the g-code viewer do a lot of "magic" to calculate the values.

BR
Olli

@thebarto360
Copy link

@OllisGit Hi, I'm still having the same problem, I always use your latest version

regards
1
2
3

code.zip

@OllisGit
Copy link
Owner

OllisGit commented May 4, 2018

@thebarto360 Thanks for the gcode.
Now I could found an issue in the plugin. The line-parser didn't ignore comment-lines (starting with ;) and in your code there is a lot of comented z-movement. The plugin crashed and could not evaluate the height nor the the layer information.

I improved the regular-expression, added error-handling and also added a busy-indicator, because files bigger than 10MB could take some time to evaluate the height/layer-info.

The new relase 1.5.1 is out, so please so kind at test it.

BR
Olli

@OllisGit OllisGit added this to the V1.5.1 milestone May 4, 2018
@thebarto360
Copy link

@OllisGit hello, thank you very much for the new update, now if you show me the total number of layers and the height of z, although as I show in the wrong photos since it should be z = 4 and not z = 10 as sample, I will have I find the reason for the error.

again thanks for the inconvenience taken
regards
1
2

@OllisGit
Copy link
Owner

OllisGit commented May 4, 2018

Please check also the selected "Total Height"-Methode in the plugin settings!

@thebarto360
Copy link

@OllisGit hello again, after entering settings and changing the total method, it shows me the correct height of z. You made me happy the day, thanks for your work

regards

@OllisGit OllisGit removed the status: waitingForFeedback Wating for Customers feedback label May 4, 2018
@OllisGit
Copy link
Owner

OllisGit commented May 4, 2018

@thebarto360 Your welcome!

Yeah, now I can close this long running issue.
If you have further questions/issues, please feel free to create a new issue.

BR
Olli

@OllisGit OllisGit closed this as completed May 4, 2018
@AbuMaia
Copy link

AbuMaia commented Aug 10, 2018

Hi Olli, just a comment, not an issue or question.

I'm running Slic3r 1.41.0-beta, and it appears that they don't like layer change commands that start with a semicolon anymore. The ;LAYER:[layer_num] just gives a blank space now.

Since I see that your plugin reads that in order to add M117 INDICATOR-LayerN to the gcode, I decided to save it a step and put that in the layer change gcode myself. M117 INDICATOR-Layer[layer_num] works well now.

Just an FYI so you would know, and maybe could add the info to the readme.

@tcurdt
Copy link

tcurdt commented Feb 12, 2019

@AbuMaia why M117 INDICATOR-Layer[layer_num] shouldn't that be M117 INDICATOR-Layer[layer_z] instead?

@tcurdt
Copy link

tcurdt commented Feb 12, 2019

Ah - nevermind. [layer_z] is in mm and layer_num is the current layer.

@OllisGit
Copy link
Owner

OllisGit commented May 3, 2019

Or use this:
count [;BEFORE_LAYER_CHANGE] Slic3r
Thx, @crami for the hint: #75

http://projects.ttlexceeded.com/3dprinting_slic3r_gcode.html#other-custom-g-code

@ManuGithubSteam
Copy link

Hi

Sorry to did this up, but the problem is still there or reappearing in PrusaSlicer 2.1.

;BEFORE_LAYER_CHANGE in in the gcode also the the other lines mentioned in this and in #8

The plugin does not work. I see no top height and no current layers or the total layers.

I tried all the pre things with cura like in #8 but it did not work so i tried only one line ;Before Layer change but that also does not work.

This is in the Gcode, but it does not get read by the plugin.

;BEFORE_LAYER_CHANGE
G92 E0.0
;0.25
;LAYER:0

CameraLamp v7_56m_Real PETG - 0.35mm QUALITY - MK3S - Volcano 0.4.zip

Screenshot_20191006_124350
Screenshot_20191006_124423

Please help with fixing this :-)
Thanks

@OllisGit
Copy link
Owner

OllisGit commented Oct 6, 2019

@ManuGithubSteam
hmmm...it's working in my environment.
image

I reseted my plugin-settings, upload your gcode and after selecting your model the layer/height informations were shown.
It is important after changing the layer-expressions you need to re-upload your code, because the layer-analyse is only done during upload and not after selecting.

BUT your gcode include "muliple-layer-indicators":

  • ;BEFORE_LAYER_CHANGE appears 303 times
    and
  • ;LAYER:301 last layer entry

You should only use one! Remove ;BEFORE_LAYER_CHANGE then the count - expression is not used, only the cura-style is used.

Please try again.

@OllisGit OllisGit reopened this Oct 6, 2019
@OllisGit OllisGit added status: waitingForFeedback Wating for Customers feedback and removed type: bug Something isn't working labels Oct 6, 2019
@ManuGithubSteam
Copy link

Hello @OllisGit
Thanks for taking the time!

It works now sort of. The layer count is not correct.
See the picture:
Screenshot_20191007_214645

I did reupload the gcode and it works but the layers are not correct.
Here are my settings at the moment:

1 [;\sLAYER:\s([0-9]+).] CURA
1 [; layer ([0-9]+),.
] Simplify3D
1 [;LAYER:([0-9]+).] ideaMaker
count [; BEGIN_LAYER_OBJECT.
] KISSlicer
count [;BEFORE_LAYER_CHANGE] Slic3r

In Prusasslicer i removed the ;LAYER: line. I prefer to stay stock and not add too much stuff to the gcode.

So it has to use: count [;BEFORE_LAYER_CHANGE] Slic3r
i guess.

@OllisGit
Copy link
Owner

OllisGit commented Oct 7, 2019

Hi @ManuGithubSteam ,

with incorrect layer count, you mean the difference between sidebar ("DisplayLayerProgress-Plugin") and Tab-Content ("Dashboard-Plugin"), right?

You are already raised an issue about this topic: j7126/OctoPrint-Dashboard#81

From my point of view the issue is solved, because it is related to the dashboard plugin.

PS. Why do you have two Layer-Output on the left-side?

@OllisGit OllisGit closed this as completed Oct 7, 2019
@OllisGit OllisGit reopened this Oct 7, 2019
@OllisGit OllisGit removed the status: waitingForFeedback Wating for Customers feedback label Oct 11, 2019
@michaelsheridan23
Copy link

I cannot get my MK3s setup to show the current layer. Can someone post a screen shot of their "Custom G-Code" screen is PrusaSlicer? I have tried what is suggested here and I am still getting a "Layer: - / 62" in my files. Obviously the 62 changes, that is just what I see on my current file.

@AbuMaia
Copy link

AbuMaia commented Jan 21, 2020

Michael:
I have
M117 INDICATOR-Layer[layer_num]
in my "Before layer change g-code" section.

@h4nc
Copy link

h4nc commented Feb 7, 2020

@OllisGit everything works fine but the current layer number. I added

;BEFORE_LAYER_CHANGE
;[layer_z]

to my "Before layer change g-code" section, but this only provided the total number. So what I get during printing is for example "-/50". Works fine for Cura prints. What am I doing wrong?

@OllisGit
Copy link
Owner

OllisGit commented Feb 7, 2020

Hi @h4nc,
do you use the default layer indicator expressions?
If true you only need to add ;BEFORE_LAYER_CHANGE to your g-code section.
After that, DLP just count the occurrence.

Please attach your gcode (as Zip) that was created by your slicer and also the g-code after uploading to OP (download from files-listing).

@OllisGit
Copy link
Owner

OllisGit commented Feb 7, 2020

Hi @michaelsheridan23 , @AbuMaia , @h4nc !!!

This is a closed issue, next time please create a new issue.
Because I am not observing closed issues, so I CAN''T HELP YOU!!

@h4nc
Copy link

h4nc commented Feb 7, 2020

do you use the default layer indicator expressions?

@OllisGit I don't understand or I don't know if I use it. How can I tell.

Please attach your gcode (as Zip) that was created by your slicer and also the g-code after uploading to OP (download from files-listing).

Will do if your suggestions did not work

@OllisGit
Copy link
Owner

OllisGit commented Feb 8, 2020

Hi @h4nc ,
the plugin scans the gcode (druing upload) for layer-indicators (cura use ;LAYER:21). This is done via regular expressions.
Because you didn't know about that, so you use the default settings!

image

@h4nc
Copy link

h4nc commented Feb 8, 2020

Ok, so I will delete

;[layer_z]

from my slicer settings and try again.

@h4nc
Copy link

h4nc commented Feb 8, 2020

@OllisGit thanks now it working. Not a big issue, because it's good enough like that for me, but slic3r files have an offset of 1 layer. So when it's on layer 1 it shows me 2.

In the Setting layer offset I have the standard value "1". So that makes sense.
I use cura and slic3r files.

Some slicers start at layer zero (like CURA) and some starts at layer one.
Here you can add an offset to the layer count.

So this basically means that I have to decide for one to be shown correctly, right?

@OllisGit
Copy link
Owner

OllisGit commented Feb 9, 2020

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants