Archive

Posts Tagged ‘Parameter’

A Strange Problem When Calling External DLL with LabVIEW

February 2nd, 2009

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.

LabVIEW , ,