02-11-2011 01:00 PM
Help,
I am getting a runtime error when using the niModInst instrument library.
This is using the example code for getting the installed NI-Scope instruments that are installed on the PC.
I can use the niModInstCVICust_NewCtrl() just fine, but I would like to do the querry behind the scenes.
I have reinstalled the NI-scope drives a couple of times, but that didn't help.
The error is a MS VC++ runtime error R6030.
Thanks,
-lou
02-14-2011 06:16 PM
Lou,
What version of the NI-Scope drivers are you using to program with, and are you using Visual C++ in your application development?
When is the error actually occurring, is it when you run the applications, or when you try to compile the code?
Any other information about when and how this error is showing up would be helpful as we look in to this. Thanks.
Timothy
02-15-2011 10:01 AM
The Driver is NI-Scope 3.60,M
I am not doing any development outside of the CVI environment CVI 9.0.0(348).
I am not using Visual C++. I am including the code, but it is the example program for the niModInst from NI.
The code has compiled fine, but the error occurs on the entry into the program. No lines of code are executed prior to this error if the niModInst is referenced in the program.
I have used the niModInstCVICust_NewCtrl(..) function and had no issues.
02-16-2011 04:27 PM
Lou,
From your explanation and my research it seems that there is either a problem with the calling program, or with one (or more) files in your NI-SCOPE drivers.
You mentioned the one function that you can use, but have you tested with any other individual SCOPE functions to see if you can isolate one or more of the functions causing the error?
With the nature of this problem, it also might be prudent to upgrade to the newest version of the NI-SCOPE drivers (3.7). If the issue is with a driver file, this may have been fixed in the new version, and the new set of installed files may fix it as well. Let me know when you get a chance to do this.
Timothy
02-16-2011 05:13 PM
Thanks Timothy,
I will try the new Scope Drivers, but I believe the problem is not with the Scope Drivers, but with the niModInst library. If this is updated with the Scope drivers, it might work.
I have used the scope in multiple projects without any issue.
I have used the functions from the NI-ModInst Resource Name Control (niModInstCustCtrl.lib; niModInstCustCtrl.fp) without any issue, but these require user interaction.
The problem is a direct result of the functions from NI-ModInst (niModInst.lib; niModInst.fp). Any attempt to include a call from this causes the problem. Just its mere presence in the project raises the error, I do not even need to actually execute a call to the function.
02-17-2011 02:39 PM
Let me know how the installation goes.
If you know the specific driver or program that installed the niModInst library on to your system, you could also try doing a repair on those drivers/programs if the SCOPE upgrade doesn't work.
I'll look in to that particular library some more on my end as well.
Timothy
02-23-2011 05:13 PM
Upgrade of Scope drivers didn't help.
I do not know from which installation the niModInst Library came. My assumption was that it would be a part of the NI-Scope installation, but I have installed other modular instruments as well.
Is there a place I can get the library by itself?
02-24-2011 01:53 PM
Thanks for taking those steps.
I'm going to escalate this issue some and see what other steps we can find while I try to find th exact location of that library.
I'll post again as soon as I get more information for you.
Regards,
Timothy
03-14-2011 02:53 PM
Any updates on this problem?
Is there another way of identifying the available device names programically?
03-15-2011 05:05 PM
Sorry for the delay here. This is a tricky library to pin down, as it tends to be installed by any number of the modular instruments driver packages. It also has some copies in various locations.
Some of the main areas for those files in particular were in the following locations
C:\Program Files\National Instruments\LabVIEW 2010\resource
C:\Program Files\IVI Foundation\IVI\Drivers\niModInst
C:\Program Files\IVI Foundation\IVI\Bin
The best way to check for programmatic access to information of that nature is to check the help file for niModInst itself. This can be found in a number of locations, but particularly the niModInst.chm file at
C:\Program Files\National Instruments\LabVIEW 2010\help
I'll update here again when I gather more information or more specific file locations than the above.