Setting the Syringe Z Offset#
By default, we leave quite a bit of distance between the bed and the syringe’s ‘0’ position. This is because we can attach tips of different lengths to the syringe. To start using the syringe tool, we need to calibrate the syringe tip to the bed.
Before Starting:#
Clear any existing items off the bed of your machine!
[ ]:
# Import the required modules
from science_jubilee.Machine import Machine
from science_jubilee.tools.Tool import Tool
[ ]:
# Connect to the machine
m = Machine(address='192.168.1.2')
[ ]:
# m.home_all() # if you need to, uncomment this line to home the machine
Load the Syringe tool#
[ ]:
# To load the tool, specify the index of the tool on your machine
# If you're not sure what your tool index is, you can query Duet about what tools are configured like this:
m.configured_tools
[ ]:
# Change the following tool_index variable to match your machine configuration, if necessary
tool_index = 2
[ ]:
# The syringe config file contains calibration data
syringe = Tool(index = tool_index, name = 'syringe')
m.load_tool(syringe)
[ ]:
# Now you can pick up the syringe!
m.pickup_tool(syringe)
Zero the Z Position#
By default, we leave quite a bit of distance between the bed and the syringe’s ‘0’ position because we can attach tips of different lengths to the syringe. To start, we need to calibrate the syringe tip to the bed.
If you’re using a lab automation deck, be sure to move the syringe to a location above the aluminum bed plate (i.e. not over the deck attachment).
[ ]:
# This cell will move the machine!
m.move_to(x=200, y=150) # move over an empty part of the bed
[ ]:
# Now, move to the syringe's starting 0 position
m.move_to(z = 0)
You’ll see that z=0 is actually quite a ways from the bed! Now we need to bring the tip of the syringe extruder into contact with the print bed by gradually decreasing the z value. You want the tip to be just above the bed plate. Don’t overshoot or you’ll crash into the syringe!
If you’re gel printing and want to be able to take your print off the bed, be sure to put a glass plate down and calibrate to the height of the plate, instead of the height of the aluminum bed!
You can use the control panel in the DuetWebControl interface to do this if you like, or run the following cell repeatedly.
[ ]:
z_offset = 0 # slowly make this a bigger negative number, but don't overshoot!
# you could instead use Duet Web Control to increment in Z
m.move_to(z = z_offset)
We’ll update the tool’s z offset so that the 0 position is where you currently moved to. Note that everytime the mainboard restarts, it reads the config on the Duet board, which has the more conservative tool offset.
Instead of changing the offset permanently, we’ll temporarily change it until we restart the machine again. So, we should go through this process each time we add a new syringe tip.
[ ]:
starting_offset = m.tool_z_offsets[m.active_tool_index] # this is the default value for this tool
real_z_position = float(m.get_position()["Z"]) # this is our current z position after calibration
new_z_offset = starting_offset - real_z_position # subtract the two to get the update z offset value
# Update the tool offset
m.set_tool_offset(tool_idx = m.active_tool_index, z = new_z_offset)
[ ]:
# Now we can move on!
m.move_to(z=100)
Your Z position is now calibrated! This calibration will reset if you turn the machine off. If you are gel printing, it’s probably a good idea to calibrate Z precisely each time you turn on the machine, since printing is very sensitive to the starting height. If you’re usining the syringe for liquid handling, you can talk to a workshop organizer to set this Z offset permanently to save you some extra effort!