Tag Archives: DLL

A Strange Problem When Calling External DLL with LabVIEW

Currently I am using a third-part MIL-STD-1553 card in one of my projects. The vendor of this card provides only a DLL file as the driver for it which is build with Visual C++. To control this card in LabVIEW, I have to use the Import Shared Library wizard in LabVIEW to build all the VIs that corresponding to every functions in this DLL. After that, I used these VIs in my program to control this 1553 card. Everything is fine with the card initialization and reset function, but when it comes to send data function, a strange problem happens.

The problem is as follows, when I use the send data function as in the manual provided by the vendor, set special values to parameter A and parameter B, and run this function after that, there is no responses. But with the demo program provided by the vendor which is in Visual C++, call this function as in the manual, everything is fine. At last, I try to set the special values to the parameters that follow A and B, for example, if A is the first parameter, then assign the value that should be assigned to A to the second parameter. After this operation, everything is fine now. I don’t know what is the reason to this strange problem. It seems that the parameters of this VI which is converted by LabVIEW are not correctly corresponding to the function parameters in the DLL.

I don’t know what caused this problem to happen, maybe someday I can find it out.

Problem with DLL import in LabVIEW

Today, I used the Import Shared Library wizard in LabVIEW to import one dll, followed the step by step wizard of LabVIEW, everything seemed fine till the last step. The progress bar in the Import Shared Library wizard appeared to hang.

After search in the LabVIEW official site, I got such answer:

When you use the Import Shared Library wizard, LabVIEW displays a progress bar. This progress bar might appear to hang, even though the tool is working correctly.

Workaround: Wait until the generation finishes.

Reported Version: 8.5 Resolved Version: N/A Added: 09/01/2007

And this error still not fixed in 8.5.x. It looks like I’d better upgrade from 8.5.1 to 8.6 to work around this problem.