02-11-2013 10:27 AM
I have purchased a USB6008 DAQ , installed DAQmx, checked the operation of device with MAX, and run example program “GenVoltageUpdate.2010 “ within Visual Studio 2010 without any problem.
Nevertheless I have several questions when I attempt to create my own project. Some may relate to National Instrument software, some to Microsoft VS2010 software. I am not sure?
The example program indicates that a new program using these features must contain references to “NationalInstruments.Common” and “NationalInstruments.DAQmx” as well as contain the Imports statement “NationalInstruments.DAQmx”.
If I start VS2010, open a new project, open Object Browser, select All Components, and search NationalInstruments.DAQmx or NationalInstruments.Common I find no entries for these components. Why?
If I click on Project > Add Reference and select .NET tab, again I do not see NationalInstruments.DAQmx or NationalInstruments.Common listed. However, I see that selection by default has been “Filtered to .NET Framework 4 Client Profile”. Therefore, I selected the application properties, selected the Compile tab, clicked on Advanced Compile Options and changed the target framework from “NET Framework 4 client Profile” to simply “NET Framework 4”. Once the Add Reference .NET entries were filtered to NET 4, I was able to see the required entries and add them to the application. So it appears that I can add references only by using Project > Add Reference only after editing the application properties.
However even after this change in the application properties, I was still not able to see the needed components while browsing All Components in Object Browser. Neither was I able to see these components by browsing .NET Framework 4. Why?
As a workaround, I was able to define a Custom Component Set by browsing for the needed components. Having done this, I was also able to add a reference using the Object Browser tool “Add to references in Selected Project…” Why should it be necessary to create a custom Component Set?
I should note that I am using the version of MS2010 that comes with Visual Basic Express and that perhaps the full version might work differently. I also understand that NI has not tested much of its software with VS2010, only with VS 2008. Would you recommend using 2008 instead?
02-12-2013 09:08 AM
Hi philgo,
You should be fine working with Visual Studio 2010 and Measurement Studio 2010. The questions you have appear to be related to a common problem with having the framework be the Client Profile instead of the regular .NET Framework 4 configuration. What I would recommend is when creating new projects in visual studio make sure to select a Measurement Studio template instead of any of the other given templates; it should configure things more correctly for your project. The other templates do not know to reference in the NationalInstruments references. When creating a new Measurement Studio template you have the ability to select the needed references on project creation and can continue to modify them by selecting Measurement Studio -> Add/Remove .NET Class Libraries.
Hopefully that addresses your questions!
Regards,
02-15-2013 02:35 PM
I should have specified that I am using VS 2010 Express. I now see on the NI support site that "Visual Studio Express Editions do not allow third-party integration, there is no support for Measurement Studio integration. This includes the project wizards, the Add/Remove Class Library Wizard, the Parameter Assistant, and the DAQ and Instrument I/O Assistants. As a result, you will need to manually add references to the Measurement Studio libraries within your projects."
I guess I can live with this.
The Measurement Studio Templates are also not available in VS 2010 Express and I see no way to define a new template more suitable to using my NI software including IMAQdx, DAQmx, and Vision Development System