-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathph_demo.py
More file actions
58 lines (40 loc) · 1.96 KB
/
ph_demo.py
File metadata and controls
58 lines (40 loc) · 1.96 KB
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
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 17 21:12:47 2022
@author: stefa
"""
import os
from pyhamilton import (HamiltonInterface, LayoutManager, normal_logging,
initialize, move_sequence, get_plate_gripper_seq, place_plate_gripper_seq,
move_plate_gripper_seq, ResourceType, Plate96)
import logging
from ph_utils import pH_Module
import sys
lmgr = LayoutManager('Demo.lay')
sample_plate = lmgr.assign_unused_resource(ResourceType(Plate96, 'Cos_96_Rd_0001'))
default_temperature = 25.0
calibration_time = 30.0
solution_seq = 'seqVerify'
if __name__ == '__main__':
with HamiltonInterface(simulate=True) as ham_int:
normal_logging(ham_int, os.getcwd())
initialize(ham_int)
#pH Module Commands
ph_module = pH_Module(ham_int, module_id = 0, comport = 1, simulate = True, default_temperature = 25.0)
get_plate_gripper_seq(ham_int, 'seqpH_Module_0001', 39.0, 81.0, 90.0,
lid = False, tool_sequence = 'COREGripTool_1000ul_0001')
#ph_module.calibration(solution_seq = 'seqCalibration_1',
# solution_ph = 4.0,
# dynamic_calibration = False,
# probe_pattern = '1111',
# calibration_time = 5)
#ph_module.calibration(solution_seq = 'seqCalibration_2',
# solution_ph = 8.0,
# dynamic_calibration = False,
# probe_pattern = '1111',
# calibration_time = 5)
output = ph_module.measure([(sample_plate, 0)], '1111') #Integer indexing
place_plate_gripper_seq(ham_int, 'seqpH_Module_0001', tool_sequence = 'COREGripTool_1000ul_0001')
for i in range(1,5):
data = ph_module.request_calibration(probe_number = i)
print(data)