From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert a legacy C Driver to a C++ interface driver?

Hello,

I am writing my MFC program with Measurement Studio 6.0. I was able to find the C++ drivers needed for my development except for one, the hp81110a Pulse Generator. On the Instrument Driver Network, there was only a Labwindow legacy C driver. When I included this driver into my project. All the functions showed up as Global because it is a C driver.

I was wondering if someone knows how to put a C++ interface on C driver. Or if anyone has converted the hp81110a C driver to C++ driver?? Or if anyone is able to convert the C driver to the IVI driver??

Any advice is much appreciated.

Thank you,

Hy
0 Kudos
Message 1 of 3
(2,714 Views)
Hello

Im not sure if these is a tool that would automatically put a C++ interface on the driver for you. The only thing I can think of is to either do it manually (ugghh) or see if you can get an updated driver from the manufacturer.


Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(2,714 Views)
Hello Bilal,

Ugghh!! is right.. 🙂 I was trying to avoid that. Does National Instrument create the VC++ driver (wrapper) or the manufacturer? I checked the Agilent site and they only have C driver too.

I found 68 IVI Specific driver that includes C++ classes for use with Measurement Studio 6.0 Tools for Visual C++.

Unfortunately, the hp81110a was not one of them. Now, when I include the hp81110a C driver in my MFC app, all the functions are global.

A quick work around would be to turn the Legacy C driver into IVI driver using the IVI Instrument Driver Wizard. However, when I tried to "create driver based on a existing driver', it did not generate a .sub file, so I can not run the Attribute Editor to complete the IVI driver.

If this is poss
ible, then I can access the driver through IVI Class Drivers. At least, this way, the Legacy driver is wrapped up as an IVI Class Drivers.

So, can you check why the IVI Instrument Driver Wizard does not generate a .sub file when "create from existing driver" ??

Thank you,
Hy
0 Kudos
Message 3 of 3
(2,714 Views)