Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use NI-DAQmx with CW1.0

I recently purchased a USB DAQ device, USB-6008.  It came with NI-DAQmx, which I installed.  The device is properly recognized by MAX, but does not show up as an available device when I begin my app development using VB and Meas.Studio 1.0.  I suspect that I will need to upgrade, but would like to hear an authoritative answer on this. 
 
Alternatively, could I use traditional NI-DAQ with this device?  Then, I could continue using Meas. Studio 1.0.
 
0 Kudos
Message 1 of 4
(3,590 Views)
Jason,

The USB-6008 is only supported by the DAQmx driver set.  This means that any Component Works DAQ driver modules you are using will not support the 6008 card.  The Component Works DAQ driver modules are built on the Traditional DAQ drivers.  We do provide a DAQmx library that provides programmability from Visual Basic 6, VB .NET 2003 or VB .NET 2005.  The DAQmx drivers do not provide support for versions of Visual Studio prior to 6.0.  The VB 6 library is a type library that converts the C DAQmx API to Visual Basic.  Since DAQmx 7.5, this type library has been included in the drivers.  For more information, please take a look at this Knowledge Base entry.   For VB .NET, we have provided native .NET class libraries that are also installed with the drivers.

You should be able to use other Component Works objects along with the DAQmx library function calls.  If you are using CWGraph for instance, that will work along side the DAQmx libraries.  The only difference, is there are no ActiveX objects that are available for programming your DAQ device.

Let me know if you have further questions.

Regards,

Tyler T.
0 Kudos
Message 2 of 4
(3,581 Views)

Tyler - thanks for the help.  I located the examples and have run the following without problem:
 
1.  Single point analog in.
2.  Continuous analog in
3.  Digital read
4.  Digital write
 
Howerver the (continuous, there is no single point example) analog output generation fails on this line
 
DAQmxErrChk DAQmxCfgSampClkTiming(taskHandle, "", _
        frequencyTextBox.Text, clockEdge, DAQmx_Val_AcquisitionType_ContSamps, 100#)
 
with the error message -200077 Requested value not a supported value for this property.
 
Any ideas?
0 Kudos
Message 3 of 4
(3,567 Views)

Hi Jason,

You are encountering that error because the USB-6008 does not support hardware-timed analog output, it can only do static analog output.  Even though there is not an available example for VB6, this is pretty easy to do.  You create the analog output channel, start the task, and then call the DAQmxWrite function whenever you want to update the analog output, and clear the task at the end.  You can refer to the analog input example "One Sample" to get the general idea of this structure.

Hope this helps,

Laura 

Message 4 of 4
(3,550 Views)