Skip to content

Commit f138144

Browse files
committed
Add nominal support for analog inputs with the NRSE termination.
1 parent 05146dd commit f138144

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

labscript_devices/NI_DAQmx/blacs_workers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ def start_task(self, chans, rate):
473473

474474
if self.AI_term == 'RSE':
475475
term = DAQmx_Val_RSE
476+
elif self.AI_term == 'NRSE':
477+
term = DAQmx_Val_NRSE
476478
elif self.AI_term == 'Diff':
477479
term = DAQmx_Val_Diff
478480
elif self.AI_term == 'PseudoDiff':

labscript_devices/NI_DAQmx/labscript_devices.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,19 @@ def __init__(
213213
self.max_DO_sample_rate = max_DO_sample_rate
214214
self.min_semiperiod_measurement = min_semiperiod_measurement
215215
self.num_AI = num_AI
216+
# special handling for AI termination configurations
216217
self.AI_term = AI_term
217218
if AI_term_cfg == None:
218219
# assume legacy configuration if none provided
219220
AI_term_cfg = {f'ai{i:d}': ['RSE'] for i in range(num_AI)}
220221
self.AI_chans = [key for key,val in AI_term_cfg.items() if self.AI_term in val]
221222
if not len(self.AI_chans):
222223
msg = """AI termination {0} not supported by this device."""
223-
raise LabscriptError(dedent(msg.format(AI_term)))
224+
raise LabscriptError(dedent(msg.format(AI_term)))
224225
if AI_term == 'Diff':
225226
self.AI_range = AI_range_Diff
226227
# define AI_start_delay in ticks, assumes AI_start_delay_ticks is defined
227-
self.start_delay_ticks = (AI_start_delay != None)
228+
self.start_delay_ticks = (AI_start_delay != None)
228229
self.num_AO = num_AO
229230
self.num_CI = num_CI
230231
self.ports = ports if ports is not None else {}

0 commit comments

Comments
 (0)