Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

example visa and com and VB 6

Hi,

I need to write a driver for an agilent signal generator.
Got everything working when setting up the reference to visa32.dll.

I can not seem to figure out which I need to use when creating the createobject function in VB.
This way I am more flexible for upcomming versions.

any hints?

cheers,

Jeffrey
0 Kudos
Message 1 of 5
(5,088 Views)
There are two VISA APIs, which can be used with VB6 --- VISA-C and VISA-COM.
 
Looks like you are using VISA-C API, interfacing with VISA32.DLL.  In this case you don't have to call CreateObject() function, because VISA32.DLL is not a COM DLL.  You can simply starts from viOpenDefaultRM() and viOpen() functions.
 
If you want to write your codes with VB6's object style, you can use VISA-COM intead of VISA-C. In this case, you must import VISA-COM 3.0 Type Library (GlobMgr.DLL) and your codes must call CreateObject("VISA.GlobalRM").  Everything starts from the Resource Manager object.
 
 
 
 
0 Kudos
Message 2 of 5
(5,060 Views)
Thx for the information.

regards,

Jeffrey
0 Kudos
Message 3 of 5
(5,056 Views)

Sorry to intervene into the middle. I am kind of new in this and your posting is so helpful. I was wondering where can I get references for these 2 libraries, I mean I need all list of functions with explanation of syntax. I searched for those, but looks like I haven't pick the right word for searching those. Any help will be highly appreciated.

0 Kudos
Message 4 of 5
(4,231 Views)

For the reference manual, NI-VISA provides VISA C API online help and pdf doc. Agilent IO Libraries and KI-VISA provide VISA COM API help.

 

Furthermore, VISA spec documents will be helpful for undestanding the library.

 

http://www.ivifoundation.org/specifications/default.aspx

0 Kudos
Message 5 of 5
(4,219 Views)