USB 6009 Add Analog Input, Error 200077

13 views (last 30 days)
Donald Bucci
Donald Bucci on 17 May 2012
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
Donald Bucci
Donald Bucci on 23 May 2012
Anyone else have any ideas? I know there must be a way to work around this, other than just downgrading to the legacy code.

Sign in to comment.

Answers (3)

Donald Bucci
Donald Bucci on 1 Jun 2012
Figured this out. I am using MATLAB 64 bit. Downgrading to 32 bit and performing the original tasks don't present this issue. Is there some way I can forward this to MATLAB's bug department?

Walter Roberson
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
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...

Sign in to comment.


Manisha
Manisha on 14 Jun 2012
Look at this bug report for this issue.
Thanks,
Manisha

Categories

Find more on Data Acquisition Toolbox Supported Hardware 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!