Skip to content

Commit 4957ee4

Browse files
committed
avoid setting the terminal config. causes too many errors.
1 parent b78d044 commit 4957ee4

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

code/DAQmx_Scanners/basicScanner.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
hAITask %The AI task will be kept here
8484

8585
AIChan = 0
86-
AIterminalConfig = 'DAQmx_Val_PseudoDiff' %Valid values: 'DAQmx_Val_Cfg_Default', 'DAQmx_Val_RSE', 'DAQmx_Val_NRSE', 'DAQmx_Val_Diff', 'DAQmx_Val_PseudoDiff'
8786
AIrange = 0.5 % Digitise over +/- this range.
8887

8988
% Properties for the analog output end of things
@@ -174,7 +173,7 @@ function connectToDAQandSetUpChannels(obj)
174173
obj.hAOTask = dabs.ni.daqmx.Task('waveformMaker');
175174

176175
% Set up analog input and output voltage channels
177-
obj.hAITask.createAIVoltageChan(obj.DAQDevice, obj.AIChan, [], -obj.AIrange, obj.AIrange, [], [], obj.AIterminalConfig);
176+
obj.hAITask.createAIVoltageChan(obj.DAQDevice, obj.AIChan, [], -obj.AIrange, obj.AIrange); % can set terminal config mode here
178177
obj.hAOTask.createAOVoltageChan(obj.DAQDevice, obj.AOChans);
179178

180179

code/DAQmx_Scanners/minimalScanner.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
hAITask %The AI task will be kept here
7272

7373
AIChan = 0
74-
AIterminalConfig = 'DAQmx_Val_PseudoDiff' %Valid values: 'DAQmx_Val_Cfg_Default', 'DAQmx_Val_RSE', 'DAQmx_Val_NRSE', 'DAQmx_Val_Diff', 'DAQmx_Val_PseudoDiff'
7574
AIrange = 2 % Digitise over +/- this range.
7675

7776
% Properties for the analog output end of things
@@ -152,7 +151,7 @@ function connectToDAQandSetUpChannels(obj)
152151
obj.hAOTask = dabs.ni.daqmx.Task('waveformMaker');
153152

154153
% Set up analog input and output voltage channels
155-
obj.hAITask.createAIVoltageChan(obj.DAQDevice, obj.AIChan, [], -obj.AIrange, obj.AIrange, [], [], obj.AIterminalConfig);
154+
obj.hAITask.createAIVoltageChan(obj.DAQDevice, obj.AIChan, [], -obj.AIrange, obj.AIrange); % can set terminal config mode here
156155
obj.hAOTask.createAOVoltageChan(obj.DAQDevice, obj.AOChans);
157156

158157

code/DAQmx_Scanners/polishedScanner.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
hAITask %The AI task will be kept here
8787

8888
AIChan = 0
89-
AIterminalConfig = 'DAQmx_Val_PseudoDiff' %Valid values: 'DAQmx_Val_Cfg_Default', 'DAQmx_Val_RSE', 'DAQmx_Val_NRSE', 'DAQmx_Val_Diff', 'DAQmx_Val_PseudoDiff'
9089
AIrange = 0.5 % Digitise over +/- this range.
9190

9291
% Properties for the analog output end of things
@@ -200,7 +199,7 @@ function connectToDAQandSetUpChannels(obj)
200199
obj.hAOTask = dabs.ni.daqmx.Task('waveformMaker');
201200

202201
% Set up analog input and output voltage channels
203-
obj.hAITask.createAIVoltageChan(obj.DAQDevice, obj.AIChan, [], -obj.AIrange, obj.AIrange, [], [], obj.AIterminalConfig);
202+
obj.hAITask.createAIVoltageChan(obj.DAQDevice, obj.AIChan, [], -obj.AIrange, obj.AIrange); % can set terminal config mode here
204203
obj.hAOTask.createAOVoltageChan(obj.DAQDevice, obj.AOChans);
205204

206205

0 commit comments

Comments
 (0)