LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"IVI-Like" Drivers?

I am developing test code which interfaces to several instruments (DC power supplies, DMMs, switches). For my particular instruments, there are no IVI drivers available. However, I would like to interface to the specific instrument drivers in such a way as to eliminate the need for test code modification in the event that I migrate to different, IVI-supported instrument models in the future.

I thought I might go ahead and create a generic layer of code between my test program and the instrument drivers. In this generic layer I would reference the IVI-standard function calls by their IVI-standard names. My test code would call into this generic layer using the IVI-standard function names, and the generic layer would then call the corresponding spec
ific driver functions. Thus, although the generic layer would not be an IVI driver, it would be "IVI-Like".

Then, if in the future I migrated to instrument models with IVI drivers, my test code would be ready to use them with no modifications required.

I'm VERY new to IVI. Is my reasoning sound? Or am I off base?
0 Kudos
Message 1 of 5
(3,677 Views)
Hello,

You are not completely off-base; in theory your idea would work. The problem is that in real world implementation, you might not exactly mimick the IVI-Class driver calls with your own "generic layer". Thus, when you migrate to an IVI-centric application, you will experience strange quirks in your program because you will have completely changed that underlying layer and it may be functionally different from your "generic layer".

If you are going to go about implementing this generic layer, it may not be much more difficult to develop an IVI driver (assuming you already have CVI) with the built in wizard. In the interest of time, you could develop partial IVI drivers that implement only the functions that you are going to use. In this way, you will b
e using the IVI Engine as your starting point and all you will need to do in the future is to complete the IVI drivers so that you can use the full functionality of the instrument through IVI.

Hope this helps, post here if you would like to continue this discussion.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,677 Views)
Scott,

Thank you very much for the information.

I have LabWindows/CVI V7.0.

OK, I have a Sorensen DLM DC power supply. The manufacturer-supplied driver for this power supply is called SNDCSDLM (.h, .c, .fp). I have used the LabWindows/CVI IVI Driver Wizard to create an IVI driver from the file SNDCSDLM.fp. I specified an instrument prefix of "IviDCPwr". This process outputs the files IviDCPwr.h, IviDCPwr.c, and IviDCPwr.fp.

One problem is that when I launch the Attribute Editor at the end of the process, LabWindows/CVI tells me that there is no .sub file.

I assume that I need to create a DLL from IviDCPwr.c. But what do I do then?

1. Do I register this new driver DLL in the IVI Driver portion of MAX?

2. If so, in my test code, how d
o I call the driver with the "ID String" that I specify in MAX, instead of using a physical address string that the driver expects?

3. Or do I just use the DLL directly without going through MAX?

Your help would be GREATLY appreciated.
0 Kudos
Message 3 of 5
(3,677 Views)
Hello ScottieB,

Any information relating to my previous post would be greatly appreciated.
0 Kudos
Message 4 of 5
(3,677 Views)

Hi bigmac,

There are a few things I would like to point out. The driver that you got from Sorensen is most probably VXIplug&play driver instead of IVI so the option to create an IVI driver from the existing driver in CVI using the IVI Driver Wizard would not work. This option can be used only to create a driver from an existing IVI driver and you would use this option, for example, in a case where two instruments share a similar command sets but only one of them has the driver.

Another thing I would like to point out is that IviDCPwr is a prefix of the class driver. What you need to develop is an IVI specific driver for your instrument so the prefix should be similar to 'SNDCSDLM'. National Instrument already provides a class driver for 8 different classes of instruments. Your interchangeable application should be develop using these class driver functions so there is no need for you to develop a generic layer you mentioned in your first posting.

Once you develop an IVI specific driver for the instrument you use, the next step would be to �register it in MAX� which you will be able to do in MAX after we release our next version of the IVI Compliance Package (due in September). This version would include updates to the IVI MAX Provider to allow editing of Instrument Driver Software Components (under the �Advanced� folder) as well as addition of two new tools:

� IVI Installer Creator � Utility that takes you through the steps necessary to create a compliant IVI installer for an IVI-C specific instrument driver. Note: LabWindows/CVI 7.0 or later required.
� IVI Specific Driver Test Suite - Utility which checks the behavior, structure, and function panels of an IVI-C specific instrument driver and verifies the driver complies with the latest IVI Foundation specifications. Note: LabWindows/CVI 7.0 or later required.

Finally, I would like to point out that National Instruments offers the IVI Driver Development course which would help you to learn more about how to develop and use IVI Drivers.

Please refer to the following links to learn more about IVI:

https://www.ni.com/en/support/downloads/instrument-drivers/types-of-instrument-drivers.html#section-...
https://www.ni.com/en/support/downloads/instrument-drivers/tools-resources.html

I hope this helps.

Best regards,

Vesna Jadric
Instrument Drivers/IVI
National Instruments

0 Kudos
Message 5 of 5
(3,677 Views)