08-03-2012 02:08 PM - edited 08-03-2012 02:11 PM
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.
08-03-2012 02:21 PM - edited 08-03-2012 02:21 PM
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)
08-03-2012 09:41 PM - edited 08-03-2012 09:43 PM
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.