Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is Imports NationalInstruments.DAQmx still the first statement in a VB2010 programme?

I had good results with VB2005 and WindowsXP but having upgraded to Window7 We need to use VB2010 to operate the USB6008.

When I type Imports NationalInstruments.DAQmx at the very top there's a sqiggly underline in green with pop-up to the effect that this is the wrong Namespace or the file cannot be found.

I remain in due course corrected please.

0 Kudos
Message 1 of 15
(6,275 Views)

Hi,

 

You need to add a reference to the DAQmx library.

 

Curt

0 Kudos
Message 2 of 15
(6,254 Views)

Thanks for your reply.

I have made reference to:

CW3DGraphLib

MXCTRLib

NI.Common.Native

NI.MStudioCLM

NI.NiLMClientDLL

NATUPNPlib

NIDAQmxCAPI

NIReports

nisysapi

Still the sqiggly green line under NationalInstruments.DAQmx

Does this list at least contain the correct reference?

Maybe I must change something in the Properties Window?

Look forward to your reply Sir

jeff

0 Kudos
Message 3 of 15
(6,250 Views)

Hi,

 

You should see the NationalInstruments.DAQmx NET library listed. See attached image.

 

Curt

 

reference.png

0 Kudos
Message 4 of 15
(6,233 Views)

@jeffrey123 wrote:

I had good results with VB2005 and WindowsXP but having upgraded to Window7 We need to use VB2010 to operate the USB6008.

When I type Imports NationalInstruments.DAQmx at the very top there's a sqiggly underline in green with pop-up to the effect that this is the wrong Namespace or the file cannot be found.

I remain in due course corrected please.


When you installed the NI-DAQmx driver software, was Visual Studio 2010 already installed?

If not, you may need to go back to and repair the install or re-install of NI-DAQmx to add support for .NET 4.0

 

I only have VB.NET 2010 Express. Once I added the reference to NI-DAQmx, C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.DAQmx.dll, everything was fine.

0 Kudos
Message 5 of 15
(6,224 Views)

Thanks for telling me that information.Vital.Problem solved.

Maybe you can tell me that the DLL is the same one I had success with on VB2005 and that all the statements relating to the USB 6008 are the same.Once again many thanks

0 Kudos
Message 6 of 15
(6,093 Views)

Hi,

 

You should post some of your code. It looks like you were using Measurement Studio 6.0 Active X controls.

The code for .NET calls to DAQmx will be different.

 

Curt

0 Kudos
Message 7 of 15
(6,091 Views)

Well I managed to make reference to 

NationalInstruments>DAQmx  and

NationalInstruments.Common.

and no errors in the editor till i build then:

"The referenced assemblies could not be resolved because it has a dependency on System Web Version 4 .0.0.0 which is not in the currently targeted frame work .NET Framework Version 4.

After the build all squiggly green underline back by NationalInstruments.DAQmx..

I installed .Net Framework 4 after i installed VB2010.

Dear Curt,

Do you have any idea?

regards

jeff

0 Kudos
Message 8 of 15
(6,019 Views)

Please see the comments I made above

I referenced NationalInstruments.DAQmx  and

NationalInstruments.Common

and the squigtgly green line under NationalInstruments.DAQmx goes away.

but when I Build it comes back with the msg

"The referenced assemblies could not be resolved because it has a dependency on System.Web Version 4.0.0.0

which is not in the currently targeted framework  .Net Framework 4...."

Do you have any ideas

regards

jeff

0 Kudos
Message 9 of 15
(6,008 Views)

Hi Jeff,

 

The System.Web reference could have been added by any number of components that you included in your project. Did you add a Measurement Studio 'NetworkVariableDataSource' or 'NetworkVariableBrowserDialog' your project?

 

Curt

0 Kudos
Message 10 of 15
(5,984 Views)