-
Notifications
You must be signed in to change notification settings - Fork 4
/
sandbox.py
69 lines (53 loc) · 2.01 KB
/
sandbox.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import bot_tools
cmd = """import loca
c9.tool = 'gripper'
proc.find_rack_index('vial', 'polymer_A')
c9.position = loca.vial_rack[vial_indexs]
c9.set_output('gripper', True)
c9.position = loca.clamp
c9.set_output('clamp', True)
c9.set_output('gripper', False)
"""
output = bot_tools.exec_polybot_lint_tool(cmd)
print(output)
# import loca
# import pandas as pd
# import robotics as ro
# from robotics import procedure as proc
# # Initialize hardware modules
# c9 = ro.system.init('controller')
# # t8 = ro.system.init('temperature')
# coater = ro.system.init('coater')
# # Check if polymer A is available
# if 'polymer_A' not in ro.runtime['rack_status']['vial'].values:
# raise ValueError('Experiment cannot be initiated. Polymer A is not available.')
# # Pick up the bernoulli substrate gripper tool
# c9.tool = 'substrate_tool'
# # Pick up an available substrate from the substrate rack
# substrate_index = proc.find_rack_index('substrate', 'new')
# c9.position = loca._substrate_rack[substrate_index]
# # Activate the vacuum on the bernoulli gripper to pick up substrates
# c9.set_output('substrate_tool', True)
# # Move the substrate to the slide_coater and release the bernoulli gripper
# c9.position = loca.s_coater
# c9.set_output('substrate_tool', False)
# # Pick up the polymer from the vials rack and move it to the clamp
# vial_index = proc.find_rack_index('vial', 'polymer_A')
# c9.position = loca.vial_rack[vial_index]
# # Close the clamp, and then open the gripper
# c9.set_output('clamp', True)
# c9.set_output('gripper', False)
# # Uncap the clamp and aspirate the polymer with the pipette
# c9.uncap(pitch=1.75, revs=3.0, vel=5000, accel=5000)
# c9.aspirate_ml(0, 0.5)
# # Dropcast the polymer to the substrate and blade coat it
# c9.dispense_ml(0, 0.2)
# coater.position = 45
# coater.velocity = 1
# coater.position = 75
# # Return the vial to the rack
# c9.position = loca.clamp
# c9.position = loca.vial_rack[vial_index]
# # End of experiment
# c9.position = loca.s_coater
# c9.position = loca.substrate_rack_seq[0, 0]