Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Not read NI VISA head file when migrate from Excel2007 (Window XP) to Excel2013 (Window7).

$
0
0

I have a MS Excel VBA macro that use NI USB-GPIB-HS port to control oscilloscope. This macro works well in Excel 2007 (which is 32bit) installed in window XP (which is also 32 bit).

For communication purpose, the macro uses three references, (VISA library, MS Comm Control6.0 (sp6), and MSComm32.ocx ), as shown below (original Window XP and Excel 2007 version):

Now we need to update the operation system to window 7 (which is 64 bit) and update MS Excel from Excel 2007 to Excel 2013(which is 64 bit too). When open the original macro file in the new window7 and MS Excel 2013 version, three references are gone, shown as below:

Here is what I have done:

1. Install “ni-visa_19.0_online” (which is NI visa for win7 version) for VISA Library. System visa library has been installed.

2. -- copy mscomm32.ocx (window7 version) to the directory C:\Windows\System32

    -- copy mscomm32.ocx (window7 version) to C:\Windows\SysWOW64

    -- type in “regsvr32 mscomm32.ocx” in the command window to register mscomm32.ocx
       system shows that mscomm32.ocx has been successfully registered.

3. Download “NETComm.ocx” for window 7 and install it.

 

After these three steps, the win7 and excel 2013 does not complain the reference missing, shown in the following image:

However, when I run the macro in win7 using excel 2013, it complains that the parameter “VI_FIND_BUFLEN” is not defined. Please see the following image.

Obviously, this parameter is defined in VISA head file in the directory: C:\Program Files\IVI Foundation\VISA\Win64\Include, this parameter is defined to be 256.

 

Now the problem points to that the visa library is not property included, which causes the right head file for 64 bit operation system is not included.

In order to include the 64 bit VISA header file, what .dll file should be referenced?


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>