LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build Error:I am trying build the shared DLL for driver application by VISA tool

I am encountering the build error as "2147221458 occured at building DLL stub.An error occured creating the Type Library for your DLL.Pls send the bld file and your exported VI to NI technical support.The error code is undefined. " Pls advise how to solve this problem
0 Kudos
Message 1 of 5
(3,024 Views)
What version of LabVIEW are you using and at what point does the error occur? Could you explain the steps leading up to your encounter with this error?

Regards,
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,018 Views)
Sulzer,

Thank you for your prompt response.I am sending herewith the Build setup file for your reference.

I am using Labview Express 7.0 version to build the shared DLL.Pls find below is the brief info about building DLL.

1)I have used NI VISA driver build Wizard to build the Driver for my own designed PCI I/O Card.This driver works well and able to communicate with card by using VISA open/VISA IN/ VISA OUT VIs.

2)I would like to call this driver by using other text based languages like Visual Basic or Visual C++ as Shared DLL.

3)Hence, I have built the Driver VI (PCIDLL.VI) by using the following parameters.
PCIDLL(Command, Address,Data,Value)

i.e. Command ====> CWRITE,CREAD, WRITE, READ and CLOSE
Address ====> 8 bit Hex Address Read/Write Value
Data ====> 16 Bit Hex Data - Write value
Value ====> 16 Bit Hex -output (Read Value)

As soon as the DLL is being called ,driver should open the VISA resources and do the write or read or close operation based on user command.

4)When I was trying to build the Shared DLL by using PCIDLL.VI (as exported VI) and parameters (as per the BLD file ), I was encountered with build error as I mentioned earlier.

I hope the above functionality could be built as shared DLL and could be called by other Text based languages.

Regards
Aru
0 Kudos
Message 3 of 5
(3,005 Views)
Aru,

I believe I have discovered exactly what the problem is. It seems that you are experiencing a bug in LabVIEW 7.0 that involves using unsigned integers as outputs of VIs being built into a DLL. The bug has been fixed in LabVIEW 7.1, so if you have access to a copy of that version, I would recommend building your DLL there. If not, you will have to use a signed representation (I-32 or long, for example) as your output instead of an unsigned one.

Best Wishes,
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(2,994 Views)
Sulzer,

Yes you are right.Upon changing the parameter representation from unsigned (U16) to Signed (I32), I didn't encounter the build error.The Shared DLL Build was successful and found working well with DLL calling function.

Thank you very much for your support.

Regards
Aru
0 Kudos
Message 5 of 5
(2,984 Views)