Archived:Simple GPIB Communication in Visual Basic .NET with Measurement Studio 6.0 ActiveX Controls

Publish Date: May 15, 2019 | 16 Ratings | 1.75 out of 5 | Print | 1 Customer Review | Submit your review

Overview

This document has been archived and is no longer updated by National Instruments.

With this example, you can use the Measurement Studio GPIB (CWGPIB) control to write to and read from a GPIB instrument. By default, the control configures an instrument at primary address 2 and secondary address 0 on GPIB board number 0. First, you must configure the system for the specified board and instrument address. Then you can write to and read from the specified GPIB instrument.

When using any ActiveX controls in Visual Studio .NET, keep the following differences in mind:

-Visual Studio .NET generates a Runtime Callable Wrapper (RCW) around each control, and you must go through the Interop layer to use the controls. As a result, some class names differ from the names in Visual Basic 6.0.
-Hosting an ActiveX control in Visual Studio .NET requires unmanaged code permissions.
-Hosting an ActiveX control in a Windows Form increases the size of your project files because the entire control is embedded in the form.

For more information about using ActiveX controls in Visual Studio .NET, refer to the Visual Studio .NET help.

Note: NI-488.2 version 2.2 and higher now includes a native .NET API for developing 488.2 applications using C# and VB.NET. This API has been customized to make full use of all the functionality provided by the .NET framework. Examples of using the 488.2 .NET API from C# and VB.NET and function help are included with NI-488.2 installer. The NI-488.2 .NET API does not require Measurement Studio.

Back to Top

Customer Reviews
1 Review | Submit your review

  - Feb 16, 2006

The usage of microsoft VB 2005 together with GPIB seems difficult. I am attempting to use the GPIB communications and when attempted to run the "simple example", found that VB wantted up update the simple example code... seems the simple example needs to be associated with a version of VB to insure simplicity to the user. Otherwise, I have been able to find the new drivers for VB.Net and will proceed without the benefit of the simple example.

Bookmark & Share


Downloads

Attachments:

Simple GPIB Communication in V
B.NET.vbproj

Requirements


Ratings

Rate this document

Answered Your Question?
Yes No

Submit