-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnection_table.py
More file actions
166 lines (146 loc) · 7.41 KB
/
Copy pathconnection_table.py
File metadata and controls
166 lines (146 loc) · 7.41 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
from labscript import *
from labscript import AnalogOut
from labscript_devices.DummyPseudoclock.labscript_devices import DummyPseudoclock
from labscript_devices.DummyIntermediateDevice import DummyIntermediateDevice
from labscript_devices.NI_DAQmx.models.NI_PXIe_6738 import NI_PXIe_6738
from labscript_devices.NI_DAQmx.models.NI_PXIe_6363 import NI_PXIe_6363
from labscript_devices.IMAQdxCamera.labscript_devices import IMAQdxCamera
from labscript_devices.PrawnBlaster.labscript_devices import PrawnBlaster
from user_devices.NI_DAQmx_PhotonCounter.labscript_devices import NI_DAQmxPhotonCounter
#from labscript_devices import IDS_PeakCamera
from user_devices.IDS_PeakCamera.labscript_devices import IDS_PeakCamera
from user_devices.BBD301.labscript_devices import BBD301
def ct():
PrawnBlaster(
name = 'prawn',
com_port = 'COM11',
num_pseudoclocks = 1,
pico_board = 'pico2'
)
SLOT_6738 = "PXI1Slot3" # EXACT name from NI-MAX
SLOT_6363 = "PXI1Slot2" # EXACT name from NI-MAX
NI_PXIe_6738(
name = 'NI6738',
parent_device = prawn.clocklines[0],
MAX_name = SLOT_6738,
clock_terminal = '/PXI1Slot3/PFI0', # <-- empty string means "use internal/Onboard clock"
max_AO_sample_rate = 100000.00000000001,
)
NI_PXIe_6363(
name = 'NI6363',
parent_device = prawn.clocklines[0],
MAX_name=SLOT_6363,
clock_terminal = '/PXI1Slot2/PFI12', # <-- empty string means "use internal/Onboard clock"
acquisition_rate=100e3
)
# Define digital outs on 6363
#make sure to define an even number of channels for Labscript to be happy
Shutter(name='REPUMP_SHUTTER_do', parent_device=NI6363, connection='port0/line0',
delay=(5.94e-3, 5.6e-3), open_state=1) #Delays coppied from MRR, not directly tested!
DigitalOut(name='MAIN_REL_JUMP_do', parent_device=NI6363, connection='port0/line1')
DigitalOut(name='LCR_BOT_do', parent_device=NI6363, connection='port0/line2')
DigitalOut(name='MOT_COIL_do', parent_device=NI6363, connection='port0/line3')
DigitalOut(name='MRR_TRIG_do', parent_device=NI6363, connection='port0/line4')
Shutter(name='MOT_SHUTTER_do', parent_device=NI6363, connection='port0/line5',
delay=(6e-3, 6e-3), open_state=1) #delays are a guess.
Shutter(name='MRR_SHUTTER_do', parent_device=NI6363, connection='port0/line6',
delay=(5.94e-3, 5.6e-3), open_state=1) #Delays measured and set 2026-FEB-26. See lab notebook for details.
DigitalOut(name='LCR_do', parent_device=NI6363, connection='port0/line7')
DigitalOut(name='scope_trig_do', parent_device=NI6363, connection='port0/line8')
Shutter(name='MRR_SHUTTER_2_do', parent_device=NI6363, connection='port0/line9',
delay=(5.47e-3, 7.08e-3), open_state=1) #Delays measured and set 2026-MAY-04. See lab notebook for details.
Shutter(name='PROBE_SHUTTER_do', parent_device=NI6363, connection='port0/line10',
delay=(6e-3, 6e-3), open_state=1) #Delays are a guess
DigitalOut(name='dummy_do', parent_device=NI6363, connection='port0/line28')
# Define analog outs on 6363. Using these as digital outs for now.
AnalogOut(name='LCR_HOR_ao', parent_device=NI6363, connection='ao0')
AnalogOut(name='LCR_TOP_ao', parent_device=NI6363, connection='ao1')
# Define analog outs on 6738
# Make sure to define an even number of channels for Labscript to be happy
AnalogOut(name='ao0', parent_device=NI6738, connection='ao0')
AnalogOut(name='ao1', parent_device=NI6738, connection='ao1')
AnalogOut(name='ao2', parent_device=NI6738, connection='ao2')
AnalogOut(name='MAIN_JUMP_AMP_ao', parent_device=NI6738, connection='ao3')
AnalogOut(name='REPUMP_JUMP_AMP_ao', parent_device=NI6738, connection='ao4')
AnalogOut(name='ao5', parent_device=NI6738, connection='ao5')
AnalogOut(name='ao6', parent_device=NI6738, connection='ao6')
AnalogOut(name='ao7', parent_device=NI6738, connection='ao7')
# Define analog ins on 6363
AnalogIn(name='ai0', parent_device=NI6363, connection='ai0')
AnalogIn(name='ai1', parent_device=NI6363, connection='ai1')
# Again, make sure to define an even number of channels for Labscript to be happy
#do0 = DigitalOut('do0', ao6738, 'port0/line1')
DigitalOut('do1_dummy', NI6738, 'port0/line0') # dummy to make even number of digital lines
# cam_serial_number2 = '4102766024' #sn yellow 4103389953 blue 4108596607 red 4108596608 green 4102766024
cam = IDS_PeakCamera( #blue
name='my_ids_camera',
parent_device=NI6738,
connection='port0/line1',
serial_number='4108596607', #sn yellow 4103389953 blue 4108596607 red 4108596608
minimum_recovery_time=0.005, # Override the default
trigger_edge_type='rising', # We will trigger via software
trigger_duration=0.05,
camera_attributes={
'trigger': 'On', # On/Off
'format': 'Mono12', # Mono8/Mono12
'exposure': 1, # global property exposure_time overrides this, but we need to set it here too for the BLACS preview mode
'fps': 5.0, # required by base class (will be skipped at runtime)
'gain': 0.0 #gloabal gain overides this, but we need to set it here too for the BLACS preview mode,
},
manual_mode_camera_attributes={ # BLACS preview mode
"trigger": "Off",
"format": "Mono8",
"exposure": 2.5,
"fps": 5.0, # shown in BLACS, not applied to hardware
"gain": 1.0,
},
)
'''
cam = IDS_PeakCamera( #green
name=f'my_ids_camera',
parent_device=NI6738,
connection='port0/line1', #cheat: fake connection to make labscript happy
serial_number=4102766024,
minimum_recovery_time=0.005, # Override the default
trigger_edge_type='rising',
trigger_duration=100*ms,
camera_attributes={
'trigger': 'On', # On/Off
'format': 'Mono8', # Mono8/Mono12
'exposure': 9.0, # 9 ms, using the wrapper property
'fps': 5.0, # required by base class (will be skipped at runtime)
'gain': 1.0,
'roi': [0,0,1440,1080],
'binning': [1,1]
},
manual_mode_camera_attributes={ # BLACS preview mode
"trigger": "Off",
"format": "Mono8",
"exposure": 20.0,
"fps": 5.0, # shown in BLACS, not applied to hardware
"gain": 1.0,
"roi": [0,0,1440,1080],
"binning": [1,1]
},
)'''
bbd = BBD301(
name='bbd301',
parent_device=prawn.clocklines[0],
serial_number='103512594', # your actual serial number
num_channels=1,
)
photon_counter = NI_DAQmxPhotonCounter(
name='photon_counter',
parent_device=prawn.clocklines[0],
#connection='internal',
MAX_name=SLOT_6363,
counter_channel='ctr3',
photon_input_terminal=f'/{SLOT_6363}/PFI5', # wire your photon source here
sample_clock_terminal='', # None = internal clock (matches DummyPseudoclock)
counter_sample_rate=100000,
start_trigger_terminal=f'/{SLOT_6363}/PFI12'
)
if __name__ == '__main__':
ct()
start()
stop(0.001)