Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need to rewrite gpib-32.vb&niglobals.vb when switching to NI4882.dll ?

I'm trying to include the new NationalInstruments.NI4882.dll in my project to handle the gpib communication, in Visual Studio 2010 on my Windows 7 machine,

becuz the old gpib-32.dll don't run in 64-bit environments.

 

I've seen the examples("SimpleReadWrite"&"SimpleAsynchronousReadWrite"&"Notify") for DOTNET 4, and I found a short exampe that does the Findlistener function, which the example codes didn't 

cover. but I just want to confirm that this is the right path: I'm including the NI4882.dll as a reference, and I rewrite the parts in my code where i call those functions in Niglobal.vb and Vbib-32.vb, and replace 

them with the corresponding new ones I found on the "Mapping the NI-488.2 .NET API to the NI-488.2 C API"  page I found in ".NET Framework 4.0 Help" . 
I've just tried to replace Findlistener and it does find the PrimaryAddress of the scope thru gpib.

 

Can anyone tell me whether this is the right direction when switching to using NI4882.dll ? (as appose to using the old gpib-32.dll in older vb environment, which comprises Niglobal.vb and Vbib-32.vb )

 

Thank you.

0 Kudos
Message 1 of 3
(3,779 Views)

Sorry, my mistake , I meant to ask  Vbib-32.vb&Niglobal.vb in the subject line , not gpib-32.vb&niglobals.vb.

 

And by rewrite I mean, rewrite all the sub(routine)s that already exist in Vbib-32.vb&Niglobal.vb that are called in my project, and exclude/remove these two files from the 

project(now that I'm using components from the NI4882.dll)

0 Kudos
Message 2 of 3
(3,772 Views)

You are making it more difficult than it needs to be.

 

If you want to use NI-488.2 instead of NI-VISA with Visual Studio 2010, look at the examples located in C:\Users\Public\Public Documents\National Instruments\NI-488.2\Examples\DotNET4.0

 

Inside that folder is folder called SimpleReadWrite with projects for VB and C#

 

I have Visual Basic Express 2010, and I got an error when opening the project, so I had to add a reference to NationalInstruments.Common in the project manually.

 

You will see that you don't need to re-write anything.

0 Kudos
Message 3 of 3
(3,758 Views)