Archived: Calling NI-488.2 Functions Directly in Excel

Publish Date: Dec 06, 2016 | 28 Ratings | 3.14 out of 5 | Print | Submit your review


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

This example calls NI-488.2 functions in Excel through the Visual Basic for Applications (VBA) interface. In most cases you will find that Measure provides the GPIB functionality that you need, but if you need some advanced access to the NI-488.2 driver, you can use this example. This example is a conceptual program and has not been fully tested with every GPIB function, so it may not be 100% reliable. Nevertheless it is a good resource to demonstrate how to access the NI-488.2 driver directly through VBA.

The example is pretty well commented and comes with the code modules for the language interface. To create the language interface you must comment out a couple of lines in the original Visual Basic language interface (these are right near the top of the module) that are not supported in VBA as well as change one of the data types to integer from byte (byte is not supported in VBA). All of the modified lines have been commented.

This example has only been tested with Microsoft Excel v7.0 (the one that ships with Office 95) and NI-488.2M v1.2 for Windows 95. It should be portable to newer versions of Excel and to Windows NT but this has not been tested.

Back to Top

Bookmark & Share






Rate this document

Answered Your Question?
Yes No