Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dozgulbas committed May 8, 2024
1 parent cbf0442 commit 19f3c09
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 20 deletions.
10 changes: 9 additions & 1 deletion src/platecrane_driver/plate_resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@
"plate_pick_steps_stack": 7900,
"plate_lid_steps": 0,
"lid_height": 0

},
"test_96_well":{
"plate_above_height": 800,
"plate_pick_steps_module": 1500,
"plate_pick_steps_stack": 2400,
"plate_lid_steps": 100,
"lid_height": 2500
}



}
10 changes: 8 additions & 2 deletions src/platecrane_driver/platecrane_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
from pathlib import Path

#from platecrane_driver.serial_port import SerialPort
from serial_port import SerialPort


Expand Down Expand Up @@ -710,11 +711,15 @@ def remove_lid(
"""
self.get_new_plate_height(plate_type)

# TESTING
print("LID HEIGHT")
print(self.lid_height)

target_offset = (
2 * self.plate_above_height
- self.plate_pick_steps_stack
+ self.lid_height
+ height_offset
# + height_offset
) # Finding the correct target hight when only transferring the plate lid
target_loc = self.get_location_joint_values(target)
remove_lid_target = "Temp_Lid_Target_Loc"
Expand All @@ -727,6 +732,7 @@ def remove_lid(
target_loc[3],
)
self.plate_pick_steps_stack = self.plate_lid_steps

self.transfer(
source=source,
target=remove_lid_target,
Expand Down Expand Up @@ -760,7 +766,7 @@ def replace_lid(
2 * self.plate_above_height
- self.plate_pick_steps_stack
+ self.lid_height
+ height_offset
# + height_offset
) # Finding the correct target hight when only transferring the plate lid
source_loc = self.get_location_joint_values(source)
remove_lid_source = "Temp_Lid_Source_loc"
Expand Down
115 changes: 98 additions & 17 deletions src/platecrane_driver/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""TESTS"""
import platecrane_driver


if __name__ == "__main__":
import platecrane_driver

Expand All @@ -18,10 +20,24 @@
sealer = "SealerNest"
# s.move_location("Safe")

# print(s.lid_height)

s.remove_lid(source = "Solo.Position2", target="LidNest1", plate_type="test_96_well")
#print(s.lid_height)
# s.move_location("Solo.Position1")


# print(s.get_position())
# s.set_location("Safe", 182220, 2500, 460, -308)

# # # s.move_location("Solo.Position1")
# s.move_location("Safe")


# s.move_location("Stack4")
# s.move_single_axis("Z", "Safe", delay_time=1) # move all the way up in z height

# print(s.get_location_list())
#print(s.get_location_list())

# s.transfer("Stack4","Solo.Position1",source_type="stack",target_type="stack",height_offset=800) # test from stack to solo pos 1
# s.transfer("Stack4","Solo.Position1",source_type="stack",target_type="stack") # Stack 4 to SOLO 1
Expand Down Expand Up @@ -59,36 +75,101 @@

### Hidex Recalibration

# print(s.get_position())
#s.transfer("Solo.Position1","Hidex.Nest",source_type="stack",target_type="module", height_offset = 700)


#print(s.get_location_list())

# s.set_location("Safe", 195399, 2646, 0, 0)
#s.set_location("Sealer.Nest", 117468, 1220, -4748, 4550)

s.transfer(
"Hidex.Nest",
"Sealer.Nest",
source_type="module",
target_type="stack",
height_offset=650,
)
#print(s.get_position())
# s.delete_location("Temp_Lid_Source_Loc")
# s.delete_location("Temp_Lid_Target_Loc")
# s.delete_location("Temp_Lid_Source_loc")
#s.delete_location("TEST")

print(s.get_location_list())

# s.transfer(
# "Hidex.Nest",
# "Sealer.Nest",
# source_type="module",
# target_type="stack",
# height_offset=650,
# )

# print(s.get_location_list())


# s.transfer("Solo.Position1","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Solo.Position1",source_type="module",target_type="stack", height_offset=650)
# #s.transfer("Solo.Position1","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)

# s.transfer("Solo.Position1","Solo.Position2",source_type="stack",target_type="stack")

# s.transfer("Solo.Position2","Sealer.Nest",source_type="stack",target_type="stack")

# s.transfer("Sealer.Nest","Peeler.Nest",source_type="stack",target_type="stack")

# s.transfer("Peeler.Nest","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)

# s.transfer("Hidex.Nest","LidNest1",source_type="module",target_type="stack", height_offset=650)

# s.transfer("LidNest1","LidNest2",source_type="stack",target_type="stack")

# s.transfer("LidNest2","LidNest3",source_type="stack",target_type="stack")

# s.transfer("LidNest3","Stack1",source_type="stack",target_type="stack")

# s.transfer("Stack1","Stack2",source_type="stack",target_type="stack")

# s.transfer("Stack2","Stack3",source_type="stack",target_type="stack")

# s.transfer("Stack3","Stack4",source_type="stack",target_type="stack")

# s.transfer("Stack4","Stack5",source_type="stack",target_type="stack")

# s.transfer("Stack5","Solo.Position2",source_type="stack",target_type="stack")
# old sealer nest 28:SealerNest, 210256, -1050, 491, 5730




# Hidex positions test
# s.transfer("Solo.Position2","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Solo.Position1",source_type="module",target_type="stack", height_offset=650)
# s.transfer("Solo.Position1","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Solo.Position2",source_type="module",target_type="stack", height_offset=650)


# Hidex position test
# s.transfer("Peeler.Nest","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Solo.Position1",source_type="module",target_type="stack", height_offset=650)

# s.transfer("Solo.Position1","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Solo.Position2",source_type="module",target_type="stack", height_offset=650)

# s.transfer("Solo.Position2","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Peeler.Nest",source_type="module",target_type="stack", height_offset=650)


# ----------------------------------------------------------------------------------------------------------------------------------------


# s.pick_stack_plate("Stack1")
# a = s.get_position()
# s.set_location("LidNest3",R=231449,Z=-31500,P=484,Y=-306)

# s.set_location("Hidex.Nest",R=a[0],Z=a[1],P=a[2],Y=a[3])
# s.place_module_plate("Hidex.Nest")
# s.move_single_axis("Z","Hidex.Nest")
# s.transfer("Hidex.Nest","Solo.Position1",source_type="module",target_type="stack",height_offset=800)
# s.transfer("Stack1", "PeelerNest",source_type="stack",target_type="stack")
# s.transfer("Solo.Position1","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Solo.Position2",source_type="module",target_type="stack", height_offset=650)

# s.transfer("Solo.Position2","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Peeler.Nest",source_type="module",target_type="stack", height_offset=650)

# s.transfer("Peeler.Nest","Hidex.Nest",source_type="stack",target_type="module", height_offset=700)
# s.transfer("Hidex.Nest","Solo.Position1",source_type="module",target_type="stack", height_offset=650)




# s.place_module_plate()
# s.get_location_list()
Expand Down

0 comments on commit 19f3c09

Please sign in to comment.