From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Differences in NationalInstruments.ModularInstruments.Scope and NationalInstruments.ModularInstruments.NIScope classes

Hi,

 

I am using an old C# code which was built using the NI SCOPE .Net Class libraries version 1.1. I am resusing this code in my new project and I have installed MeasurementStudio2013, NI SCOPE .Net Class Libraries 2.0 and the NI-SCOPE 14.1 with Visual Studio 2013 and working on .Net Framework 4.5.1 (tried changing the version to 4.5 but nothing really changed)

 

The old code uses the library NationalInstruments.ModularInstruments.Scope where as I am working with NationalInstruments.ModularInstruments.NIScope (since newer version of .Net Libraries do not support NationalInstruments.ModularInstruments.Scope.)and I have hell lot of errors in my program since the classes used in old code are not supported by NationalInstruments.ModularInstruments.NIScope.

 

Example classes not supported by NationalInstruments.ModularInstruments.NIScope:

ScopeSession

ScopeSingleRecordMeasurementReader

ScopeSingleRecordReader

ScopeMultipleRecordMeasurementReader

ScopeMultipleRecordReader

ScopeReferenceTriggerType

ScopeChannelCoupling

 

etc and etc.

 

Are there any alternative classes for these in NationalInstruments.ModularInstruments.NIScope ?Please let me know if I am working on something not possible. What is the possible solution I can apply now ? I cannot degrade to 1.1 version because of Operating System and VS compatibility issues. If there is a comparison guide/ user manual that helps me figure out the differences between the two libraries ,that would help.

 

Thanks,

Priyanka

0 Kudos
Message 1 of 10
(5,818 Views)

Hey pwalake,

 

I know it's a bummer but you'll have to go line by line looking at compile errors if you want to upgrade your code.

You'll have to replace each old class with the new class.

 

I tried to find C class libraries for ver 1.1 and I could not.

A google search found the .NET class libraries though, so maybe that could help.

Casey B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 10
(5,730 Views)

Hey Casey,

 

Thanks for your reply. So, if I am using old code which uses NI SCOPE .Net class libraries version 1.1.1, you think its ideal for me to install the same version and go ahead? Also, If I go ahead with 1.1.1, can I still use it on Windows 7(SP1), Measurement Studio 2013, Visual Studio 2012 or even 2013 ? I read the manual for 1.1.1 which specifies all older versions to be used with 1.1.1 hence clarifying. Your inputs will be much appreciated.

 

Regards,

Priyanka

0 Kudos
Message 3 of 10
(5,726 Views)

Hi pwalake, 

 

I only mentioned the .NET class libraries that I found because many of the classes are named similarly to the C# ones you will need. It was more of a point of reference rather than a suggestion to use the .NET classes.

 

So to answer your question, using the .NET 1.1.1 class libraries would not help you here. They will not work in any of the software versions you are using.

You'll need to run your old code in Visual Studio 2012 / Measurement Studio 2013 and fix the compile errors manually, line by line, replacing the old classes with the new versions from NationalInstruments.ModularInstruments.NIScope.

 

Hope that clarifies things!

 

-CB

Casey B.
Applications Engineer
National Instruments
Message 4 of 10
(5,701 Views)

Okay That helps. Are there any documents available that gives this detailed information about classes or even the comparison would be best. I am an intern and totally new to this. Mt project involves developing a desktop application that reads signal from NI Box and evaluates the frequency. It would be of great help if you have documents or even examples which could help my project.

 

Regards,

Priyanka

0 Kudos
Message 5 of 10
(5,694 Views)

On this page you'll find the readme for the .NET class libraries for NI Scope 1.1.1

http://www.ni.com/download/ni-scope-.net-class-library-1.1.1/4692/en/

 

But, this isn't exactly what you need like I said above. I couldn't find the C libraries.

 

That might help a little but that's all I can find.

 

Casey B.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 10
(5,673 Views)

Hey, Priyanka

 

The 2.0 API download page details discusses the API incompatibility between the 1.1.1 and 2.0 .NET API. I have pasted this as follows for convenience:

 

 

Compatibility Notes

The NI-SCOPE 2.0.0 .NET Class Library is not compatible with the NI-SCOPE 1.1.1 and earlier .NET Class Libraries. To comply with IVI Foundation standards, the class hierarchy has been completely changed and design-time property caching has been removed. To upgrade an application that uses the NI-SCOPE 1.1.1 or earlier .NET Class Libraries to use 2.0.0 requires you to rewrite most of the code that uses the NI-SCOPE .NET Class Library.

However, you can install  NI-SCOPE .NET Class Library 2.0.0 side-by-side with NI-SCOPE .NET Class Library 1.1.1 and earlier versions. You can continue to use the .NET applications developed using NI-SCOPE .NET Class Library 1.1.1 and earlier on the same machine that has NI-SCOPE .NET Class Library 2.0.0 installed.

 

 

NI's recommendation is to maintain projects previously written using the 1.1.1 API with the 1.1.1 API, and to start new projects using the 2.0 API. Unfortunately, there isn't a direct migration path between 1.1.1 and 2.0 because of significant architectural changes between the two APIs.

 

Do you plan to port the old code for use with the 2.0 API or will you build off of the old code using the 1.1.1 API?

 

Thanks,

Daniel Dorroh
National Instruments
Message 7 of 10
(5,662 Views)

Thanks a lot for the detailed explanation Daniel. I got clear picture now. I would love to build off the code with 1.1.1 but I see it is not available for free download.

0 Kudos
Message 8 of 10
(5,660 Views)

I am experiencing the same problem, too. I just purchased a copy of Measurement Studio 2015 Professional for Visual Studio 2013. The delivery from National Instruments came with the Measurement Studio 2015 Professional CD and 2 device drivers CD, making a total of 3 CD set. The installation went well. I saw MEASUREMENT STUDIO tab within Visual Studio 2013 IDE. I got too happy and started opening a ScopeWithUI/MeasurementLibrary example only to find that the Scope class (NationalInstruments.ModularInstruments.Scope) is being complained of not being found among other references. So I looked at the assemblies in C:\Windows\Microsoft.Net\ folder and used the NationalInstruments.ModularInstruments..classes there and made changes in the code to reflect the correct namespaces I just changed. Now the example complained of ScopeSingleRecord...etc...not available. Is there a map to what the new classes are, or can National Instruments update the examples to reflect the latest NI-Scope libraries/API? My instinct is telling me that I am out of luck from the responses I had viewed on this topic. I was quite perplexed to read an NI employee's response mentioning about Googling for the C class libraries. Why Googling? Couldn't that employee get to the source from within NI? I wish I knew this type of poor customer support ahead of time to avoid purchasing the product. So far I am having a bad user experience - Especially an Out-Of-The-Box failure like this. Please help me get through the examples included in the installation CD. Did National Instruments even test the examples to make sure they work for the target product (Measurement Studio 2015 for VS .Net 2013 in my case)? I want a new set of functional examples. I am entitled to being able to use these examples successfully because they are not my code. They are NI code, and they failed to be built with the CD set delivered. Thanks for your immediate attention.

0 Kudos
Message 9 of 10
(3,045 Views)

Have you tried installing the latest version of NI-Scope .NET? Starting with NI-Scope 18.0, the .NET libraries are now included in the C driver installer. You can find the NI-Scope 18.0 installer and download it for free from here:

http://www.ni.com/download/ni-scope-18.0/7548/en/

 

Make sure when using the installer that you select for .NET Framework 4.0 Language Support and/or .NET Framework 4.5 Language Support.
image.png


If you install this version of NI-Scope, you should be able to find the .NET examples here:

C:\Users\Public\Documents\National Instruments\NI-SCOPE\Examples

 

If you need an older version of NI-Scope .NET then you can find older versions on this page:

http://www.ni.com/product-documentation/52928/en/

 

As stated above, NI-Scope was changed between version 1.1.1 and 2.0 to meet requirements from the IVI Foundation and to change from using .NET Framework 2.0 to .NET Framework 4.0 and 4.5. This introduced many breaking changes. For this reason, older examples will not work with the newer NI-Scope releases, and the old NI-Scope .NET libraries will not work with the newer examples.

0 Kudos
Message 10 of 10
(3,034 Views)