Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

When will VS2008 be supported?

Hi Tom,

It looks like that link is bad for some reason. The main beta website is www.ni.com/beta.  If you are wanting to use Measurement Studio 8.1.2 and prior in Visual Studio 2008, refer to the Using Measurement Studio 8.1.2 and Prior in Visual Studio 2008 tutorial and the
Using Measurement Studio 8.1.2 with Microsoft Visual Studio 2008 KnowledgeBase for information.

Best Regards,


Message Edited by Jonathan N on 03-04-2008 03:51 PM
Jonathan N.
National Instruments
0 Kudos
Message 31 of 39
(4,376 Views)

David,

 

We were hoping to use VS2008 for a 3 year R&D project (Capability Technology Demonstrator) that we are currently in the requirements definition phase. Our preliminary design phase starts in 2 months.

 

We have written MFC C++ libraries (Extension DLLS’s) that use the C API for NiDAQmx, NiSync etc. Typical hardware that we use includes the PXI-6652, PXI-4461 & PXI-6533. We are also investigating the migration from the Datum bc635cpci to the PXI-6682.

 

E.g. The PXI-6682 is synchronised to UTC (IRIG-B, IEEE1588, GPS) and outputs a 1MHz clock (CLK_OUT) that is sourced by the PXI-6652 (CLK_IN). The PXI-6652 generates / routes UTC derived 10 MHz clock to the backplane and DDS clock to PXI-4461 sigma/delta over-sampling clock. Additionally the PXI-6682 routes a digital trigger to the PXI-4461 to initiate analogue I/O.

 

One of our software projects has started using VS2008 C#. Can you comment on how difficult it would be to program the above hardware using C#? Our typical applications use NI graphs / controls in SDI Formview. We also use Stingray for layout managers, tabbed windows etc.

 

Regards,

Steve

0 Kudos
Message 32 of 39
(4,372 Views)

Steve -

It is my understanding that the C APIs to DAQmx and NI-Sync work just fine in Visual Studio 2008. This means that you should be able to migrate your projects, which create the MFC class libraries that wrap these drivers, to Visual Studio 2008 without having any issues related to the code that calls the driver C APIs. Whether you have issues related to MFC and compiler changes depends on what you are doing in your code and what version of Visual Studio you are migrating from.

Are you aware that Measurement Studio includes an NI-DAQmx MFC API? If so, is there a reason that you prefer your own wrappers to the C API over the Measurement Studio API?

Regarding your question about programming NI-DAQmx and NI-Sync hardware in C#:

  • There is a full-featured, native .NET API to NI-DAQmx. By native, I mean that the library is object oriented and that it uses .NET Framework constructs (events, asynchronous method call patterns, etc.) and conventions to represent the underlying driver functionality. Using this API along with the Microsoft .NET Class Libraries and the other Measurement Studio .NET class libraries is very natural. Additionally, Measurement Studio includes tools that integrate into the Visual Studio 2008 environment, as designers (such as the WindowsForms designer or the Data designer) to help you write code that uses the DAQmx API.
  • There is not a native .NET API to NI-Sync. This means that you will need to use the C API. Measurement Studio includes the Instrument Driver Wizard that will generate C# or VB.NET wrappers around the C API. While this API isn't nearly as nice to use as the native .NET DAQmx API, it does provide you some benefits: you do not have to hand-code the P/Invoke declarations, it manages the session for you (including implementation of IDisposable to help you clean up), and conversion of error code return values to exceptions.

So, in summary, I am of the opinion that for someone familiar with C# and NI-DAQmx, programming NI-DAQmx in C# is quite easy. Programming NI-Sync isn't quite as easy, but it isn't too bad; it's just a little clunky.

David Rohacek
National Instruments

 

0 Kudos
Message 33 of 39
(4,348 Views)

David,

We used our own wrappers around the c API as a lot of the code was developed initially under NIDAQ using the PCI-4451. We started using the PXI-4461 when it was in its BETA phases and not a lot of the higher level libraries existed in NiDAQmx.

It looks like maybe we should be investigating the move towards C# in the longer term given your feedback.

Thanks,

Steve

 

0 Kudos
Message 34 of 39
(4,333 Views)
Hello, we are using a C# forms application in .net 2008.  We are adding a PXI6653 and PXI6562.  Can we control these boards without Measurement Studio?  Do they come with the SW to add them into our .net 2008 solution?  Is there any documentation on how to integrate these brds with a C# 2008 .net project?  Thank you.
0 Kudos
Message 35 of 39
(4,147 Views)
DMM1,
 
You can directly control those boards without Measurement Studio using the C/C++ API that is provided with the drivers (Sync & HSDIO).  For the HSDIO drivers there is a C# wrapper available from this KnowledgeBase, which should make things easier.  Also if you refer to David Rohacek's post above, he explains some of the issues you may run into using NI-Sync since it does not have a pre-made wrapper. 
 
The best resources you will find on this subject are the API references or files specific for the drivers.  Unfortunately we don't have many documents that specifically address using these drivers in Visual Studio.
John B.
Applications Engineer
National Instruments
0 Kudos
Message 36 of 39
(4,106 Views)
One of the issues is that the Measurement Studio installer only allows installation under VS2003 or VS2008 If the libraries are known to work under VS2008, it would be nice if the installer let us install...
0 Kudos
Message 37 of 39
(3,953 Views)
Hello,

I do not think the MStudio installer limits you from installing the .NET libraries anytime.  What it does limit is the installation of the C++ libraries, which are specific to the MFC version that ships with Visual Studio so they would not be of much use to someone who does not have that installed, and the Visual Studio integration, which again is specific to that version of Visual Studio so not much use there either.

All you have to do is not have integration or C++ selected in the feature tree of the installer and you should be able to install, even without Visual Studio on the machine.   If this is not the case please let me know what you are seeing and I will try and figure out why you are not being allowed to install properly.

Regards,
Jeff
NI
0 Kudos
Message 38 of 39
(3,937 Views)
Hi all !

After had a look at question and answers, I didn't find the way to fix my problem (I may have not read well !)
I must upgrade VS from 2005 to 2008 and my application uses NI MFC librairies, and also NI OCX.
I installed VS2008 by following instructions given by NI (using MS 8.1.2 with...) but as I tried to compile
I normally got error messages regarding include files...

Can anyone help me ?

Thanks in advance.

Philippe
0 Kudos
Message 39 of 39
(3,606 Views)