Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for example code to access NI-488.2 USB-GPIB-HS software from VB 2008

Hi, I am looking for an updated version (applicable to VB.NET/VBStudio2008) of the following manual:  

Using Your NI-488® and NI-488.2Subroutines for Visual Basic for Windows. 

In its stead, is there example code available in VB.NET/VBStudio2008, for interfacing several instruments (e.g. voltmeter,

power supply, thermometer) via the NI USB-GPIB-HS interface through the NI software from a VB.NET/VBStudio2008 project application?

 

Thanks for any assistance.

Sincerely

James Eilertsen 

 

0 Kudos
Message 1 of 9
(6,407 Views)

Hi James,

 

That particular manual has not been updated, but we do have examples for programming with both VISA and 488.2 in .NET languages.  These examples can be found at C:\Documents and Settings\All Users\Documents\National Instruments\ .   For these examples to show up, you will need to install 488.2 (and VISA if you would like those exampes) with support for the .NET framework you are using.  

 

There is also a .NET help file that can be found by going to the Start Menu and selecting All Programs»National Instruments»488.2.  

Caleb W

National Instruments

0 Kudos
Message 2 of 9
(6,387 Views)

These examples are not even compatible with VS 2008. When I try to open any of them up under VS 2008, I get an error stating that the project type by this version of the application (see attached jpg). Are there any examples that work with VS 2008?

 

Tim

0 Kudos
Message 3 of 9
(5,791 Views)

Hi Tim,

 

I was successfully able to open this example in VS2008.  What method are you using to open the example that is giving you this error? You may want to upgrade to the newest version of the 488.2 driver to make sure you have the most recent example files.  If you are still unable to open it, please provide additional details, and we can work from there!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 4 of 9
(5,761 Views)

Al,

 

I do have the latest version of 488.2,  which is 2.7.3. I tried to open it by clicking on the file SimpleReadWrite.2008.sln, which works for opening any of my other projects. I also tried opening it from the VS development environment using the Open, Project/Solution option from the File menu. When I try either method to open it, I get the error message as shown in the attached jpg. I don't know what other details I can give you.

 

Tim

0 Kudos
Message 5 of 9
(5,757 Views)

Hi Tim,

 

After doing a little research on the error you are seeing, it looks like the problem is that visual basic project support is not installed.  Use the following command line argument to install the support:

 

devenv /ResetSkippkgs

 

make sure to first navigate to the visual studio directory in the command prompt.  If you are still getting the error after this process, please reply with the exact version of vs you are using from help»about.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 6 of 9
(5,734 Views)

Al,

 

I did what you said, I drilled down to the directory containing devenv.exe and opened it from the command prompt with the command line argument /ResetSkippkgs. When VS opened up I tried to open SimpleReadWrite.2008.sln, but I got the same error. The Visual Studio version is 9.0.30729.4108 QFE.

 

Tim

0 Kudos
Message 7 of 9
(5,727 Views)

Al,

 

I was finally able to get it to work. I did several things and I'm not sure which combination of them was the key. Here's a link to a forum thread that got me started.

 

 http://social.msdn.microsoft.com/forums/fr-FR/vbide/thread/52bc04f9-f086-4adf-ac17-b0ea9f433c39

 

I used the two-step method proposed there. Even then, I couldn't get it to work just by double clicking on the .sln file. I had to open it from the file menu within VS.

 

Tim

0 Kudos
Message 8 of 9
(5,684 Views)

Hi Tim,

 

I apologize - I gave you one of the two required steps for the fix.  Here is the complete fix:

 

After re-installing VS 2008, and making sure to select 'Full Install', Start Visual Studio (devenv.exe) using a couple of arguments:

devenv /setup    (you can use task manager to monitor its progress. it should peak at 85 MB, then close)

devenv /ResetSkippkg

close Visual Studio and re-opened it.

 

This solution is from a microsoft forum related to this error.  Please let me know if this still does not fix the issue.

 

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 9 of 9
(5,680 Views)