Skip to content

Commit 3f205db

Browse files
Merge pull request #1099 from Daniel-Buckelew/rfvc_pr
ASI RFVC Changes to be merged in Navigate
2 parents cbf0822 + 1c78126 commit 3f205db

File tree

5 files changed

+440
-1
lines changed

5 files changed

+440
-1
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,34 @@ Optotune Focus Tunable Lens
112112
113113
------------------
114114

115+
ASI
116+
---
117+
118+
The ASI Tiger Controller has a few limitations for the analog signals. First, the
119+
minimum voltage must be zero volts. Second, the period value needs to be a whole number.
120+
121+
There are two analog waveforms offered, triangle and ramp waves. The triangle waveform is
122+
a periodic analog waveform, with no delay periods. The sawtooth waveform is a periodic
123+
analog waveform with a delay period between each cycle.
124+
125+
.. collapse:: Configuration File
126+
127+
.. code-block:: yaml
128+
129+
microscopes:
130+
microscope_name:
131+
remote_focus_device:
132+
hardware:
133+
type: ASI
134+
axis: A
135+
min: 0
136+
max: 5
137+
port: COM2
138+
baudrate: 9600
139+
|
140+
141+
------------------
142+
115143
Synthetic Remote Focus Device
116144
-----------------------------
117145
If no remote focus device is present, one must configure the software to use a synthetic

src/navigate/config/configuration_database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,14 @@
435435
remote_focus_device_types = {
436436
"Equipment Solutions": ("EquipmentSolutions", "equipment_solutions"),
437437
"Analog Device": ("NI", "ni"),
438+
"ASI Device": ("ASI", "asi"),
438439
"Virtual Device": ("Synthetic", "synthetic"),
439440
}
440441

441442
remote_focus_hardware_widgets = {
442443
"type": ["Device Type", "Combobox", "string", remote_focus_device_types, None],
443444
"channel": ["DAQ Channel", "Input", "string", None, "Example: PXI6259/ao3"],
445+
"axis": ["Device Type", "Input", "string", None, "Example: A"],
444446
"min": [
445447
"Minimum Voltage",
446448
"Spinbox",

src/navigate/model/device_startup_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ def start_daq(configuration: Dict[str, Any], device_type: str = "NI") -> DAQBase
536536
from navigate.model.devices.daq.ni import NIDAQ
537537

538538
return NIDAQ(configuration)
539-
539+
540540
elif device_type.lower().startswith("synthetic"):
541541
from navigate.model.devices.daq.synthetic import SyntheticDAQ
542542

src/navigate/model/devices/APIs/asi/asi_tiger_controller.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,3 +1010,69 @@ def logic_card_off(self, axis : str) -> None:
10101010
self.read_response()
10111011
self.send_command(f'6 CCA Z=0\r')
10121012
self.read_response()
1013+
1014+
def logic_cell_on(self, axis : str):
1015+
self.send_command(f'M E = {axis}\r')
1016+
self.read_response()
1017+
self.send_command(f'CCA Z=1\r')
1018+
self.read_response()
1019+
1020+
def logic_cell_off(self, axis :str):
1021+
self.send_command(f'M E = {axis}\r')
1022+
self.read_response()
1023+
self.send_command(f'CCA Z=0\r')
1024+
self.read_response()
1025+
1026+
def SA_waveform(self, axis:str, waveform=0, amplitude=1000, offset=500, frequency=1000):
1027+
"""Programs the analog waveforms using SAA, SAO, and SAP
1028+
Default waveform is a sawtooth waveform with an amplitude of 1V with an offset of 0.5V
1029+
1030+
Parameters
1031+
----------
1032+
axis: str
1033+
Tiger Controller axis
1034+
waveform:
1035+
Type of waveform pattern according to https://asiimaging.com/docs/commands/sap
1036+
amplitude:
1037+
amplitude of the waveform in mV
1038+
offset:
1039+
sets the center position of the waveform in mV
1040+
frequency:
1041+
sets the period of the waveform in milliseconds
1042+
"""
1043+
1044+
"Verify if this is for synchronous or asynchronous"
1045+
print(f"Period (ms): {frequency}")
1046+
if (waveform % 128 == 3):
1047+
offset = .5*(offset+amplitude)
1048+
amplitude = amplitude*2
1049+
1050+
self.send_command(f"3 SAP {axis}={waveform}")
1051+
self.read_response()
1052+
self.send_command(f"3 SAA {axis}={amplitude}")
1053+
self.read_response()
1054+
self.send_command(f"3 SAO {axis}={offset}")
1055+
self.read_response()
1056+
self.send_command(f"3 SAF {axis}={frequency}")
1057+
self.read_response()
1058+
1059+
def SAM(self, axis: str, mode: int):
1060+
"""Sets the single-axis mode according to the integer code.
1061+
1062+
0: stops waveforms if they are running
1063+
1: starts generating the waveform pattern
1064+
2: waveform only runs for one cycle, then waits for another trigger
1065+
3: starts generating the waveform pattern, restarts the other waveform on the same card
1066+
4: starts generating the waveform, free running after the trigger
1067+
1068+
Parameters
1069+
----------
1070+
axis: str
1071+
Laser axis
1072+
mode:
1073+
Integer code
1074+
"""
1075+
1076+
self.send_command(f"3 SAM {axis}={mode}")
1077+
self.read_response()
1078+

0 commit comments

Comments
 (0)