Jogging the Machine!#

This example notebook will help you move Jubilee around.

Before Starting:#

Clear any existing items off the bed of your Jubilee!

[ ]:
# Import the machine module
from science_jubilee.Machine import Machine
[ ]:
# Connect to the machine
m = Machine(address='192.168.1.2', simulated=True)
[ ]:
# m.home_all() # if you need to, uncomment this line to home the machine

Absolute moves with move_to#

To move to an absolute position, use the move_to command!

[ ]:
# Drop the bed down
m.move_to(z=150)
[ ]:
# Move in X
m.move_to(x=100)
[ ]:
# Move in Y
m.move_to(y=200)
[ ]:
# Specify a speed with the s parameter
# Units are in mm/min!

# Move in X slowly at 500 mm/min
m.move_to(x = 200, s = 500)
[ ]:
# mm/min are a funny unit, we can specify speeds in mm/sec with the following function
def mm_sec(speed):
    # Converts a speed in mm/sec to mm/min to be used by the machine
    return speed * 60.0
[ ]:
# Move in X and Y quickly at 150 mm/sec
m.move_to(x = 100, y = 100, s = mm_sec(150))

Relative moves with move#

To move relative to the current position, use the move command!

[ ]:
# Increment X by 10 mm
m.move(dx = 5)
[ ]:
# Increment Z by -10
m.move(dz = -10)
[ ]:
# Move slowly in X, Y, and Z
m.move(dx = 5, dy = 5, dz = 5, s = mm_sec(10))
[ ]:
# Check where we've ended up with get_position
# get_position returns a dictionary with the position of each axis of the machine
m.get_position()
[ ]: