LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument LabWindows/CVI Driver Import Wizard fail to convert Init, Init With Options and Close IVI driver functions

Solved!
Go to solution

I have an IVI driver build with Nimbus tool. The IVI driver is an IVI-COM driver with an IVI-C wrapper on top of IVI-COM. After installation the driver install .fp,.h, .dll files under IVI Foundations Drivers folder. I run the Import Wizard Too and this creates LabVIEW wrappers of IVI-C interface under instr.lib folder of LabVIEW 2012. The Import Wizard Tool version is 2.2 and is part of LabVIEW 2012 => Tools => Instrumentation => Import LabWindows/CVI Instrument Driver.
All IVI driver basic functions are converted OK with few VI exceptions.
The conversion tool spit out a report in html format that shows that IVI basic functions "Init", "Init With Options", "Close" and 2 other functions fail to convert these VIs.
The conversion report gives few possible reasons for this failure .

 

Driver VI Not Executable
The following instrument driver VI(s) are not executable. This might indicate one of the following issues:
(a) There is a problem with the instrument driver DLL, or the function is not exported by the DLL.
(b) All necessary support files or DLLs are not found.
(c) The first parameter of the function is not a Driver Handle.
(d) The LabVIEW Call Library Node is not correctly linked to the appropriate function in the DLL.
(e) The function is not consistent with VXIpnp and IVI specifications. 
Open and review each of these VI(s) for errors.
Some non-executable VIs can be removed from the LabVIEW interface. Consider the relevance of the VI to the LabVIEW user and determine if you can safely remove the VI from the API.

    viMAP200 TFX Initialize With Options.vi
    viMAP200 TFX Initialize.vi
    viMAP200 TFX Close.vi
    viMAP200 TFX Get Next Coercion Record.vi
    viMAP200 TFX Get Next Interchange Warning.vi

 

In my case the error in these VI seems to be the error explained at point d) above

If I open these failed VI I may see that they use a generic function that is not the IVI driver expected function. The generic function that these failed VI connect to has nothing to do with the underlying IVI functions but connect to a generic function called "funcName" with the prototype shown below. 

int32_t funcName(uint32_t instrument handle, int32_t measurement function, double range, double resolution (absolute));

 

Did anyone had this kind of experience with Import LanWindows/CVI Import tool in failing to get conversion of IVI-C funnctions Init, Init With Options and Close functions into valid VIs?

 

 

0 Kudos
Message 1 of 4
(2,422 Views)

Hi Sorinxxxx - 

 

I want to make sure I understand your issue. You are using the Driver Import Wizard to import C-based instrument driver into LabVIEW, but when you use this utility, three basic IVI functions fail (Init, Init With Options, Close). When you dug into VIs created, the call library function node references a funcName rather than specific function it is using. 

 

Were you able to change this to the correct function? Have you been able to successfully convert other IVI Drivers without these functions failing?

Adena L.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,372 Views)
Solution
Accepted by topic author sorinxxxx

We ran into the same issue with one of our drivers.  It seems the problem is having an extra "_" in the driver prefix.  

 

If the driver prefix is "xyz123_abc", so that the init function is "xyz123_abc_init" then there are 5 VIs that are not created correctly.  There are also a couple of other IVI defined functions that are not recognized correctly.

 

If you change the driver prefix to "xyz123abc" so that the init function is "xyz123abc_init" then all VIs are created correctly and all IVI defined functions are recognized.

 

Seems like the import Wizard should be able to handle having extra "_" in the prefix since the wizard is able to extract the right prefix when you specify the FP file.

0 Kudos
Message 3 of 4
(2,215 Views)

Hi, tlopes

 

Good find on the limits of otherwise good Import Wizard IVI Drivers conversion tool. 

Unfortunately all my IVI drivers have been build with underscore character inside their name and that could not be changed anymore.

 

Instead your answer may help other IVI designers to avoid adding the underscore character in the name of their drivers.

 

What is interesting is that this underscore limitation was not apparent in previous versions of Import Wizard Tool used until few years ago inside LabVIEW 8.6 version?

Something must have changed in the tool to choke on that underscore character in the driver name.

 

What is strange is that only these IVI initialization basic functions which are part of any basic IVI driver are affected but other functions defined as customs inside IVI custom driver are properly converted.

 

In my case the solution I have found was to reuse same VI functions converted successfully by other previous drivers then update manually all VI resources and the other to point to my new IVI drivers.

 

Thank you,

 

Sorin

 

0 Kudos
Message 4 of 4
(2,210 Views)