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

Fixed Temperature assigned by gx script?? #21

Open
Phantom2200 opened this issue Mar 21, 2023 · 9 comments
Open

Fixed Temperature assigned by gx script?? #21

Phantom2200 opened this issue Mar 21, 2023 · 9 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Phantom2200
Copy link

No matter what temperature i choose in my Cura profile, it sets to 180°C which is too low (stepper motor starts clicking because the filament is under too much pressure)

@ronoaldo
Copy link
Owner

Hi @Phantom2200 , that is interesting, I saw a similar behavior with the newer version of Cura. I initially thought it was something with my printer, but it could be something else. Do you happen to have an older Cura version, 4.x, to test it out just so i can confirm it is related to Cura 5?

@ronoaldo ronoaldo self-assigned this Mar 21, 2023
@ronoaldo ronoaldo added the bug Something isn't working label Mar 21, 2023
@ronoaldo
Copy link
Owner

The file itself has the temperature, but it looks like the temperature is set as a floating point number, like 220.0, and before it was set as 220 without the .0 at the end. This was a change in Cura itself as far as I could tell, but I could be wrong.

@ronoaldo ronoaldo added this to the Version 2.4 milestone Mar 21, 2023
@Santoshsomi
Copy link

@ronoaldo i dont think there is no issue in temp. I checked with Cura 5.3.0, seems okay for me. Can you give me gcode file where you see issue? I know its a old issue but i can fix it if the issue persists because i created the definition files for finder.

  • Santosh (eskeyaar)

@ronoaldo
Copy link
Owner

Hi! Yes, I can share the file with you. Allow me some time to reinstall Cura and create the file for you.

Best regards.

@ronoaldo
Copy link
Owner

OK, I guess this was a bug that I never noticed but here are the results of my testing:

  1. If the G code command sends the temperature as a float number (200.0 instead of 200) the Finder firmware seems to ignore that value and defaults to the lowest possible temperature
  2. If the xgcode command has a temperature in it, it is used by the finder as a "warming" or initial temperature and as such it should work

The code here should parse the starting temperature (material print temperature) and use that to the header, but this is currently not done:

https://github.com/ronoaldo/FlashforgeFinderIntegration/blob/master/plugins/GXWriter/GXWriter.py#L90

Perhaps refactoring as proposed in #16 could help fix this as well.

@ronoaldo
Copy link
Owner

Github is not allowing me to upload the file here, so I'm sharing from Drive:

https://drive.google.com/file/d/1agIAbxvDT47iYwhzjLXFO2VcN8m1OkJj/view?usp=drivesdk

Had to reinstall Cura to latest version.

One thing I noticed is that if the temperature GCode has a comment, Cura adds a .0 at the end of the temperature settings. I'm not sure if that even makes sense.

@eskeyaar
Copy link
Contributor

I see you have fixed it, but giving cura temp is not reflecting in gcode or machine? Its bizarre that float value can affect changes too..

@ronoaldo
Copy link
Owner

ronoaldo commented Mar 10, 2024

I see you have fixed it, but giving cura temp is not reflecting in gcode or machine? Its bizarre that float value can affect changes too..

It has been a while since I tested this and I could be wrong but if I'm not mistaken this was what I noticed.

Interestingly enough, if the custom gcode for the printer start/end scripts has comments, then Cura generates temperatures as float points; without comments it generates without the dot in the temp number. Quite odd! Perhaps some g-code flavour shenanigans.

ronoaldo added a commit that referenced this issue Apr 7, 2024
The start gcode macros in recent versions of Cura
format the print temperature as a floating point.
Other temperature commands in the gcode don't have
such behavior.

On Finder (version 1?) with the more recent firmware, this
causes the temperature to be the fixed to start at 185C,
which appears to be the "default start temperature" or some
rounding error when reading the floating point temperature.

This commit fixes that by parsing the 'M104 SXXX' commands,
and changing the temperature by converting it to integer.
This also allows the temperature to be embedded to the .gx
file header.

I took the opportunity to move the parsing commands into the
gx.py script, as a way to potentially easy the proccess to
make this a standalone script that can potentially be used
by other slicers/software.

Fixes #21
Related to #2 and #16
@ronoaldo
Copy link
Owner

ronoaldo commented Apr 9, 2024

Hi! I believe that this was fixed with the 2.1 release, also published on the Cura Marketplace. Can you guys confirm? I was able to reproduce and see the fix on my Finder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants