-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
88 lines (78 loc) · 3.91 KB
/
Copy pathconfig.py
File metadata and controls
88 lines (78 loc) · 3.91 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# -*- coding: utf-8 -*-
"""
Hardware configuration for the microprobe scanning system.
Edit this file to match your physical setup.
"""
# ── Serial ports ───────────────────────────────────────────────────────────
COM_PORTS = {
'motor': 'COM9', # IMS MDrive stepper motors
'temp': 'COM4', # Watlow EZ-ZONE temperature controller (Standard Bus via pywatlow)
'mfc': 'COM5', # Aera mass flow controllers (addresses 7 and 8)
}
SERIAL_BAUD = {
'motor': 9600,
'temp': 9600, # Watlow EZ-ZONE: 9600, 8N1
'mfc': 9600,
}
# ── BioLogic potentiostat ──────────────────────────────────────────────────
BIOLOGIC_IP = '192.109.209.128'
BIOLOGIC_PORT = 5000 # default easy-biologic port
# ── Motor calibration (steps per mm) ──────────────────────────────────────
STEPS_PER_MM = {
'X': 40314.96,
'Y': 48377.95,
'Z': 48377.95,
}
# Stage-travel safety policy used when moving between sample locations.
# Keep disabled until the real Z sign convention / clearance height is confirmed.
STAGE_SAFE_MOVE = {
'enabled': True,
'clearance_z_mm': None, # absolute safe Z for XY travel; overrides relative lift when set
'lift_delta_mm': 0.5, # relative lift if clearance_z_mm is not configured
'positive_z_is_up': False, # False: increasing Z moves the tip down / closer to sample
'settle_s': 0.1,
}
# ── Watlow EZ-ZONE ────────────────────────────────────────────────────────
WATLOW_MODBUS_ADDR = 1 # default slave address
WATLOW_PID_LOW = {'P': 40, 'I': 108, 'D': 18} # below 400 °C
WATLOW_PID_HIGH = {'P': 24, 'I': 12, 'D': 2} # above 400 °C
WATLOW_PID_SWITCH_TEMP = 400.0 # °C
TEMP_SAFETY_ENABLED = True
TEMP_SAFETY_ACTIVE_TARGET_C = 150.0
TEMP_SAFETY_MIN_VALID_C = 50.0
TEMP_SAFETY_MAX_DROP_C = 80.0
TEMP_SAFETY_POLL_S = 5.0
TEMP_SAFETY_SHUTDOWN_SETPOINT_C = 25.0
# ── Aera MFC ──────────────────────────────────────────────────────────────
MFC_ADDRESS = {
'A': 7, # Gas A
'B': 8, # Gas B
}
MFC_FULL_SCALE_SCCM = {
'A': 100.0, # ID 007, S/N C090818032
'B': 1000.0, # ID 008, S/N J080310023
}
# Safety gate for digital write commands to the Aera MFCs.
# Keep disabled until the command protocol is validated on the real hardware.
MFC_WRITE_ENABLED = True
# The DMFC utility manual says flow setpoint/output display defaults to percent.
# Lab readback also indicates the write setting is a raw 0-100 value, not sccm.
# GUI/CSV conditions therefore use raw DMFC setting values (0-100).
MFC_SETPOINT_COMMAND_UNIT = 'percent'
MFC_MIN_DIGITAL_SETTING_PERCENT = 5.0
MFC_SETPOINT_TOLERANCE_PERCENT = 0.25
MFC_SETPOINT_READBACK_TIMEOUT_S = 4.0
MFC_SETPOINT_READBACK_POLL_S = 0.5
MFC_SETPOINT_WRITE_RETRIES = 1
# Some DMFCs require switching from analog to digital control before serial
# setpoints take effect. Leave disabled until the exact command behavior is
# validated on the old instrument PC, because digital mode can override analog
# flow control from the external system.
# Digital control switch policy before setpoint writes:
# 'once' : send SRS only once per channel/connection, then only update SFD
# 'always' : send SRS before every SFD write
# False : never send SRS automatically
# Re-sending SRS every manual gas edit can make the hardware behave unlike the
# DMFC utility, which normally stays in digital/manual mode and just changes the
# target setpoint.
MFC_SEND_DIGITAL_CONTROL_ON_WRITE = 'once'