Complete print settings in cura

I am but i use octoprint and use the continous print plugin, and am trying to figure out how to run a python script that my buddy made me to use a servo with an arm to sweep the parts off of the bed once the bed temp cools to a certain temp (thank god for pei bed surface, prints just pop off at around 25 degrees) but i cant seem to find out how to run a python script in the continous print bed clearing gcode section lol

I’d love to see what your setup with that sweeping arm looks like…

I’ll need to look into the continuous print plugin- I use Octoprint with my TAZ but haven’t had any experience with that plugin.

I first need to run a pythod script from gcode and i have no idea how to do that :frowning:

Here is the arm setup, once the print is done and the bed cools to 25c the bed goes all the way forward and then the arm swings


if you go watch this video u can see the guy that built its arm in action (skip to 15:50)

1 Like

I looked into this. I remember a simpler way, but I couldn’t find it. Here are three options:

  1. You can call scripts from system events. For example. When a print starts, you can call a python script. I think this will be tricky to coordinate with the gcode, since it will probably be run in parallel: config.yaml — OctoPrint master documentation
  2. Plugin to make new gcode commands that will call system calls: GCODE System Commands . This will let you call a python script from gcode. I’m again not sure if it will wait for the system call to finish before executing the next gcode line. So some sleep commands and pause gcode might be needed.
  3. Action commands are built in. This plugin lets you make custom ones that call system calls. Action Commands .
1 Like

Awesome, I read up to see you find it was overextrusion, and finish with seeing the part removal bits. Cheers!

There are some prints that don’t pop off after the bed cools, but I guess stallguard can detect when that happens. I’m curious to follow how you implement this.

so far with the pei bed on my anycubic vyper, ive yet to have any part not pop right off after the bed cools

easy servo plugin in octprint is how the guy in the video did it, but i kept getting an error when starting pigpiod service in the terminal on the pi

i wonder if it wouldnt be easier to just add an extra stepper motor to my printer and use that to move the arm?

No plugin with the gcode system command in octoprint plugins, can u advise on where to get it

Also its a .py file im trying to run not a .sh file

ive been looking at skr board on the v1 shop, if i upgraded my anycubic vyper to that board, would i be able yo add another stepped to be able to swing the arm? that way it would work with the gcode alot easier

I know nothing about Octoprint or python or exactly how the wiper in the video works. To a certain degree, based on reading the Marlin g-code reference, your wiper can be implemented just in g-code.

Stepper motors don’t know their position, and in a quick search, I could not find Marlin g-code support for homing or probing “extra” axes beyond X, Y and Z. So, if you wanted to use a stepper, you would likely have to remember to set it to some “home” rotation by hand before you start your job.

On the other hand, a servo does know its position, and there is servo support in Marlin. Whether using a servo or a stepper motor, you will first have to edit the configuration files to enable support, then recompile and flash your board.

If you want to try a servo, you will need to figure out the torque rating required, and figure out how to power the servo. You don’t want to be pulling power from any 5V pin on the board.

Once a servo has been installed, you can use an M190 to wait for the bed to cool down to a target temperature, then use multiple M280 g-code commands to clear the bed.

If Octoprint will send more than one job to your 3D printer, you can insert bed clearing at the top of each job. If not, you can concatenate multiple jobs into a single file and put bed clearing code between each job.

1 Like

Robert’s advice is great. Because handling the command in the firmware means it will always be executed in the right order.

And I agree that a stepper is probably too complicated. When servi support is already there.

Running a .py in Linux is just as easy as running a .sh. You need to add executable permissions, or just make the command python myscript.py and it will execute it anyway.

If the parts are really popped off, a solenoid would be even less rube goldberg than a servo. They do make endstop servos which could also work with a similar binary signal, but more spendy and less reliable than a solenoid. This way you wouldn’t have to use servo features, just flood/mist gcode (or fan or whatever) to trigger after a print.

hey there, after a bunch of tinkering i got the servo to work in octo print and the arm works wonderfully :slight_smile:

2 Likes

What ended up being the secret to making it work?

I REinstalled octoprint os on the pi and then followed the directions on the easy servo plugin page before i did anything else, and it worked no problem