GithubHelp home page GithubHelp logo

deutherius / vgb Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 7.0 192 KB

VGB - Virtual Gantry Backers. A set of gcode_macro-based functions that counteract the effects of bimetallic expansion of aluminium profile + steel rail gantry in real time

License: GNU General Public License v3.0

Python 100.00%

vgb's People

Contributors

deutherius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vgb's Issues

Support multiple test points, interpolate between results

Assuming I am doing a cold test, followed by tests at regular heating intervals, and finally a hot test - the script crashes. If I do a single cold/test/hot, I am able to generate the results.

Is there not a way to interpolate the mesh from a given set of data as it's heating up? Seems like it would help drastically.

long decimal bed meshes

After generating the meshes and new printer.cfg, the vgb macro keeps requesting meshes that don't exist. For example:

bed_mesh: Unknown profile [38.400000000000006]
bed_mesh: Unknown profile [38.50000000000001]

The script did generate weird bed meshes with large decimals on some temperatures but not on others???

There are bed meshes 38.5 and 38.4. why is it requesting the bed meshes with all the decimals? Why is it even generating bed meshes with more than 1 decimal?

Set temp wait linked to tehrmistor temp + 1C, include in print start.

Since

  1. We should only be using VGB when frame temp is rising
  2. Most people already have (or should ) a sensor wait for chamber temp
  3. We have already set up the necessary thermistor and naming etc.

Perhaps including some info or a macro for a temp wait that takes the current frame temp + 1C and include that in PRINT_START would be a nice inclusion. This would ensure that print doesn't start until frame temp is on the rise, even if its not the most elegant solution.

ps...i sing the praises of VGB to anyone I discuss Voron with. The fact that it works, is free, and adds no weight makes it the best solution in my mind. I wont be buying backers.

I have diligently applied the full thermal compensation package...first test still had high 2nd, 3rd, 4th layer.

The meshes are all loaded and swapping with frame temp. They look like they should do the job. I'm at a loss as to why it hasn't produced the desired result.

I used the hot mesh after 2 hours. This is the mesh measured at the end of alchemyEngine/measure_thermal_behavior. The cold is taken at my chamber temp print_start threshold of 35C (frame temp of 24C). Thermistor is half way down the rear vertical extrusion.

I'm on a 350 Vroron 2.4.

One thing I am considering is the temp_coeff produced by alchemyEngine/process_frame_expansion.py. It produced a value of .0009. I saw in your depreciated dumb comp that you use a value of 0.03, with a max of 0.1. Can mine really be that low/different....***post script. I tried .03. Also got the same result. I'm wondering if it is even working. The frame compensation appears as if its functioning. Doesn't throw an error, and the query looks as it should. But I don't think it is functioning. I cranked up the temp_coeff: 0.03 producing -0.12mm on a 23min first layer. and it appeared to have no effect. I previously used a manual correction of -0.06mm to correct going into the second layer.

Ill load up the relevant stuff here. Please let me know if you have any ideas.

temp_coeff_fitting
temp_timeseries
thermal_quant_PhilBaz_2022-08-23_04-09-54 coldmesh
thermal_quant_PhilBaz_2022-08-23_04-09-54 postmesh

relevant printer.cfg sections...............................

[include VGB.cfg]

[frame_expansion_compensation]
temp_coeff: 0.0009 ##0.0009
temp_sensor: temperature_sensor ToolHP
z_stepper: stepper_z

[bed_mesh]
speed: 1000
horizontal_move_z: 8

mesh_min: 30, 30
mesh_max: 320,320

fade_start: 999999999
fade_end: 9999999999
probe_count: 7,7
algorithm: bicubic
relative_reference_index: 48 ## For thermal Compensation RRI is set to (x points * y points) - 1, for a 5x5 mesh that is 24

mesh_pps: 2,2 ## needed for adaptive bed meshMacro

[respond] ## needed for adaptive bed meshMacro

[bed_mesh default]
## version = 1
#
# points =
## 0.020000, -0.030000, -0.050000, -0.025000, -0.025000, 0.002500, 0.022500
#
# -0.050000, -0.087500, -0.100000, -0.102500, -0.095000, -0.070000, -0.052500
## -0.117500, -0.162500, -0.172500, -0.175000, -0.177500, -0.142500, -0.122500
#
# -0.155000, -0.195000, -0.212500, -0.212500, -0.202500, -0.170000, -0.142500
## -0.107500, -0.145000, -0.177500, -0.180000, -0.175000, -0.142500, -0.117500
#
# -0.065000, -0.112500, -0.137500, -0.145000, -0.135000, -0.110000, -0.075000
## 0.002500, -0.037500, -0.067500, -0.067500, -0.062500, -0.042500, 0.000000
#
# tension = 0.2
## min_x = 30.0
#
# algo = bicubic
## y_count = 7
#
# mesh_y_pps = 2
## min_y = 30.0
#
# x_count = 7
## max_y = 319.98
#
# mesh_x_pps = 2
## max_x = 319.98
#
#
## [bed_mesh Full Cold]
#
# version = 1
## points =
#
# 0.012500, -0.032500, -0.047500, -0.005000, -0.012500, 0.027500, 0.015000
## -0.022500, -0.057500, -0.062500, -0.065000, -0.055000, -0.010000, -0.020000
#
# -0.060000, -0.105000, -0.107500, -0.100000, -0.115000, -0.077500, -0.065000
## -0.090000, -0.130000, -0.147500, -0.145000, -0.135000, -0.092500, -0.077500
#
# -0.050000, -0.087500, -0.117500, -0.120000, -0.112500, -0.075000, -0.055000
## -0.030000, -0.077500, -0.102500, -0.110000, -0.100000, -0.055000, -0.035000
#
# 0.000000, -0.040000, -0.067500, -0.070000, -0.062500, -0.025000, 0.000000
## tension = 0.2
#
# min_x = 30.0
## algo = bicubic
#
# y_count = 7
## mesh_y_pps = 2
#
# min_y = 30.0
## x_count = 7
#
# max_y = 319.98
## mesh_x_pps = 2
#
# max_x = 319.98
##
#
# [bed_mesh HOT37.1]
## version = 1
#
# points =
## 0.075000, 0.025000, 0.002500, 0.017500, 0.025000, 0.052500, 0.077500
#
# -0.027500, -0.065000, -0.085000, -0.085000, -0.075000, -0.052500, -0.030000
## -0.125000, -0.170000, -0.182500, -0.185000, -0.177500, -0.142500, -0.120000
#
# -0.172500, -0.215000, -0.230000, -0.230000, -0.217500, -0.180000, -0.157500
## -0.132500, -0.170000, -0.202500, -0.200000, -0.187500, -0.160000, -0.132500
#
# -0.077500, -0.127500, -0.155000, -0.160000, -0.147500, -0.125000, -0.085000
## -0.002500, -0.042500, -0.070000, -0.067500, -0.062500, -0.045000, 0.000000
#
# tension = 0.2
## mesh_x_pps = 2
#
# algo = bicubic
## min_x = 30.0
#
# min_y = 30.0
## y_count = 7
#
# mesh_y_pps = 2
## x_count = 7
#
# max_x = 319.98
## max_y = 319.98
#
#
## [bed_mesh COLD24.1]
#
# version = 1
## points =
#
# -0.005000, -0.050000, -0.072500, -0.062500, -0.050000, -0.022500, 0.002500
## -0.052500, -0.092500, -0.107500, -0.107500, -0.097500, -0.070000, -0.047500
#
# -0.110000, -0.150000, -0.162500, -0.162500, -0.152500, -0.120000, -0.095000
## -0.137500, -0.177500, -0.190000, -0.185000, -0.170000, -0.132500, -0.107500
#
# -0.095000, -0.127500, -0.152500, -0.152500, -0.140000, -0.110000, -0.077500
## -0.055000, -0.102500, -0.125000, -0.127500, -0.117500, -0.087500, -0.050000
#
# -0.002500, -0.042500, -0.070000, -0.070000, -0.065000, -0.047500, 0.000000
## tension = 0.2
#
# min_x = 30.0
## algo = bicubic
#
# y_count = 7
## mesh_y_pps = 2
#
# min_y = 30.0
## x_count = 7
#
# max_y = 319.98
## mesh_x_pps = 2
#
# max_x = 319.98
##
#
# [bed_mesh 20.1]
## version = 1
#
# points =
## -0.029615, -0.073077, -0.095577, -0.087115, -0.073077, -0.045577, -0.020577
#
# -0.060192, -0.100962, -0.114423, -0.114423, -0.104423, -0.075385, -0.052885
## -0.105385, -0.143846, -0.156346, -0.155577, -0.144808, -0.113077, -0.087308
#
# -0.126731, -0.165962, -0.177692, -0.171154, -0.155385, -0.117885, -0.092115
## -0.083462, -0.114423, -0.137115, -0.137885, -0.125385, -0.094615, -0.060577
#
# -0.048077, -0.094808, -0.115769, -0.117500, -0.108269, -0.075962, -0.039231
## -0.002500, -0.042500, -0.070000, -0.070769, -0.065769, -0.048269, 0.000000
#
# tension = 0.2
## mesh_x_pps = 2
#
# algo = bicubic
## min_x = 30.0
#
# min_y = 30.0
## y_count = 7
#
# mesh_y_pps = 2
## x_count = 7
#
# max_x = 319.98
## max_y = 319.98
#
#

etc...etc.

Bed mesh parameters different from COLD and HOT mesh

The error happened because I had a default bed mesh with 5x5 mesh points and 40mm for min value and 260 for max value. However the COLD and HOT meshes had 9x9 bedmesh, 20mm min value and 280mm max value.
Below you can see one of the wrong generated codes:

## [bed_mesh 39.1]
#
# version = 1
## points =
#
# 0.047518, 0.072811, 0.049122, 0.078049, 0.057159, 0.064183, 0.071506, 0.074604, 0.068293
## 0.036256, 0.082037, 0.056024, 0.074299, 0.069713, 0.048226, 0.041439, 0.049354, 0.049652
#
# 0.031372, 0.023159, 0.023396, 0.039470, 0.067567, 0.022921, 0.027982, 0.040659, 0.018098
## -0.020354, 0.001488, -0.002854, 0.007024, 0.002561, -0.021250, -0.009939, -0.013390, -0.028573
#
# -0.045774, -0.016250, -0.011488, 0.012561, 0.000000, -0.025000, -0.004762, -0.016848, -0.026073
## -0.026012, -0.009939, -0.011726, -0.002854, 0.014878, -0.002677, -0.011488, -0.030713, -0.019287
#
# 0.005720, 0.022982, 0.034829, 0.027506, 0.036134, 0.028634, 0.032445, 0.012146, 0.004171
## 0.000604, 0.048640, 0.025189, 0.044415, 0.059177, 0.053402, 0.049652, 0.050488, 0.031378
#
# 0.034067, 0.058470, 0.046506, 0.068232, 0.069720, 0.051683, 0.071567, 0.061030, 0.043945
## tension = 0.2
#
# min_x = 40.0
## algo = bicubic
#
# y_count = 5
## mesh_y_pps = 2
#
# min_y = 40.0
## x_count = 5
#
# max_y = 260.0
## mesh_x_pps = 2
#
# max_x = 260.0

And the expected code would be:

## [bed_mesh 39.1]
#
# version = 1
## points =
#
# 0.047518, 0.072811, 0.049122, 0.078049, 0.057159, 0.064183, 0.071506, 0.074604, 0.068293
## 0.036256, 0.082037, 0.056024, 0.074299, 0.069713, 0.048226, 0.041439, 0.049354, 0.049652
#
# 0.031372, 0.023159, 0.023396, 0.039470, 0.067567, 0.022921, 0.027982, 0.040659, 0.018098
## -0.020354, 0.001488, -0.002854, 0.007024, 0.002561, -0.021250, -0.009939, -0.013390, -0.028573
#
# -0.045774, -0.016250, -0.011488, 0.012561, 0.000000, -0.025000, -0.004762, -0.016848, -0.026073
## -0.026012, -0.009939, -0.011726, -0.002854, 0.014878, -0.002677, -0.011488, -0.030713, -0.019287
#
# 0.005720, 0.022982, 0.034829, 0.027506, 0.036134, 0.028634, 0.032445, 0.012146, 0.004171
## 0.000604, 0.048640, 0.025189, 0.044415, 0.059177, 0.053402, 0.049652, 0.050488, 0.031378
#
# 0.034067, 0.058470, 0.046506, 0.068232, 0.069720, 0.051683, 0.071567, 0.061030, 0.043945
## tension = 0.2
#
# mesh_x_pps = 2
## algo = bicubic
#
# min_x = 20.0
## min_y = 20.0
#
# y_count = 9
## mesh_y_pps = 2
#
# x_count = 9
## max_x = 280.0
#
# max_y = 280.0

I'm out of free time to tackle this right now, but you may want to warn the user that all the meshes kept on the printer,cfg must have the same configuration (grid size, algorithm, min and max values), in order for the python script to work.

Thank you for the effort that you have put on this!

MCU Crash (MCU 'mcu' shutdown: Timer too close) when VGB is activated

I do not even finish the first layer of a print.
I think as soon as it's trying to update the bed mesh it crash.
At first I did with .1 degrees increment. It was crashing very early in the print.
then I did with .2 increment. It was crashing later in the first layer..

Forget to specify. The macro does set the bed mesh when it's not printing without any issue.. It's while it's printing the issue occurs.

Kliper version 10.0.122

I think I need to specify, that as Soon as I disable the VGB macro.. I can print again..
I think the idea of this is great.. Like really a life saver great style.. But sadly It make the printer MCU crash :(

IndexError: pop from empty list

i can't get the script running, i got the same error every time

pi@mainsailos:~/printer_data/config $ python3 generate_VGB_meshes.py printer.cfg 0.2 7
Traceback (most recent call last):
  File "/home/pi/printer_data/config/generate_VGB_meshes.py", line 56, in <module>
    postamble.pop()
IndexError: pop from empty list
Bildschirmfoto 2023-09-22 um 21 11 23

Error klipper no conection...

I have used it for a long time, I don't know why, it doesn't work anymore. klipper unable to reconnect after reboot. does anyone have any idea what the problem is? i think there is the deprecation of parameter sets from klipper. therefore it must be rechecked.

Question

Does the heat bed and frame warp in the same way during every heat cycle or does it vary each time the machine is heated?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.