Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions sentio_prober_control/Sentio/CommandGroups/StatusCommandGroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def get_chuck_temp_setpoint(self) -> float:

def get_chuck_thermo_energy_mode(self) -> str:
"""Get the current chuck thermo energy mode.

Returns:
The current energy mode as a string. Possible values: Fast, Optimal, HighPower, Customized.
"""
Expand All @@ -75,7 +76,6 @@ def get_chuck_thermo_hold_mode(self) -> str:
resp = Response.check_resp(self.comm.read_line())
return resp.message()


def get_chuck_thermo_state(self) -> ThermoChuckState:
"""Return thermo chuck state.

Expand All @@ -85,25 +85,8 @@ def get_chuck_thermo_state(self) -> ThermoChuckState:
"""

self.comm.send("status:get_chuck_thermo_state")
resp = Response.check_resp(self.comm.read_line())

if "soaking" in resp.message().lower():
return ThermoChuckState.Soaking
elif "cooling" in resp.message().lower():
return ThermoChuckState.Cooling
elif "heating" in resp.message().lower():
return ThermoChuckState.Heating
elif "controlling" in resp.message().lower():
return ThermoChuckState.Controlling
elif "standby" in resp.message().lower():
return ThermoChuckState.Standby
elif "error" in resp.message().lower():
return ThermoChuckState.Error
elif "uncontrolled" in resp.message().lower():
return ThermoChuckState.Uncontrolled
else:
return ThermoChuckState.Unknown

state : ThermoChuckState = ThermoChuckState.fromSentioAbbr(Response.check_resp(self.comm.read_line()).message())
return state

def get_high_purge_state(self) -> str:
"""Get thermo chuck high purge state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@ def set_xy(self, comp_type: XyCompensationType) -> None:
self.comm.send(f"map:compensation:set_xy {comp_type.toSentioAbbr()}")
Response.check_resp(self.comm.read_line())

def set_z(self, comp_type: ZCompensationType) -> Response:
def set_z(self, comp_type: ZCompensationType) -> None:
"""Enable the Z Stepping Compensation.

Args:
comp_type: The type of Z Stepping Compensation.
"""
self.comm.send(f"map:compensation:set_z {comp_type.toSentioAbbr()}")
resp = Response.check_resp(self.comm.read_line())

return resp
Response.check_resp(self.comm.read_line())
31 changes: 31 additions & 0 deletions sentio_prober_control/Sentio/Enumerations.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,10 @@ class DieNumber(Enum):
Selected = 2
Total = 3

class DriftType(Enum):
"""Specifies the type of drift."""
DriftRef = "DriftRef"
Drift = "Drift"

@deprecated("ExecuteAction is deprecated.")
class ExecuteAction(Enum):
Expand Down Expand Up @@ -1750,6 +1754,33 @@ class ThermoChuckState(Enum):
Controlling = 6
Unknown = 7

@staticmethod
def fromSentioAbbr(abbr: str) -> "ThermoChuckState":
"""Convert a SENTIO abbreviation to a ThermoChuckState.

Args:
abbr (str): The SENTIO abbreviation.

Returns:
ThermoChuckState: The corresponding ThermoChuckState.

Raises:
ValueError: If the abbreviation is not recognized.
"""
mapping = {
"soaking": ThermoChuckState.Soaking,
"cooling": ThermoChuckState.Cooling,
"heating": ThermoChuckState.Heating,
"uncontrolled": ThermoChuckState.Uncontrolled,
"standby": ThermoChuckState.Standby,
"error": ThermoChuckState.Error,
"controlling": ThermoChuckState.Controlling,
}
try:
return mapping[abbr.lower()]
except KeyError:
raise ValueError(f"Unknown ThermoChuckState abbreviation: {abbr}")


class UserCoordState(Enum):
Chuck = 0
Expand Down
50 changes: 25 additions & 25 deletions sentio_prober_control/Sentio/ProberSentio.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ def abort_command(self, cmd_id: int) -> Response:
Returns:
A response object with the result of the command.
"""
self.comm.send("abort_command {0}".format(cmd_id))
self.comm.send(f"abort_command {cmd_id}")
return Response.check_resp(self.comm.read_line())


def clear_contact(self, site: ChuckSite | None = None) -> Response:
def clear_contact(self, site: ChuckSite | None = None) -> None:
"""Clear contact positions.

Args:
Expand All @@ -131,7 +131,7 @@ def clear_contact(self, site: ChuckSite | None = None) -> Response:
else:
self.comm.send(f"clear_contact {site.toSentioAbbr()}")

return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())


@staticmethod
Expand Down Expand Up @@ -166,7 +166,7 @@ def create_prober(comm_type : str | SentioCommunicationType, arg1 : str | GpibCa
raise ValueError(f'Unknown prober type: "{comm_type}"')


def enable_chuck_overtravel(self, stat: bool) -> Response:
def enable_chuck_overtravel(self, stat: bool) -> None:

"""Enable chuck overtravel.

Expand All @@ -176,14 +176,14 @@ def enable_chuck_overtravel(self, stat: bool) -> Response:
stat (bool): True to enable, False to disable.

Returns:
A response object with the result of the command.
None
"""

self.comm.send(f"enable_chuck_overtravel {stat}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())


def enable_chuck_hover(self, stat: bool) -> Response:
def enable_chuck_hover(self, stat: bool) -> None:

"""Enable chuck hover height.

Expand All @@ -197,14 +197,14 @@ def enable_chuck_hover(self, stat: bool) -> Response:
stat (bool): True to enable, False to disable.

Returns:
A response object with the result of the command.
None
"""

self.comm.send(f"enable_chuck_hover {stat}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())


def enable_chuck_site_hover(self, site: ChuckSite, stat: bool) -> Response:
def enable_chuck_site_hover(self, site: ChuckSite, stat: bool) -> None:

"""Enable chuck site hover height.

Expand All @@ -217,14 +217,14 @@ def enable_chuck_site_hover(self, site: ChuckSite, stat: bool) -> Response:
stat (bool): True to enable, False to disable.

Returns:
A response object with the result of the command.
None
"""

self.comm.send(f"enable_chuck_site_hover {site.toSentioAbbr()}, {stat}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())


def enable_chuck_site_overtravel(self, site: ChuckSite, stat: bool) -> Response:
def enable_chuck_site_overtravel(self, site: ChuckSite, stat: bool) -> None:

"""Enable overtravel distance for a specific chuck site.

Expand All @@ -233,14 +233,14 @@ def enable_chuck_site_overtravel(self, site: ChuckSite, stat: bool) -> Response:
stat (bool): True to enable, False to disable.

Returns:
A response object with the result of the command.
None
"""

self.comm.send(f"enable_chuck_site_hover {site.toSentioAbbr()}, {stat}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())


def file_transfer(self, source: str, dest: str) -> Response:
def file_transfer(self, source: str, dest: str) -> None:

"""Transfer a file to the prober.

Expand All @@ -260,7 +260,7 @@ def file_transfer(self, source: str, dest: str) -> Response:
encoded = base64.b64encode(file_bytes).decode("ascii")

self.comm.send(f"file_transfer {dest}, {encoded}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())


def get_chuck_site_height(self, site: ChuckSite) -> Tuple[float, float, float, float]:
Expand Down Expand Up @@ -575,7 +575,7 @@ def move_chuck_home(self) -> Tuple[float, float]:
return float(tok[0]), float(tok[1])


def move_chuck_load(self, pos: LoadPosition) -> Response:
def move_chuck_load(self, pos: LoadPosition) -> None:
"""Move chuck to load position.

Wraps SENTIO's "move_chuck_load" remote command.
Expand All @@ -584,10 +584,10 @@ def move_chuck_load(self, pos: LoadPosition) -> Response:
pos (LoadPosition): The position to move the chuck to. This can either be a load position or the center position of the chuck.

Returns:
A response object with the result of the command.
None
"""
self.comm.send(f"move_chuck_load {pos.toSentioAbbr()}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())


def move_chuck_separation(self) -> float:
Expand Down Expand Up @@ -668,7 +668,7 @@ def move_chuck_z(self, ref: ChuckZReference, z: float) -> float:
resp = Response.check_resp(self.comm.read_line())
return float(resp.message())

def move_chuck_work_area(self, area: WorkArea) -> Response:
def move_chuck_work_area(self, area: WorkArea) -> None:
"""Move the chuck to a given work area.

A SENTIO probe station can have different work areas. One area is for probing. This is the default
Expand All @@ -684,10 +684,10 @@ def move_chuck_work_area(self, area: WorkArea) -> Response:
area: The work area to move to.

Returns:
A response object with the result of the command.
None
"""
self.comm.send(f"move_chuck_work_area {area.toSentioAbbr()}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())

def move_scope_xy(
self, ref: ScopeXYReference, x: float, y: float
Expand Down Expand Up @@ -1554,7 +1554,7 @@ def get_indexer_pos(self) -> Tuple[int, str]:
location, position = resp.message().split(",")
return int(location), position

def indexer_cda(self, on: bool) -> Response:
def indexer_cda(self, on: bool) -> None:
"""Turn indexer CDA on or off.

Args:
Expand All @@ -1565,7 +1565,7 @@ def indexer_cda(self, on: bool) -> Response:
"""
state = "on" if on else "off"
self.comm.send(f"indexer_cda {state}")
return Response.check_resp(self.comm.read_line())
Response.check_resp(self.comm.read_line())

def move_bottom_platen_contact(self) -> float:
"""Move bottom platen to contact height.
Expand Down