Dropping the bed to the bottom for external camera timelapse

Anyone know where and how to adjust the g-code so the bed drops to the bottom before taking each frame of a timelapse with an external camera? Yes it’ll add a lot to print time, that’s fine with me.

I wouldn’t recommend it, but if you are willing to take the risks on board.

In Bambu Studio, you can dynamically adjust the Z-axis on every layer by adding a custom script to the Layer Change G-code box. This allows the nozzle to perform an action (like pressing down or triggering a mechanism) at a specific height and then return to the correct printing layer.

How to Implement Every-Layer Z Changes

  1. Open your model in Bambu Studio and slice your file.
  2. Click the “Edit” button next to your printer profile (under the Process pane).
  3. Go to the Machine G-code tab.
  4. Scroll down to the Layer change G-code section and insert the following script:

gcode

; --- Dynamic Z Shift Start ---
G91 ; Set to relative positioning
G1 Z-X.■■ ; Replace X.■■ with the distance you want to lower the nozzle
G1 ZX.■■ ; Return back to original position
G90 ; Revert to absolute positioning
; --- Dynamic Z Shift End ---

Anything blacked out is TWO CAPITAL X’s without spaces, this forum thinks it’s a swear word!

So upper X, period, upper X, upper X. (Includes the unredacted prefix.

Use code with caution.

Thank you very much for taking the time there!

1 Like