USB 6009 Add Analog Input, Error 200077
10 views (last 30 days)
Show older comments
Hey everyone,
I am using the Data Acq Toolbox version 3.1 (r2012a) with a NI USB-6009 running DAQmx 9.5 drivers. The device has 8 analog inputs if used in single ended mode, and 4 analog inputs if used in differential mode.
I am programming through the session based interface. If I attempt to create a session and add channels however, I am only able to add the first 4 channels since they by default are added as differential. If I try to add a 5th channel, I get error message 200077.
See the code below:
>> daq.getDevices
ans =
ni: National Instruments USB-6009 (Device ID: 'Dev1')
Analog input subsystem supports:
8 ranges supported
Rates from 0.1 to 48000.0 scans/sec
8 channels ('ai0','ai1','ai2','ai3','ai4','ai5','ai6','ai7')
'Voltage' measurement type
Analog output subsystem supports:
0 to +5.0 Volts range
Rates from 0.0 to 0.0 scans/sec
2 channels ('ao0','ao1')
'Voltage' measurement type
Counter input subsystem supports:
Rates from 0.0 to 0.0 scans/sec
1 channel ('ctr0')
'EdgeCount' measurement type
So I know that MATLAB recognizes all 8 channels of the DAQ. However, when I create the session and attemp to add all the channels, I get this:
>> s=daq.createSession('ni'); s.addAnalogInputChannel('Dev1',0:7,'Voltage')
NI Error -200077:
Requested value is not a supported value for this property. The property value may be invalid because it conflicts
with another property.
Property: DAQmx_AI_Min
Requested Value: -20.0
Valid Values Begin with: -10.0
Valid Values End with: 10.0
Channel Name: Dev1/ai4
Task Name: _unnamedTask<44>
Status Code: -200077
I understand why it's giving me the error...mainly because it's trying to add all 8 channels as differential inputs. Is there any way to specify when creating channels in the session based interfaced to add them as SingleEnded? I know I could modify the InputType subproperty of the Channels property, but that is only possible after the channel has been added
4 Comments
Answers (3)
Walter Roberson
on 17 May 2012
This is a hack, but...
Construct the object with channels 0:3. set() the single-ended property of the resulting object. Now channels 4-7 should come into existence, so add-channel those in as well.
2 Comments
Walter Roberson
on 23 May 2012
Sorry, just saw your response now.
Unfortunately I do not have any suggestions at this point (other than asking support)
Some day I'll get the DAQ toolbox and a system to run it on and some devices to connect to it...
See Also
Categories
Find more on Hardware Discovery and Setup in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!