Skip to content

Commit 24318fc

Browse files
Merge pull request #1111 from TheDeanLab/full-functionality
2 parents b8ac105 + 8f6ee9f commit 24318fc

File tree

8 files changed

+918
-89
lines changed

8 files changed

+918
-89
lines changed

docs/source/02_user_guide/01_supported_hardware/galvo.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,53 @@ Multiple types of galvanometers have been used, including Cambridge Technologies
3838
3939
|
4040
41+
------------
42+
43+
ASI
44+
---
45+
46+
Multiple types of galvanometers have been used, including Cambridge
47+
Technologies/Novanta, Thorlabs, and ScannerMAX. Each of these devices
48+
are externally controlled via analog signals delivered from the ASI
49+
Tiger Controller.
50+
51+
The ASI Tiger Controller has a few limitations for the analog signals. First, the
52+
minimum voltage must be zero volts. Second, the period value needs to be a whole number.
53+
Third, there are three analog waveforms offered, sawtooth,
54+
triangle, and sine waves.
55+
56+
The sawtooth waveform is a periodic analog waveform. There are three duty cycle values
57+
accepted, 0, 50, and 100. If the duty cycle is 0, the waveform is a falling sawtooth
58+
waveform. If the duty cycle is 50, then it is a triangle wave. If the duty cycle is 100,
59+
the waveform is a rising sawtooth waveform.
60+
61+
62+
.. collapse:: Configuration File
63+
64+
.. code-block:: yaml
65+
66+
microscopes:
67+
microscope_name:
68+
galvo:
69+
-
70+
hardware:
71+
type: ASI
72+
axis: A
73+
min: 0
74+
max: 1.0
75+
waveform: sine
76+
phase: 0
77+
-
78+
hardware:
79+
type: ASI
80+
axis: B
81+
min: 0
82+
max: 1.0
83+
waveform: sine
84+
phase: 1.57079632679
85+
86+
|
87+
4188
-----------------
4289

4390
Synthetic Galvo

src/navigate/config/configuration_database.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108

109109
daq_device_types = {
110110
"National Instruments": "NI",
111+
"Applied Scientific Instrumentation": "ASI",
111112
"Virtual Device": "Synthetic",
112113
}
113114

@@ -468,7 +469,7 @@
468469
"frame_config": {"ref": "hardware"},
469470
}
470471

471-
galvo_device_types = {"Analog Device": ("NI", "ni"), "Virtual Device": ("Synthetic", "synthetic")}
472+
galvo_device_types = {"Analog Device": ("NI", "ni"), "ASI Device": ("ASI", "asi"), "Virtual Device": ("Synthetic", "synthetic")}
472473

473474
waveform_types = {
474475
"Sine": "sine",
@@ -485,6 +486,7 @@
485486
None,
486487
"*Analog Device only. Example: PXI6259/ao1",
487488
],
489+
"hardware/axis": ["Axis", "Input", "string", None, "Example: A"],
488490
"hardware/min": [
489491
"Minimum Voltage",
490492
"Spinbox",

src/navigate/model/device_startup_functions.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,9 @@ def start_device(
513513
device_not_found(microscope_name, device_category, device_type, device_id)
514514

515515

516-
def start_daq(configuration: Dict[str, Any], device_type: str = "NI") -> DAQBase:
516+
def start_daq(
517+
configuration: Dict[str, Any], device_type: str = "NI", name: str = "name"
518+
) -> DAQBase:
517519
"""Initializes the data acquisition (DAQ) class on a dedicated thread.
518520
519521
Load daq information from the configuration file. Proper daq types include NI and
@@ -536,7 +538,12 @@ def start_daq(configuration: Dict[str, Any], device_type: str = "NI") -> DAQBase
536538
from navigate.model.devices.daq.ni import NIDAQ
537539

538540
return NIDAQ(configuration)
539-
541+
542+
elif device_type == "asi.ASI":
543+
# from navigate.model.devices.daq.asi import ASIDaq
544+
# name = "Microscope-0"
545+
return start_device(name, configuration, "daq")
546+
540547
elif device_type.lower().startswith("synthetic"):
541548
from navigate.model.devices.daq.synthetic import SyntheticDAQ
542549

@@ -578,9 +585,9 @@ def device_not_found(*args: Any) -> None:
578585
def load_devices(
579586
microscope_name: str,
580587
configuration: Dict[str, Any],
581-
is_synthetic=False,
582-
devices_dict={},
583-
plugin_devices=None,
588+
is_synthetic: bool = False,
589+
devices_dict: dict = {},
590+
plugin_devices: Optional[dict] = None,
584591
) -> dict:
585592
"""Load devices from configuration.
586593
@@ -592,6 +599,8 @@ def load_devices(
592599
Configuration dictionary
593600
is_synthetic : bool
594601
Run synthetic version of hardware?
602+
devices_dict : dict
603+
Dictionary of devices to load
595604
plugin_devices : dict
596605
Dictionary of plugin devices
597606
@@ -615,6 +624,6 @@ def load_devices(
615624
]["hardware"]["type"]
616625

617626
if device_type not in devices_dict["daq"]:
618-
devices_dict["daq"][device_type] = start_daq(configuration, device_type)
627+
devices_dict["daq"][device_type] = start_daq(configuration, device_type, microscope_name)
619628

620629
return devices_dict

0 commit comments

Comments
 (0)