Printrun icon indicating copy to clipboard operation
Printrun copied to clipboard

pid tune problem

Open xtatorx opened this issue 3 years ago • 34 comments

replace my hot end with a slice engineering all metal hot end and replaced the board with the btt skr mine e3 v2 updated marlin firmware and when i try to do the pid tune i keep getting the same error please see attached pic 20210724_092050

xtatorx avatar Jul 26 '21 00:07 xtatorx

This is probably a hardware problem - I suspect you have a power brownout on your board because your new hotend pulls too much power, and it's causing the microcontroller to reset itself and the USB port to no longer work. Sadly there's nothing we can do about it in software.

kliment avatar Jul 26 '21 07:07 kliment

how do i know forsure and whats the fix then

xtatorx avatar Jul 26 '21 11:07 xtatorx

so i was able to get controls to work, pronterface and printer communicating but when i start the pid tune this happens.

Traceback (most recent call last): File "threading.py", line 932, in _bootstrap_inner File "threading.py", line 870, in run File "printrun\printcore.py", line 420, in _listen File "printrun\printcore.py", line 354, in _readline IndexError: tuple index out of range

xtatorx avatar Jul 26 '21 21:07 xtatorx

What did you change to make it work?

That last error is something on our side. Can you enable "settings" -> "debug communications" and run it again?

Also, which version of printrun are you running?

kliment avatar Jul 27 '21 06:07 kliment

@xtatorx you can test whether the artifacts at https://github.com/volconst/Printrun/actions/runs/1074748808 fix the problem. There are 2 exceptions and the fix is only for the last, but the other may be ok to occur.

volconst avatar Jul 28 '21 16:07 volconst

running debug now and its the 2.0.0rc8

xtatorx avatar Jul 29 '21 18:07 xtatorx

THIS IS WHAT HAPPENED AFTER THE DEBUG RUN Exception in thread read thread: Traceback (most recent call last): File "printrun\printcore.py", line 333, in _readline File "printrun\printcore.py", line 329, in _readline_nb File "serial\serialwin32.py", line 275, in read serial.serialutil.SerialException: ClearCommError failed (PermissionError(13, 'The device does not recognize the command.', None, 22))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "threading.py", line 932, in _bootstrap_inner File "threading.py", line 870, in run File "printrun\printcore.py", line 420, in _listen File "printrun\printcore.py", line 354, in _readline IndexError: tuple index out of range

xtatorx avatar Jul 29 '21 18:07 xtatorx

how do i fix this

xtatorx avatar Sep 14 '21 21:09 xtatorx

@xtatorx you can test whether the artifacts at https://github.com/volconst/Printrun/actions/runs/1074748808 fix the problem. There are 2 exceptions and the fix is only for the last, but the other may be ok to occur.

tried this with no fix

xtatorx avatar Sep 14 '21 21:09 xtatorx

Connecting... Printer is now online.

m303 e0 s200 u1 SENDING:M303 E0 S200 U1 PID Autotune start Exception in thread read thread: Traceback (most recent call last): File "printrun\printcore.py", line 333, in _readline File "printrun\printcore.py", line 329, in _readline_nb File "serial\serialwin32.py", line 275, in read serial.serialutil.SerialException: ClearCommError failed (PermissionError(13, 'The device does not recognize the command.', None, 22))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "threading.py", line 932, in _bootstrap_inner File "threading.py", line 870, in run File "printrun\printcore.py", line 420, in _listen File "printrun\printcore.py", line 354, in _readline IndexError: tuple index out of range Can't write to printer (disconnected ?): Traceback (most recent call last): File "printrun\printcore.py", line 744, in _send File "serial\serialwin32.py", line 317, in write serial.serialutil.SerialException: WriteFile failed (PermissionError(13, 'The device does not recognize the command.', None, 22))

xtatorx avatar Sep 14 '21 21:09 xtatorx

Hi @volconst, I just recognize the parameter u. Do printrun decode this parameter for PID tuning? M303 E0 S200 U1

DivingDuck avatar Sep 14 '21 21:09 DivingDuck

tried that. with no luck

On Tue, Sep 14, 2021, 5:55 PM DivingDuck @.***> wrote:

Hi @volconst https://github.com/volconst, I just recognize the parameter u. Do printrun decode this parameter for PID tuning? M303 E0 S200 U1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1204#issuecomment-919540089, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU7BFDDZFYR6A6JZ2GXGTZDUB7ADPANCNFSM5A7BJUNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

xtatorx avatar Sep 14 '21 22:09 xtatorx

what happen if you do: M303 E0 S200 without U parameter?

DivingDuck avatar Sep 14 '21 22:09 DivingDuck

same error

On Tue, Sep 14, 2021, 6:12 PM DivingDuck @.***> wrote:

what happen if you do: M303 E0 S200 without U parameter?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1204#issuecomment-919549279, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU7BFDERM35ZF4M2EN6QTILUB7CERANCNFSM5A7BJUNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

xtatorx avatar Sep 14 '21 22:09 xtatorx

@xtatorx , Enable debug communication in the exe from https://github.com/volconst/Printrun/actions/runs/1074748808 and include the log together with the exception stack trace.

volconst avatar Sep 15 '21 15:09 volconst

Hi @volconst, I just recognize the parameter u. Do printrun decode this parameter for PID tuning? M303 E0 S200 U1

I believe unknown parameters are forwarded transparently to the printer. The "SENDING:" prefix should denote the real payload sent to the printer, so I do not think U parameter causes error in pronterface during sending.

volconst avatar Sep 15 '21 15:09 volconst

i did the debug file abd posted it to my post on github

On Wed, Sep 15, 2021, 11:13 AM volconst @.***> wrote:

@xtatorx https://github.com/xtatorx , Enable debug communication in the exe from https://github.com/volconst/Printrun/actions/runs/1074748808 and include the log together with the exception stack trace.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1204#issuecomment-920111286, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU7BFDGXVPOVUGCHBTAGFQTUCCZ3BANCNFSM5A7BJUNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

xtatorx avatar Sep 15 '21 16:09 xtatorx

@xtatorx ,

i did the debug file abd posted it to my post on github

File "printrun\printcore.py", line 354, in _readline IndexError: tuple index out of range

The stack trace line number "354, in _readline" corresponds to rc8 https://github.com/kliment/Printrun/blob/5d0ec6d25dd67fc51afccf028d4e77606ec81900/printrun/printcore.py#L354

I instructed you to (download, run and) test exe from https://github.com/volconst/Printrun/actions/runs/1074748808 whose line 354 does not seem capable of throwing the index error you report

https://github.com/volconst/Printrun/blob/1b1d1b531c74373d5b69bce73b204ebc8c5e2f93/printrun/printcore.py#L354

Please verify that you downloaded and ran the fixed exe and include it's log.

volconst avatar Sep 15 '21 18:09 volconst

i downloaded that one and ran it but ill get the debug logs

On Wed, Sep 15, 2021, 2:11 PM volconst @.***> wrote:

@xtatorx https://github.com/xtatorx ,

i did the debug file abd posted it to my post on github

File "printrun\printcore.py", line 354, in _readline IndexError: tuple index out of range

The stack trace line number "354, in _readline" corresponds to rc8

https://github.com/kliment/Printrun/blob/5d0ec6d25dd67fc51afccf028d4e77606ec81900/printrun/printcore.py#L354

I instructed you to (download, run and) test exe from https://github.com/volconst/Printrun/actions/runs/1074748808 whose line 354 does not seem capable of throwing the index error you report

https://github.com/volconst/Printrun/blob/1b1d1b531c74373d5b69bce73b204ebc8c5e2f93/printrun/printcore.py#L354

Please verify that you downloaded and ran the fixed exe and include it's log.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1204#issuecomment-920261107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU7BFDFNSWM4AENN6F2M6SDUCDOVBANCNFSM5A7BJUNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

xtatorx avatar Sep 15 '21 18:09 xtatorx

trying to get the debug logs now
with that exe you said to use

xtatorx avatar Sep 18 '21 23:09 xtatorx

@xtatorx ,

i did the debug file abd posted it to my post on github

File "printrun\printcore.py", line 354, in _readline IndexError: tuple index out of range

The stack trace line number "354, in _readline" corresponds to rc8 https://github.com/kliment/Printrun/blob/5d0ec6d25dd67fc51afccf028d4e77606ec81900/printrun/printcore.py#L354

I instructed you to (download, run and) test exe from https://github.com/volconst/Printrun/actions/runs/1074748808 whose line 354 does not seem capable of throwing the index error you report

https://github.com/volconst/Printrun/blob/1b1d1b531c74373d5b69bce73b204ebc8c5e2f93/printrun/printcore.py#L354

Please verify that you downloaded and ran the fixed exe and include it's log.

how do i get the log thats the version im using fromt he exe link you sent

xtatorx avatar Sep 18 '21 23:09 xtatorx

20210918_190921

xtatorx avatar Sep 18 '21 23:09 xtatorx

im also getting a heating failed E1 printer halted. what does that mean. im using the stock ender 3 pro heater cartridge and a e3d thermistor.

xtatorx avatar Sep 18 '21 23:09 xtatorx

@xtatorx , thanks for the feedback. I now see that the second (index) exception is not raised and that's a progress for pronterface. The E1 in the message you get probably means Extruder1 (that is a second extruder), which is strange because you typed e0 in the command. You have to check your marlin configuration - how many extruders are configured. I you do not have it, in the marlin source code are available many config files, probably there is one for your model, you have to customize it, see the extruder configuration there, compile and flash the binary to the printer board. This is complex, and before this you can check the wirings, did you connect to the correct pins. You can just check if heating works - set a target temperature to 40 degrees C, and touch the heater block to feel if it heats. This will tell you if heating wires are ok, and also the thermistor to some extent. Beware that if something is wrong it may get dangerously hot. Restart the printer after this, to prevent further heating. Another workaround is to put the m303 command in a gcode file, copy it to a SD card and print it from the sdcard, with the usb cable disconnected to prevent any doubt of pronterface involvement.

volconst avatar Sep 20 '21 17:09 volconst

the hot end is heating up. i do know that. i can heat the printer to 240c and it stays there. when i go above that is when i get the e1 error. i have a feeling its because i cant do the pid tune. so how do i fix the pid issue first

On Mon, Sep 20, 2021, 1:35 PM volconst @.***> wrote:

@xtatorx https://github.com/xtatorx , thanks for the feedback. I now see that the second (index) exception is not raised and that's a progress for pronterface. The E1 in the message you get probably means Extruder1 (that is a second extruder), which is strange because you typed e0 in the command. You have to check your marlin configuration - how many extruders are configured. I you do not have it, in the marlin source code are available many config files, probably there is one for your model, you have to customize it, see the extruder configuration there, compile and flash the binary to the printer board. This is complex, and before this you can check the wirings, did you connect to the correct pins. You can just check if heating works - set a target temperature to 40 degrees C, and touch the heater block to feel if it heats. This will tell you if heating wires are ok, and also the thermistor to some extent. Beware that if something is wrong it may get dangerously hot. Restart the printer after this, to prevent further heating. Another workaround is to put the m303 command in a gcode file, copy it to a SD card and print it from the sdcard, with the usb cable disconnected to prevent any doubt of pronterface involvement.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1204#issuecomment-923135085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU7BFDCT25Q3GXYXQCKG4PTUC5WE5ANCNFSM5A7BJUNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

xtatorx avatar Sep 20 '21 18:09 xtatorx

@xtatorx I think the printer halts because it does not reach the desired temperature in some hard coded time in marlin. You can probably reach higher temperatures if you put silicon sleeve on the heater block. However I think that the issue is not pronterface related, especially if the printer lcd says - printer halted. If you still think that the problem is in pronterface, please include screenshot of the printer lcd with your post.

volconst avatar Sep 21 '21 20:09 volconst

i know the heating failed isnt in pronterface. but when i try to do a pid tune in pronterface thinking that may help with the heating failed error, it diaconnects and throws some codes i dont understand. see the pics. i think the heating failes may be a bad heater cartidge. becuase it wont go above 240. ive already replaced the thermistor and changed marlin for it. so i have 2 problems. really.

  1. cant do pid tune
  2. heating failed.

wasnt sure if one was causing the other. i know very little about software and coding.

On Tue, Sep 21, 2021, 4:32 PM volconst @.***> wrote:

@xtatorx https://github.com/xtatorx I think the printer halts because it does not reach the desired temperature in some hard coded time in marlin. You can probably reach higher temperatures if you put silicon sleeve on the heater block. However I think that the issue is not pronterface related, especially if the printer lcd says - printer halted. If you still think that the problem is in pronterface, please include screenshot of the printer lcd with your post.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1204#issuecomment-924361654, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU7BFDHW3PCQS2YRHMBOF23UDDTVDANCNFSM5A7BJUNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

xtatorx avatar Sep 21 '21 21:09 xtatorx

Is the printer halted when the PID autotune fails? Please post photo of the printer lcd when the PID autotune fails. You can also enable the pronterface temperature graph in settings and post a screenshot of the temp graph and error pane with the exception together. What is the marlin version? I told you before to put the m303 command in sd/tf card and print the file from it without usb cable connected. Please reply with the effect of all my tips, or I will lose interest and leave the conversation. It is possible that marlin have maximum temp and refuse going above it. It should be checked whats the max temp value, it is probably a marlin directive. Are you able to compile and flash marlin?

volconst avatar Sep 21 '21 21:09 volconst

i know the heating failed isnt in pronterface. but when i try to do a pid tune in pronterface thinking that may help with the heating failed error,

If the printer can't reach 260 deg C, e.g. due to power, then it is logical that the PID tune also fails, because the tune just measures how fast the heater reaches the temp and cools down.

volconst avatar Sep 21 '21 21:09 volconst

Is the printer halted when the PID autotune fails? Please post photo of the printer lcd when the PID autotune fails. You can also enable the pronterface temperature graph in settings and post a screenshot of the temp graph and error pane with the exception together. What is the marlin version? I told you before to put the m303 command in sd/tf card and print the file from it without usb cable connected. Please reply with the effect of all my tips, or I will lose interest and leave the conversation. It is possible that marlin have maximum temp and refuse going above it. It should be checked whats the max temp value, it is probably a marlin directive. Are you able to compile and flash marlin?

no the printer is not halted when pid tune fails. im not sure how to put the m303 on sd. can you please explain.. i have already changed all the marlin max temp settings to 285c. im using the marlin 2.0.08 firmware. and see attachted pics for graph lcd and error message

xtatorx avatar Sep 21 '21 22:09 xtatorx