pre local llm checkpoint
This commit is contained in:
-55
@@ -1,55 +0,0 @@
|
|||||||
# Session summary — scan timeout & geometry fixes
|
|
||||||
|
|
||||||
## Bug fixed: oscilloscope timeout on first row
|
|
||||||
|
|
||||||
**File:** `hardware/tektronix_base.py` — `transfer_fastframe()` (~line 1414)
|
|
||||||
|
|
||||||
The scope was configured for N frames but only triggered on fewer (e.g. 57 of 58) because
|
|
||||||
the stage decelerates before the last laser pulse. `transfer_fastframe` looped using
|
|
||||||
`get_fastframe_count()` (the configured maximum), so the final `read_raw()` call blocked
|
|
||||||
waiting for data that never came and timed out.
|
|
||||||
|
|
||||||
**Fix:** replaced `get_fastframe_count()` with a live query:
|
|
||||||
```python
|
|
||||||
acquired = int(self.query("ACQuire:NUMFRAMESACQuired?"))
|
|
||||||
```
|
|
||||||
The loop now reads exactly as many frames as the scope actually captured.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Scan geometry overhaul
|
|
||||||
|
|
||||||
**File:** `sc3_aui_app.py`
|
|
||||||
|
|
||||||
### Constants added (near line 71)
|
|
||||||
```python
|
|
||||||
LASER_FREQ_HZ = 2000.0 # fixed laser pulse frequency
|
|
||||||
SCAN_RAMP_MM = v² / (2a) # ≈ 3.33 mm (100² / 2×1500)
|
|
||||||
```
|
|
||||||
`SCAN_RAMP_MM` is the distance the stage needs to accelerate from rest to full scan
|
|
||||||
velocity, or decelerate back to rest.
|
|
||||||
|
|
||||||
### `_run_scan()` changes
|
|
||||||
- `points_per_row` now uses `LASER_FREQ_HZ` instead of the param-supplied `laser_freq`.
|
|
||||||
- Pre-scan X position is `x_start - SCAN_RAMP_MM` so the stage arrives at `x_start`
|
|
||||||
already at full velocity (TRIGOUT_MAXV fires at the right place).
|
|
||||||
- Scan move ends at `x_start + x_delta + SCAN_RAMP_MM` so the stage doesn't begin
|
|
||||||
decelerating until after the last data point.
|
|
||||||
|
|
||||||
### Travel-limit guards added (before any hardware interaction)
|
|
||||||
Raises `ValueError` with an actionable message if the extended move would exceed the
|
|
||||||
stage limits baked into the driver (`bbd20x.py`: X 0–110 mm, Y 0–75 mm):
|
|
||||||
- `x_start - SCAN_RAMP_MM < 0`
|
|
||||||
- `x_start + x_delta + SCAN_RAMP_MM > 110`
|
|
||||||
- any Y row position outside 0–75 mm
|
|
||||||
|
|
||||||
Error messages tell the user exactly how many mm to adjust.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## What to check / next steps
|
|
||||||
- Verify `ACQuire:NUMFRAMESACQuired?` is the correct query string for the specific scope
|
|
||||||
model in use (MDO/MSO series assumed; confirm against programmer manual).
|
|
||||||
- `LASER_FREQ_HZ = 2000.0` is a temporary constant — wire it to the UI param when ready.
|
|
||||||
- Confirm `SCAN_RAMP_MM` matches observed stage behaviour; if the BBD202 velocity profile
|
|
||||||
is not perfectly triangular the empirical ramp may differ slightly from v²/2a.
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
"""ScanEngine-3 main application package"""
|
|
||||||
__version__ = "3.0.0"
|
|
||||||
-3478
File diff suppressed because it is too large
Load Diff
@@ -1,270 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>JogStageDialog</class>
|
|
||||||
<widget class="QDialog" name="JogStageDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>400</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Jog Stage</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_title">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>16</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Stage Jogging Control</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_position">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Position: X=0.00mm, Y=0.00mm</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_top">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QPushButton" name="btn_jog_y_plus">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>+Y</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QPushButton" name="btn_jog_x_plus">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>+X</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_center">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_speed">
|
|
||||||
<property name="text">
|
|
||||||
<string>Jog Speed (mm/s):</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_jog_speed">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>20.0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_step">
|
|
||||||
<property name="text">
|
|
||||||
<string>Step Size (mm):</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_step_size">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>1.0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QPushButton" name="btn_jog_x_minus">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>-X</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QPushButton" name="btn_jog_y_minus">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>-Y</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_bottom">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_status">
|
|
||||||
<property name="text">
|
|
||||||
<string>Status: Disconnected</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_buttons">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btn_connect">
|
|
||||||
<property name="text">
|
|
||||||
<string>Connect</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btn_home">
|
|
||||||
<property name="text">
|
|
||||||
<string>Home All Axes</string>
|
|
||||||
</property>
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btn_close">
|
|
||||||
<property name="text">
|
|
||||||
<string>Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>MainWindow</class>
|
|
||||||
<widget class="QMainWindow" name="MainWindow">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>653</width>
|
|
||||||
<height>360</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Bahnschrift</family>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Scanengin3 | v3.1.0 | build: nottagain</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="centralwidget">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Bahnschrift</family>
|
|
||||||
<pointsize>26</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Scanengine Task Launcher:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Bahnschrift</family>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Choose a workflow:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_start_new_scan">
|
|
||||||
<property name="text">
|
|
||||||
<string>Begin a New Scan</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_continue_scan">
|
|
||||||
<property name="text">
|
|
||||||
<string>Continue an Existing Scan</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_open_options">
|
|
||||||
<property name="text">
|
|
||||||
<string>Configure System / Set Default Values</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@@ -1,395 +0,0 @@
|
|||||||
"""
|
|
||||||
Motion Controller Worker Thread
|
|
||||||
|
|
||||||
Handles all motion control operations in a separate thread to keep the UI responsive.
|
|
||||||
Provides async command queueing and position updates via Qt signals.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from PyQt6 import QtCore
|
|
||||||
from hardware.pybbd202 import ThorlabsServoDriver, AXIS_X, AXIS_Y
|
|
||||||
import queue
|
|
||||||
import time
|
|
||||||
from typing import Optional, Dict, Any
|
|
||||||
|
|
||||||
|
|
||||||
class MotionCommand:
|
|
||||||
"""Represents a motion command"""
|
|
||||||
def __init__(self, cmd_type: str, **kwargs):
|
|
||||||
self.cmd_type = cmd_type
|
|
||||||
self.params = kwargs
|
|
||||||
|
|
||||||
|
|
||||||
class MotionWorker(QtCore.QObject):
|
|
||||||
"""
|
|
||||||
Worker object for handling motion control in a separate thread.
|
|
||||||
|
|
||||||
Signals:
|
|
||||||
connected: Emitted when controller connects successfully
|
|
||||||
disconnected: Emitted when controller disconnects
|
|
||||||
connection_failed: Emitted when connection fails (error_msg: str)
|
|
||||||
position_updated: Emitted when position changes (x: float, y: float)
|
|
||||||
homed_status: Emitted with home status (x_homed: bool, y_homed: bool)
|
|
||||||
move_completed: Emitted when a move completes (axis: str)
|
|
||||||
error_occurred: Emitted when an error occurs (error_msg: str)
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Signals
|
|
||||||
connected = QtCore.pyqtSignal()
|
|
||||||
disconnected = QtCore.pyqtSignal()
|
|
||||||
connection_failed = QtCore.pyqtSignal(str)
|
|
||||||
position_updated = QtCore.pyqtSignal(float, float) # x, y in mm
|
|
||||||
homed_status = QtCore.pyqtSignal(bool, bool) # x_homed, y_homed
|
|
||||||
motion_status = QtCore.pyqtSignal(bool, bool) # x_moving, y_moving
|
|
||||||
move_completed = QtCore.pyqtSignal(str) # axis name
|
|
||||||
error_occurred = QtCore.pyqtSignal(str) # error message
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
self.controller: Optional[ThorlabsServoDriver] = None
|
|
||||||
self.is_connected = False
|
|
||||||
self.command_queue = queue.Queue()
|
|
||||||
self.running = True
|
|
||||||
|
|
||||||
# Default parameters
|
|
||||||
self.jog_speed = 20.0 # mm/s
|
|
||||||
self.acceleration = 50.0 # mm/s^2
|
|
||||||
self.step_size = 1.0 # mm
|
|
||||||
|
|
||||||
# Position tracking
|
|
||||||
self.last_x = None
|
|
||||||
self.last_y = None
|
|
||||||
|
|
||||||
# Status tracking
|
|
||||||
self.last_x_homed = None
|
|
||||||
self.last_y_homed = None
|
|
||||||
self.last_x_moving = None
|
|
||||||
self.last_y_moving = None
|
|
||||||
|
|
||||||
# Position update throttling
|
|
||||||
self.last_position_update_time = 0
|
|
||||||
self.position_update_interval = 0.2 # seconds between position reads
|
|
||||||
|
|
||||||
# Flag to pause polling during scanning (scan worker handles its own position queries)
|
|
||||||
self.scanning_active = False
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot()
|
|
||||||
def run(self):
|
|
||||||
"""Main worker loop - processes commands from queue"""
|
|
||||||
print("Motion worker thread started")
|
|
||||||
|
|
||||||
while self.running:
|
|
||||||
try:
|
|
||||||
# Check for commands with timeout to allow periodic position updates
|
|
||||||
try:
|
|
||||||
cmd = self.command_queue.get(timeout=0.05) # 50ms timeout
|
|
||||||
self.process_command(cmd)
|
|
||||||
except queue.Empty:
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Periodically update position and status if connected
|
|
||||||
# Skip updates during scanning - scan worker handles its own position queries
|
|
||||||
if self.is_connected and self.controller and not self.scanning_active:
|
|
||||||
self.update_position()
|
|
||||||
self.update_home_status()
|
|
||||||
self.update_motion_status()
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error in motion worker loop: {e}")
|
|
||||||
self.error_occurred.emit(str(e))
|
|
||||||
|
|
||||||
# Cleanup on exit
|
|
||||||
if self.controller:
|
|
||||||
try:
|
|
||||||
self.controller.disconnect()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
print("Motion worker thread stopped")
|
|
||||||
|
|
||||||
def process_command(self, cmd: MotionCommand):
|
|
||||||
"""Process a motion command"""
|
|
||||||
try:
|
|
||||||
if cmd.cmd_type == 'connect':
|
|
||||||
self.do_connect()
|
|
||||||
elif cmd.cmd_type == 'disconnect':
|
|
||||||
self.do_disconnect()
|
|
||||||
elif cmd.cmd_type == 'jog':
|
|
||||||
self.do_jog(cmd.params['axis'], cmd.params['direction'])
|
|
||||||
elif cmd.cmd_type == 'home':
|
|
||||||
self.do_home(cmd.params['axis'])
|
|
||||||
elif cmd.cmd_type == 'set_velocity':
|
|
||||||
self.do_set_velocity(cmd.params['speed'], cmd.params['accel'])
|
|
||||||
elif cmd.cmd_type == 'set_step_size':
|
|
||||||
self.step_size = cmd.params['step_size']
|
|
||||||
elif cmd.cmd_type == 'set_axis_enable':
|
|
||||||
self.do_set_axis_enable(cmd.params['axis'], cmd.params['enabled'])
|
|
||||||
elif cmd.cmd_type == 'stop':
|
|
||||||
self.running = False
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error processing command {cmd.cmd_type}: {e}")
|
|
||||||
self.error_occurred.emit(f"Command '{cmd.cmd_type}' failed: {str(e)}")
|
|
||||||
|
|
||||||
def do_connect(self):
|
|
||||||
"""Connect to the motion controller"""
|
|
||||||
try:
|
|
||||||
self.controller = ThorlabsServoDriver()
|
|
||||||
self.controller.connect()
|
|
||||||
|
|
||||||
# Enable channels
|
|
||||||
self.controller.enable_axis(AXIS_X)
|
|
||||||
self.controller.enable_axis(AXIS_Y)
|
|
||||||
|
|
||||||
# Start polling to populate cached state (positions, homed, moving, errors)
|
|
||||||
self.controller.start_polling(interval=0.2)
|
|
||||||
|
|
||||||
# Wait for first polling cycle to populate status
|
|
||||||
time.sleep(0.3)
|
|
||||||
|
|
||||||
# Set initial velocity parameters
|
|
||||||
for dest in [AXIS_X, AXIS_Y]:
|
|
||||||
self.controller.set_velocity_params(
|
|
||||||
dest,
|
|
||||||
max_velocity=self.jog_speed,
|
|
||||||
acceleration=self.acceleration
|
|
||||||
)
|
|
||||||
|
|
||||||
self.is_connected = True
|
|
||||||
# Force initial updates (they will be emitted because last values are None)
|
|
||||||
self.update_position()
|
|
||||||
self.update_home_status()
|
|
||||||
self.update_motion_status()
|
|
||||||
self.connected.emit()
|
|
||||||
|
|
||||||
print("Motion controller connected successfully")
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Failed to connect to motion controller: {e}")
|
|
||||||
self.connection_failed.emit(str(e))
|
|
||||||
|
|
||||||
def do_disconnect(self):
|
|
||||||
"""Disconnect from the motion controller"""
|
|
||||||
if self.controller:
|
|
||||||
try:
|
|
||||||
self.controller.disconnect()
|
|
||||||
print("Motion controller disconnected")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error during disconnect: {e}")
|
|
||||||
|
|
||||||
self.controller = None
|
|
||||||
self.is_connected = False
|
|
||||||
self.disconnected.emit()
|
|
||||||
|
|
||||||
def do_jog(self, axis: str, direction: int):
|
|
||||||
"""Execute a jog move"""
|
|
||||||
if not self.is_connected or not self.controller:
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
dest = AXIS_X if axis == 'x' else AXIS_Y
|
|
||||||
|
|
||||||
# Calculate relative distance
|
|
||||||
distance = self.step_size * direction
|
|
||||||
|
|
||||||
# Execute the move (blocking, with short timeout for continuous jogging)
|
|
||||||
self.controller.move_axis_relative(dest, distance, timeout=0.5)
|
|
||||||
|
|
||||||
# Update position
|
|
||||||
self.update_position()
|
|
||||||
|
|
||||||
self.move_completed.emit(axis)
|
|
||||||
|
|
||||||
except TimeoutError:
|
|
||||||
# Timeout is expected during continuous jog - don't report as error
|
|
||||||
pass
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Jog error: {e}")
|
|
||||||
self.error_occurred.emit(f"Jog failed: {str(e)}")
|
|
||||||
|
|
||||||
def do_home(self, axis: str):
|
|
||||||
"""Home an axis"""
|
|
||||||
if not self.is_connected or not self.controller:
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
dest = AXIS_X if axis == 'x' else AXIS_Y
|
|
||||||
|
|
||||||
print(f"Homing {axis.upper()} axis...")
|
|
||||||
self.controller.home_axis(dest, timeout=20.0)
|
|
||||||
|
|
||||||
# Update position and status after homing
|
|
||||||
self.update_position()
|
|
||||||
self.update_home_status()
|
|
||||||
|
|
||||||
print(f"{axis.upper()} axis homed successfully")
|
|
||||||
|
|
||||||
except TimeoutError:
|
|
||||||
print(f"Home timeout: {axis.upper()} axis")
|
|
||||||
self.error_occurred.emit(f"Homing {axis.upper()} timed out")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Home error: {e}")
|
|
||||||
self.error_occurred.emit(f"Homing {axis.upper()} failed: {str(e)}")
|
|
||||||
|
|
||||||
def do_set_velocity(self, speed: float, accel: float):
|
|
||||||
"""Set velocity parameters"""
|
|
||||||
if not self.is_connected or not self.controller:
|
|
||||||
self.jog_speed = speed
|
|
||||||
self.acceleration = accel
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.jog_speed = speed
|
|
||||||
self.acceleration = accel
|
|
||||||
|
|
||||||
for dest in [AXIS_X, AXIS_Y]:
|
|
||||||
self.controller.set_velocity_params(
|
|
||||||
dest,
|
|
||||||
max_velocity=self.jog_speed,
|
|
||||||
acceleration=self.acceleration
|
|
||||||
)
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Set velocity error: {e}")
|
|
||||||
|
|
||||||
def do_set_axis_enable(self, axis: str, enabled: bool):
|
|
||||||
"""Enable or disable an axis for manual movement"""
|
|
||||||
if not self.is_connected or not self.controller:
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
dest = AXIS_X if axis == 'x' else AXIS_Y
|
|
||||||
if enabled:
|
|
||||||
self.controller.enable_axis(dest)
|
|
||||||
else:
|
|
||||||
self.controller.disable_axis(dest)
|
|
||||||
state_str = "enabled" if enabled else "disabled"
|
|
||||||
print(f"{axis.upper()} axis {state_str}")
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Set axis enable error: {e}")
|
|
||||||
self.error_occurred.emit(f"Failed to {'enable' if enabled else 'disable'} {axis.upper()} axis: {str(e)}")
|
|
||||||
|
|
||||||
def update_position(self):
|
|
||||||
"""Update current position and emit signal if changed"""
|
|
||||||
if not self.is_connected or not self.controller:
|
|
||||||
return
|
|
||||||
|
|
||||||
# Throttle position reads to avoid excessive signal emission
|
|
||||||
current_time = time.time()
|
|
||||||
if current_time - self.last_position_update_time < self.position_update_interval:
|
|
||||||
return
|
|
||||||
self.last_position_update_time = current_time
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Read cached positions (populated by polling worker)
|
|
||||||
x_pos = self.controller.positions[0]
|
|
||||||
y_pos = self.controller.positions[1]
|
|
||||||
|
|
||||||
# Always emit on first update, or if position changed significantly (> 0.001mm)
|
|
||||||
if (self.last_x is None or self.last_y is None or
|
|
||||||
abs(x_pos - self.last_x) > 0.001 or abs(y_pos - self.last_y) > 0.001):
|
|
||||||
self.last_x = x_pos
|
|
||||||
self.last_y = y_pos
|
|
||||||
print(f"Position update: X={x_pos:.3f}mm, Y={y_pos:.3f}mm")
|
|
||||||
self.position_updated.emit(x_pos, y_pos)
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error updating position: {e}")
|
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
|
||||||
|
|
||||||
def update_home_status(self):
|
|
||||||
"""Update home status and emit signal if changed"""
|
|
||||||
if not self.is_connected or not self.controller:
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
x_homed = self.controller.am_homed[0]
|
|
||||||
y_homed = self.controller.am_homed[1]
|
|
||||||
|
|
||||||
# Only emit if status changed
|
|
||||||
if x_homed != self.last_x_homed or y_homed != self.last_y_homed:
|
|
||||||
self.last_x_homed = x_homed
|
|
||||||
self.last_y_homed = y_homed
|
|
||||||
self.homed_status.emit(x_homed, y_homed)
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error updating home status: {e}")
|
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
|
||||||
|
|
||||||
def update_motion_status(self):
|
|
||||||
"""Update motion status and emit signal if changed.
|
|
||||||
|
|
||||||
The new driver's polling worker keeps am_moving[], am_error[]
|
|
||||||
up to date automatically via status update messages.
|
|
||||||
"""
|
|
||||||
if not self.is_connected or not self.controller:
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Check for any error conditions
|
|
||||||
if self.controller.am_error[0]:
|
|
||||||
self.error_occurred.emit("X-axis error detected")
|
|
||||||
if self.controller.am_error[1]:
|
|
||||||
self.error_occurred.emit("Y-axis error detected")
|
|
||||||
|
|
||||||
# Read cached motion status (updated by polling worker)
|
|
||||||
x_moving = self.controller.am_moving[0]
|
|
||||||
y_moving = self.controller.am_moving[1]
|
|
||||||
|
|
||||||
# Only emit if status changed
|
|
||||||
if x_moving != self.last_x_moving or y_moving != self.last_y_moving:
|
|
||||||
self.last_x_moving = x_moving
|
|
||||||
self.last_y_moving = y_moving
|
|
||||||
self.motion_status.emit(x_moving, y_moving)
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error updating motion status: {e}")
|
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
|
||||||
|
|
||||||
# Slot methods for queuing commands
|
|
||||||
@QtCore.pyqtSlot()
|
|
||||||
def queue_connect(self):
|
|
||||||
"""Queue a connect command"""
|
|
||||||
self.command_queue.put(MotionCommand('connect'))
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot()
|
|
||||||
def queue_disconnect(self):
|
|
||||||
"""Queue a disconnect command"""
|
|
||||||
self.command_queue.put(MotionCommand('disconnect'))
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot(str, int)
|
|
||||||
def queue_jog(self, axis: str, direction: int):
|
|
||||||
"""Queue a jog command"""
|
|
||||||
self.command_queue.put(MotionCommand('jog', axis=axis, direction=direction))
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot(str)
|
|
||||||
def queue_home(self, axis: str):
|
|
||||||
"""Queue a home command"""
|
|
||||||
self.command_queue.put(MotionCommand('home', axis=axis))
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot(float, float)
|
|
||||||
def queue_set_velocity(self, speed: float, accel: float):
|
|
||||||
"""Queue a set velocity command"""
|
|
||||||
self.command_queue.put(MotionCommand('set_velocity', speed=speed, accel=accel))
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot(float)
|
|
||||||
def queue_set_step_size(self, step_size: float):
|
|
||||||
"""Queue a set step size command"""
|
|
||||||
self.command_queue.put(MotionCommand('set_step_size', step_size=step_size))
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot(str, bool)
|
|
||||||
def queue_set_axis_enable(self, axis: str, enabled: bool):
|
|
||||||
"""Queue a command to enable or disable an axis"""
|
|
||||||
self.command_queue.put(MotionCommand('set_axis_enable', axis=axis, enabled=enabled))
|
|
||||||
|
|
||||||
@QtCore.pyqtSlot()
|
|
||||||
def stop(self):
|
|
||||||
"""Stop the worker thread"""
|
|
||||||
# Set running to False immediately so the main loop can exit
|
|
||||||
# even if it's blocked waiting for a response from the controller
|
|
||||||
self.running = False
|
|
||||||
# Also queue a stop command to ensure the command_queue.get() returns
|
|
||||||
self.command_queue.put(MotionCommand('stop'))
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,743 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>Dialog</class>
|
|
||||||
<widget class="QDialog" name="Dialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>681</width>
|
|
||||||
<height>471</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Bahnschrift</family>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Dialog</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QTabWidget" name="options_tab_widget">
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="genesis_config">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Detection Laser</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="vl_genconfig_main">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Scanning Power [mW]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_detection_scanpower"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Test Connection:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_test_genesis_connection">
|
|
||||||
<property name="text">
|
|
||||||
<string>Query Laser / Test Connection</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>Laser SN:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="l_detection_serialnum">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_16">
|
|
||||||
<property name="text">
|
|
||||||
<string>Laser Model:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="l_detection_modelname">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>Interlock State:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="l_detection_interlock">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_14">
|
|
||||||
<property name="text">
|
|
||||||
<string>Keyswitch State:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="l_detection_keyswitch">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Main Heatsink Temp</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="l_detection_heatsink_temp">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_12">
|
|
||||||
<property name="text">
|
|
||||||
<string>ETA Temp</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="l_detection_eta_temp">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="helios_config">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Generation Laser</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_17">
|
|
||||||
<property name="text">
|
|
||||||
<string>Communication Port:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_generation_comport"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_autodetect_genlaser">
|
|
||||||
<property name="text">
|
|
||||||
<string>Autodetect</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_focusing_params">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Focusing Parameters:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_focusing_freq">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_focusing_frequency">
|
|
||||||
<property name="text">
|
|
||||||
<string>Focusing Frequency [Hz]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_generation_focusing_frequency"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_focusing_current">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_focusing_current">
|
|
||||||
<property name="text">
|
|
||||||
<string>Focusing Pump Current [mA]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_pumpdiode_focusing_current"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_focusing">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Policy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_scanning_params">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Scanning Parameters:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_18">
|
|
||||||
<property name="text">
|
|
||||||
<string>Scanning Frequency [Hz]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_generation_frequency"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_19">
|
|
||||||
<property name="text">
|
|
||||||
<string>Scanning Pump Current [mA]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_pumpdiode_current"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_20">
|
|
||||||
<property name="text">
|
|
||||||
<string>Effective Scan Direction Pixel Size:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="l_calculated_pixel_size_laser">
|
|
||||||
<property name="text">
|
|
||||||
<string>mm px</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="le_generation_reset">
|
|
||||||
<property name="text">
|
|
||||||
<string>Reset Laser (Required after interlock enable)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="mls_config">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Scanning Stage</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_22">
|
|
||||||
<property name="text">
|
|
||||||
<string>Scan Velocity [mm/s]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_scan_velocity"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_23">
|
|
||||||
<property name="text">
|
|
||||||
<string>Scan Acceleration [mm/s2]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_scan_accel"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_17">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_24">
|
|
||||||
<property name="text">
|
|
||||||
<string>X-Axis Trigger Mode</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="combo_x_trigmode"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_19">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_25">
|
|
||||||
<property name="text">
|
|
||||||
<string>Y-Axis Trigger Mode</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="combo_y_trigmode"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_26">
|
|
||||||
<property name="text">
|
|
||||||
<string>Optical Axis X Coordinate [mm]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_optical_xcoord"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_27">
|
|
||||||
<property name="text">
|
|
||||||
<string>Optical Axis Y Coordinate [mm]:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_optical_ycoord"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="t3r_config">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>T3R</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_21">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_28">
|
|
||||||
<property name="text">
|
|
||||||
<string>Comminucation Port:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_t3r_comport"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_t3r_autodetect">
|
|
||||||
<property name="text">
|
|
||||||
<string>Autodetect</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_t3r_test_connection">
|
|
||||||
<property name="text">
|
|
||||||
<string>Test Connection</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_29">
|
|
||||||
<property name="text">
|
|
||||||
<string>Firmware Version</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="label_33">
|
|
||||||
<property name="text">
|
|
||||||
<string>FPGA Present?</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLabel" name="l_t3r_fpga_active">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="l_t3r_homed">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="l_t3r_fwversion">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="label_31">
|
|
||||||
<property name="text">
|
|
||||||
<string>Homed Status</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QLabel" name="label_35">
|
|
||||||
<property name="text">
|
|
||||||
<string>FPGA MultiDivider
|
|
||||||
Enabled?</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QLabel" name="label_36">
|
|
||||||
<property name="text">
|
|
||||||
<string>FPGA RowPacking
|
|
||||||
Enabled?</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QLabel" name="l_t3r_fpga_multidivider">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
|
||||||
<widget class="QLabel" name="l_t3r_fpga_rowpack">
|
|
||||||
<property name="text">
|
|
||||||
<string>???</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="scope_config">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Oscilloscope</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_26">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_39">
|
|
||||||
<property name="text">
|
|
||||||
<string>Oscilloscope Socket Address:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_oscope_socket_addr"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_30">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_40">
|
|
||||||
<property name="text">
|
|
||||||
<string>Scratch Directory:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_data_scratchdir"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>Browse</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_29">
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rdo_savetopc">
|
|
||||||
<property name="text">
|
|
||||||
<string>Save to PC</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rdo_savetoscope">
|
|
||||||
<property name="text">
|
|
||||||
<string>Save to Oscilloscope</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_27">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_test_scope">
|
|
||||||
<property name="text">
|
|
||||||
<string>Test Connection</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_updateconfig">
|
|
||||||
<property name="text">
|
|
||||||
<string>Update Configuration</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_cancelconfig">
|
|
||||||
<property name="text">
|
|
||||||
<string>Cancel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
Reference in New Issue
Block a user