10-14-2009 05:28 AM
Hello,
I am running the "Getting Started" from the NI-SCOPE examples and I get the exception stated on the following line:
ModularInstrumentsSystem modularInstrumentsSystem = new ModularInstrumentsSystem("NI-SCOPE");
I have uninstalled and re-installed Measurement Studio, NI-SCOPE and the device drivers twice now. The Scope (USB-5132) works fine from MAX. The project references are correct and I can rebuild the project without errors. What should I do?
I inherited this PC from a previous user who had installed the sofwtare. Due to IT department policies we do not have Admin rights but are allowed to "runas root". I have also noticed that MAX will only run as root - why is this?
10-16-2009 08:49 AM
Am I the only person in the world with this issue?
I just spent the best part of a day installing afresh on another machine. Why do I have to install 750MB of unrelated stuff (like Compact RIO support) to get my NI-Scope to work on a PC?
This time the install failed to install the ModularInstrumentSystem correctly.
10-19-2009 08:52 AM
Hi Jon,
MAX needs to run as admin because it is talking to hardware.
Quote:
ModularInstrumentsSystem modularInstrumentsSystem = new ModularInstrumentsSystem("NI-SCOPE");
Is your scope called "NI-SCOPE"? If it's called something else then change NI-SCOPE to that, e.g. myScope.
If this isn't the issue then it sounds like the installation of Measurement Studio may have corrupted.
Can you tell me what version of MS you are using and can you send in your code (if your code is large then a condensed version that still has this error would be greatly appreciated).
Kind regards
10-19-2009 10:04 AM
Thanks Rico,
What a simple solution. Completely misleading exception. Why would the examples be written using "NI-SCOPE" when the device defaults to "Dev1"?
10-19-2009 03:15 PM
Hi Jon,
The Getting Started Example in the NI-SCOPE .NET API actually uses the modular instruments driver (NI-ModInst) to query the installed devices in your system rather than just set a default such as Dev1. Refer to the LoadScopeDeviceNames() function within the code.
The "NI-SCOPE" string in the function indicates the driver of interest. This function populates the drop down resource list with a list of all the devices which are associated with NI-SCOPE when the form is first loaded.
It sounds like you are getting around the error by coding the name of your device directly, rather than using the ModInst query. This is a valid work around to get you up and running quickly, but it would not be addressing the root of the error, which sounds like it might be an installation issue. If you want to pursue resolving the root of this problem, please post back with details on what version of Measurement Studio, NI-SCOPE and NI-SCOPE .NET API you are using and which language you are trying to use (i.e. C#, VB?)
- Jennifer O.
10-19-2009 04:58 PM
Jennifer,
Thanks for the post. I am using Measurement Studio 8.5, NI-SCOPE 3.5.1 and the Dot Net 1.1.1 ( Framework 3.5) in C#. My scope hardware is NI USB 5132. PC running Windows XP
I now do have a "real" install problem having re-installed everything. When I connect the USB scope, the driver gets stuck at the USB 5132 Loader stage. It used to go on to load the "proper"driver (called just USB 5132) and light the LED on the scope. Now it just sits there with USB 5132 Loader in Device Manager.
Any ideas?
Jon
10-20-2009 08:03 AM - edited 10-20-2009 08:07 AM
Hi,
Actually this problem isn't solved at all (sorry Rico - I changed the name of the USB Scope to "NI-SCOPE"). After a full re-install of EVERY National Instruments piece of software and a registry clean I still have the original issue. BTW, I have got past the Loader issue in my last post.
Jennifer - that is the NI supplied code for Getting Started 2008 that I quoted there - Line 27 of MainForm.cs
Please help.
10-27-2009 04:45 PM - edited 10-27-2009 04:48 PM
Hi Jon,
Have you been able to get the example code to work? I was able to test installing the software versions you mentioned and was able to run the Getting Started example without error.
In case you are not up and running just yet, here are a few pointers.
1)Make sure you install the driver before the NI-SCOPE .NET API. If you attempt this in the wrong order you should see a warning like the following:
2)Verify that the NI-SCOPE driver is working correctly by plugging in the USB digitizer and running a test panel in Measurement and Automation Explorer, or running the Soft Front Panel (there should be shortcuts to both of these applications through your start menu)
3) If you still have a problem after verifying the last two items, you might try running Dependency Walker(instructions). If you turn profiling on, it should log details on the loading issue. You can copy the log details into a text file to provide us with some insight on what might be going on with your install.
-Jennifer O.