Measure_linear_vibrations_range ERROR!

was doing some testing....
measures_linear_vibrations_range axis=x vmin=50 vmax=300 step=25
measures_linear_vibrations_range axis=x vmin=50 vmax=300 step=25
Tests ran fine, and generated three graphs in the /home/pi/printer_data/config/linear_vibration folder peak_frequencies_logscale2023-03-15T10:54:15.207785.png peak_frequencies2023-03-15T10:54:15.207744.png relative_power2023-03-15T10:54:14.725170.png Then the machine reset with an error see attached klippy log c-a-p (attached here) printer.cfg section was simply
accel_chip: adxl345
x_min: 50
x_max: 450
y_min: 50
y_max: 450
output_directory: /home/pi/printer_data/config/linear_vibration/
accel_chip: adxl345
x_min: 50
x_max: 450
y_min: 50
y_max: 450
output_directory: /home/pi/printer_data/config/linear_vibration/
and there are three files there in that directory as listed above. This is RO v2 on a VC500. Test appeared to (mechanically) run fine. I'm not sure why it would come up with the typical orange text system error...fix and reset screen (parts cooling fan sent to full power etc needing a reboot to continue) anyone run into this? or is the 'range' test not functional under R) v2?
84 Replies
miklschmidt
miklschmidt2y ago
Your adxl345 isn't responding try ACCELEROMETER_QUERY
ptegler
pteglerOP2y ago
accelerometer values (x, y, z): -296.082377, -666.185348, 10955.165621 isn't ther a noice test? noise
miklschmidt
miklschmidt2y ago
MEASURE_AXES_NOISE
ptegler
pteglerOP2y ago
Axes noise for xy-axis accelerometer: 15.192091 (x), 15.945923 (y), 24.867745 (z)
miklschmidt
miklschmidt2y ago
Nothing wrong there
ptegler
pteglerOP2y ago
as previously mentioned...test ran then messed up at the end. Is it three, or four graphs?
miklschmidt
miklschmidt2y ago
Is it possible it lost connection midway? Is the wire/connectors properly secured etc?
ptegler
pteglerOP2y ago
perhaps a spot of hot glue on the connector
miklschmidt
miklschmidt2y ago
But the error in your klipper.log says "gcode.CommandError: Unable to obtain 'adxl345_status' response"
ptegler
pteglerOP2y ago
(to make sure is stays connected) Internal error on command:"MEASURE_LINEAR_VIBRATIONS_RANGE" 1:15 PM Klipper state: Shutdown 1:15 PM output written to /home/pi/printer_data/config/linear_vibration/peak_frequencies_logscale2023-03-15T13:15:14.278438.png 1:15 PM output written to /home/pi/printer_data/config/linear_vibration/peak_frequencies2023-03-15T13:15:14.278397.png 1:15 PM output written to /home/pi/printer_data/config/linear_vibration/relative_power2023-03-15T13:15:13.818979.png
ptegler
pteglerOP2y ago
ptegler
pteglerOP2y ago
basically the same as before. Three new files,then errors
No description
ptegler
pteglerOP2y ago
possible .py file corruption?
miklschmidt
miklschmidt2y ago
There's nothing wrong with the .py file then the parser would error out. This here is an adxl345_status error, as in, it can't query your adxl345. Not sure why. It's not impossible it's a bug, but it doesn't look that way. @MarschallMarc any ideas?
ptegler
pteglerOP2y ago
does seem odd as the first three run just fine
miklschmidt
miklschmidt2y ago
indeed
ptegler
pteglerOP2y ago
data query anyway... perhaps a faulty ADXL? status query not working vs data query but you'd think it would query completion status between runs
miklschmidt
miklschmidt2y ago
There's another thread here with a guy reporting the exact same problem
ptegler
pteglerOP2y ago
saw that
miklschmidt
miklschmidt2y ago
So it's probably a bug 😄
ptegler
pteglerOP2y ago
crap.
miklschmidt
miklschmidt2y ago
Yeah we'd need to wait for upstream fixes from @MarschallMarc
ptegler
pteglerOP2y ago
surprised noone else has hit it. Wahts the diff in the single run vs this 'range' run
miklschmidt
miklschmidt2y ago
I believe i promised him to run it on my machine, but i didn't do that yet
miklschmidt
miklschmidt2y ago
GitHub
GitHub - worksasintended/klipper_linear_movement_analysis
Contribute to worksasintended/klipper_linear_movement_analysis development by creating an account on GitHub.
ptegler
pteglerOP2y ago
...t'was where I started 🙂 I remembered though you'd incorporated it in V2 let go run the 'single' and see what it does
ptegler
pteglerOP2y ago
will have to check my wires/chip
No description
marschallmarc
marschallmarc2y ago
I didn't check it with the latest klipper updates, so might be sth going on there Promised might be too strong, but you agreed to do it 😋 That one however is not related to my stuff, I think It basically sais what is happening
ptegler
pteglerOP2y ago
wires all good.... ran single ..got the error above.... re-ran 'range' and it repeated as first proposed in this thread
marschallmarc
marschallmarc2y ago
This can also be when it errors out. It doesnt handle it well that we lock the device but don't release it on error I cannot read the file on my mobile rn, but I will see if there is an earlier error happening
ptegler
pteglerOP2y ago
full log...should show all attempt errors ( single vibe and range vibe attempts
marschallmarc
marschallmarc2y ago
Klipper really needs a mode where it does less logging... Every freaking second full status report is insane
ptegler
pteglerOP2y ago
yep the mcu updates are nuts
marschallmarc
marschallmarc2y ago
Its an error with the plot in matplotlib Invalid axis z
ptegler
pteglerOP2y ago
wow
marschallmarc
marschallmarc2y ago
Yep, line 422 Which is caused by different versions of matplotlib between what was installed when I developed it and which is installed now Easy fix though @miklschmidt #debuggingCodeUsingASmartPhoneButWhy
miklschmidt
miklschmidt2y ago
What do? 😄
marschallmarc
marschallmarc2y ago
Well, basically just read the matplotlib docu and correct the plot command. It was the py2 vs py3 thingy here... its just a command to set the ticklables thats going rouge In my next life I will learn to use the answer button, I swear
miklschmidt
miklschmidt2y ago
the plot command? so a change to the plugin? that requires commit access to your repository 😄
marschallmarc
marschallmarc2y ago
I will just do it
miklschmidt
miklschmidt2y ago
Very nice! 😄
marschallmarc
marschallmarc2y ago
so ppl can also just use the update button and its ok
miklschmidt
miklschmidt2y ago
indeed
marschallmarc
marschallmarc2y ago
just need to setup a new klipper pi quickly to test before release 😛
ptegler
pteglerOP2y ago
just updated Klipper now a different error! klippy.log
send_seq=25195 receive_seq=25195 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179999485 Octopus_Pro_446: temp=26.9 raspberry_pi: temp=32.6 heater_bed: target=0 temp=24.9 pwm=0.000 TMC5160_X: temp=27.5 TMC5160_Y: temp=32.8 sysload=0.38 cputime=25.540 memavail=1226616 print_time=123.615 buffer_time=0.000 print_stall=0 extruder: target=0 temp=26.1 pwm=0.000
toolhead: max_velocity: 800.000000
max_accel: 8000.000000
max_accel_to_decel: 8000.000000
square_corner_velocity: 5.000000
API Dump Helper start callback error
Traceback (most recent call last):
File "/home/pi/klipper/klippy/extras/motion_report.py", line 46, in _start
self.startstop_cb(True)
File "/home/pi/klipper/klippy/extras/adxl345.py", line 430, in _api_startstop
self._start_measurements()
File "/home/pi/klipper/klippy/extras/adxl345.py", line 376, in _start_measurements
raise self.printer.command_error(
gcode.CommandError: Invalid adxl345 id (got ff vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.
Invalid adxl345 id (got ff vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.
Stats 10648.5: gcodein=0 mcu: mcu_awake=0.378 mcu_task_avg=0.000145 mcu_task_stddev=0.000000 bytes_write=1059596 bytes_read=199908 bytes_retransmit=9 bytes_invalid=0 send_seq=25431 receive_seq=25431 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179999475 Octopus_Pro_446: temp=26.9
send_seq=25195 receive_seq=25195 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179999485 Octopus_Pro_446: temp=26.9 raspberry_pi: temp=32.6 heater_bed: target=0 temp=24.9 pwm=0.000 TMC5160_X: temp=27.5 TMC5160_Y: temp=32.8 sysload=0.38 cputime=25.540 memavail=1226616 print_time=123.615 buffer_time=0.000 print_stall=0 extruder: target=0 temp=26.1 pwm=0.000
toolhead: max_velocity: 800.000000
max_accel: 8000.000000
max_accel_to_decel: 8000.000000
square_corner_velocity: 5.000000
API Dump Helper start callback error
Traceback (most recent call last):
File "/home/pi/klipper/klippy/extras/motion_report.py", line 46, in _start
self.startstop_cb(True)
File "/home/pi/klipper/klippy/extras/adxl345.py", line 430, in _api_startstop
self._start_measurements()
File "/home/pi/klipper/klippy/extras/adxl345.py", line 376, in _start_measurements
raise self.printer.command_error(
gcode.CommandError: Invalid adxl345 id (got ff vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.
Invalid adxl345 id (got ff vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.
Stats 10648.5: gcodein=0 mcu: mcu_awake=0.378 mcu_task_avg=0.000145 mcu_task_stddev=0.000000 bytes_write=1059596 bytes_read=199908 bytes_retransmit=9 bytes_invalid=0 send_seq=25431 receive_seq=25431 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179999475 Octopus_Pro_446: temp=26.9
ptegler
pteglerOP2y ago
No description
ptegler
pteglerOP2y ago
x homed and it just stopped. Now neither single nor range run
blacksmithforlife
perhaps your wiring has gone loose? It happened to me, after all the high speed movements the wires near my soldering had stress cracked and broken off
ptegler
pteglerOP2y ago
just finished ohming out my harness...tugged and wiggled...no breaks good continuity . Rebooted (full power down/power up) Homed all axis ran MEASURE_AXES_NOISE just to test. All was well. Ran measure_linear_vibrations axis=x vmin=50 vmax=300 step=25 No error this time, but it only wrote one file. The final multi spike graph that it was not running before. Carriage only made one pass
ptegler
pteglerOP2y ago
No description
ptegler
pteglerOP2y ago
repeated the entire routine...same thing. Now it only runs one X axis move and prints one graph
ptegler
pteglerOP2y ago
klippy log shortened to just the last reboot see attached. making litle to no sense as all this worked. I was getting 3 graphs, then would F up on the fourth. Now I'm only getting the four
ptegler
pteglerOP2y ago
just ran the 'range'
No description
ptegler
pteglerOP2y ago
No description
ptegler
pteglerOP2y ago
only wrote three files
ptegler
pteglerOP2y ago
No description
ptegler
pteglerOP2y ago
@miklschmidt Q? an 'update' would over-write any possible bad *.py file is included in an update correct? Just wondering if i have a bad TF card or something else is going on. belt tension, adxl noise test and input shaper all work just fine. It's just the linear vibration stuff that is a no-go. I saw the Klipper update, but didn't seem to change anything. or--- am I jumping the gun...updates/corrections still in process?
miklschmidt
miklschmidt2y ago
yes. You don't have bad python files though, it wouldn't make it as far as it does. Like marc said there's a bug in the linear vibration plugin, he will fix it.
ptegler
pteglerOP2y ago
tnx...guees that was what i was wondering..the most recent (earlier this afternoon) Klpper update was not/did not include the fix.
miklschmidt
miklschmidt2y ago
No, like i said it's a plugin You can see it in the update manager
ptegler
pteglerOP2y ago
👍
miklschmidt
miklschmidt2y ago
There'll be an update to this as soon as marc gets it done. That'll fix it.
No description
marschallmarc
marschallmarc2y ago
Yep, but the wrong ID thingy I am pretty sure does not come from my plugin. That's hardware related
ptegler
pteglerOP2y ago
that's been straightened out at this end. After testing the wiring for faults, I'd plugged it back in wrong. Belt tension, adxl noise, input shaper all work properly , so i'm comfortable the ADXL itself is fine. thanks for your attention to all this MM !
blacksmithforlife
I hate plugs that allow you to plug them in wrong
ptegler
pteglerOP2y ago
instead of duponts, I've recently considered flyleading a XL or PH connector to that ADXL board for that very reason as I usually pull back those wires to reduce umbilical weight when the ADXL is not needed
miklschmidt
miklschmidt2y ago
I use JST-XH on all of mine
ptegler
pteglerOP2y ago
hehe one of many stacks....
ptegler
pteglerOP2y ago
No description
ptegler
pteglerOP2y ago
any progress on fixing this plug-in? bump? Is this RO v2 included asset being fixed? or is it a dead effort? I see on github, a few others have seen this issue as well (fortuh graph does not run)
miklschmidt
miklschmidt2y ago
@MarschallMarc
marschallmarc
marschallmarc2y ago
Its on my this weeks todo list
ptegler
pteglerOP2y ago
Thanks for the update!
Joao Barros
Joao Barros2y ago
If confirmation was needed, I'm being bitten by the same issue too
marschallmarc
marschallmarc2y ago
Fixed
Joao Barros
Joao Barros2y ago
Thanks, will test tonight 🙂
ptegler
pteglerOP2y ago
just updated....it all works now thanks for the efforts @Marschall Marc
marschallmarc
marschallmarc2y ago
More to come with that one. A few ideas brewing 😛
Igor
Igor2y ago
hello marc, there are also instructions on how to interpret the graphs
marschallmarc
marschallmarc2y ago
Adding a few features within the next 2 to 3 weeks, after that I will do that. but to be honest, on some things we will learn over time seing more data over time as well 😄
tg73
tg735mo ago
@Marschall Marc @miklschmidt I'm trying to use measure_linear_vibrations_range (mlvr) with the current updated ratos 2.1 rc. After the command writes 3 graph images, klipper shuts down. The 3d plot shown in the klipper_linear_movement_analysis (klma) readme is not generated. I've tried both main and development branches of klma, same behaviour. Please let me know if you'd rather see this as a separate issue. It appears to originate with this exception (klma development branch):
Internal Error on WebRequest: gcode/script
Traceback (most recent call last):
File "/home/pi/klipper/klippy/webhooks.py", line 256, in _process_request
func(web_request)
File "/home/pi/klipper/klippy/webhooks.py", line 436, in _handle_script
self.gcode.run_script(web_request.get_str('script'))
File "/home/pi/klipper/klippy/gcode.py", line 229, in run_script
self._process_commands(script.split('\n'), need_ack=False)
File "/home/pi/klipper/klippy/gcode.py", line 211, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 137, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
File "/home/pi/klipper/klippy/extras/linear_movement_vibrations.py", line 158, in cmd_MEASURE_LINEAR_VIBRATIONS_RANGE
[ACCEL=<set acceleration default max_accel>]`
File "/home/pi/klipper/klippy/extras/linear_movement_vibrations.py", line 416, in _plot_frequency_responses_over_velocity
)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 3) + inhomogeneous part.
MCU 'toolboard_t0' shutdown: Command request
Internal Error on WebRequest: gcode/script
Traceback (most recent call last):
File "/home/pi/klipper/klippy/webhooks.py", line 256, in _process_request
func(web_request)
File "/home/pi/klipper/klippy/webhooks.py", line 436, in _handle_script
self.gcode.run_script(web_request.get_str('script'))
File "/home/pi/klipper/klippy/gcode.py", line 229, in run_script
self._process_commands(script.split('\n'), need_ack=False)
File "/home/pi/klipper/klippy/gcode.py", line 211, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 137, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
File "/home/pi/klipper/klippy/extras/linear_movement_vibrations.py", line 158, in cmd_MEASURE_LINEAR_VIBRATIONS_RANGE
[ACCEL=<set acceleration default max_accel>]`
File "/home/pi/klipper/klippy/extras/linear_movement_vibrations.py", line 416, in _plot_frequency_responses_over_velocity
)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 3) + inhomogeneous part.
MCU 'toolboard_t0' shutdown: Command request
marschallmarc
marschallmarc5mo ago
I cannot verify the issue, as I am away from printers for a couple of more days at least. It looks like the plot fails, because the data are not as the plot function expects them. It is possible that the latest klipper version is not compatible, I did not track the changes. If generating the graphs for IS still works as expected, it very well may be an issue with klma (never saw this acronym before :P). However, I cannot imagine this being a hard fix, if it is the case. There is not much complexity to it
tg73
tg735mo ago
Thanks for the prompt reply! Other graphs (regular klipper ones and klippain shake tune) work as expected. I might try to comment out the offending graph generation for now - I am a coder, but not python and notably I don't have domain familiarity. Kinda-fixed/fudged by me in https://github.com/tg73/klipper_linear_movement_analysis/tree/fix-np. The 3d chart is now generated but lacks colour per velocity. But it doesn't crash. Just a sticking plaster applied dumbly without understanding the consequences.
marschallmarc
marschallmarc5mo ago
Thanks. I will have a look, I would prefer to not lose features on PR though. To be perfectly honest, I almost remember nothing about the implementation :kekw:

Did you find this page helpful?