LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Use DAQNAVI with CVI2012

Solved!
Go to solution

Hello,

 

We have an application under Labwindows 8.0 with ADSAPI drivers for Advantech PCM3718 board. It is perfect with Windows XPe.

 

Now, we must use Windows Embedded Service 7: drivers for PCM3718 are no longer the same but have moved to DAQNAvi architecture.

In the same time, to be in the movment, we migrate our dev suite to LabWindows CVI 2012 and our target is 64 bits (instead of 32bits).

As a resulte, the application no longer compile: libaspi32 is no longer valid.

 

We have not found the way to integrate this new DAQNAVI in the project: how can we create .lib?

I also ask the question on board supplier (Advantech) forums but question is, for men in the middle.

 

Regards

 

PS: all examples delivered with the driver are in C#, C++ or BV, none directly ready for CVI 😞

0 Kudos
Message 1 of 14
(5,948 Views)

Supplier of board indicates that he will not deliver examples for its new driver in C language and doesn't support such request :-(.

Should I have more luck here for integration of a third party driver in Labwindows CVI?

 

 

0 Kudos
Message 2 of 14
(5,915 Views)

Hello R1M,

 

Since CVI only supports C ANSI, if you'd like to use the new driver with CVI, you could build DLLs for example from the C++ code.

 

This document and its related links should help you : Does LabWindows/CVI Support C++?

 

You can also read this : lib file

 

Regards,

Jérémy C.
NI France

0 Kudos
Message 3 of 14
(5,886 Views)

Do you mean we have to implement an interface DLL to match our functions in CVI/C files to functions in DLL?

I'll read the documents, trying to identify the way to import such DLL in the code, not using a CVI DLL in C++.

0 Kudos
Message 4 of 14
(5,883 Views)

Extract of page

====

5. How Can I Call Third-Party DLLs from LabWindows/CVI?


LabWindows/CVI executables and DLLs can load 32-bit DLLs. To call a DLL from LabWindows/CVI, you must have the DLL header .h file and the import library .lib file. If you do not have the DLL import library, you can create one using the tools LabWindows/CVI provides. For more information, refer to the What Is the Difference between Static Linking to a DLL and Dynamic DLL Linking? section of this FAQ.

Because LabWindows/CVI is an ANSI C compiler, it can call only functions that have been exported as C-style functions. For more information, refer to the How Can I Use DLLs Created in Visual C++ with LabWindows/CVI? section of this FAQ.

====

Is it out of date or still valid? I"m very desapointed if I can't use a 64 bits library in CVI!

 

In addition, my question was: how can I create the .lib file that looks important for this integration.

Where is the link to "How Can I Use DLLs Created in Visual C++ with LabWindows/CVI?" The only topics I found are for CVI4.0 !!!!

0 Kudos
Message 5 of 14
(5,875 Views)

Hello,

 

The idea I proposed was to create DLLs from the C++ functions with a IDE such as Visual Studio.

 

You can use 64 bits libraries in CVI. You can find the information in the help of the software. For example, if you type "64 bit DLL" as Keyword, you should find a section named "Loading DLLs".

 

In order to create static libraries in CVI, you can take a look to those sections of the Help :

 

Build»Create Static Library

 

Creating Static Libraries in LabWindows/CVI

 

But if you plan to build static librairies in C++ from an other IDE, just google it : Create lib file

 

You can find the section for "How Can I Use DLLs Created in Visual C++ with LabWindows/CVI?" here.

 

Regards,

Jérémy C.
NI France

0 Kudos
Message 6 of 14
(5,854 Views)
Thank you for extra information. I think I have to go deeper on this way, despite my question is not really related to "Create a DDL" but "use a DLL written for C++". I've seen the tool Dependency Walker that may help in understanding what delivered DLL is made of and from, to adapt our project. I'll see that later on in August.
0 Kudos
Message 7 of 14
(5,847 Views)
Solution
Accepted by topic author R1M

This has been solved with support of France ni team.

We moved all the operating vi to a DLL and call those functions. Of course it is probably time consuming versus a direct call to a function in the driver but it works and we will look later on how to optimze this.

 

Regards

0 Kudos
Message 8 of 14
(5,623 Views)

Good day, can you share the code how you manage to use the DAQNavi in CVI? Thanks!

0 Kudos
Message 9 of 14
(4,613 Views)

In fact, we transformed the set of VIs in a DLL. We kept only the fonctions for PCM3718 board.

Attached the .DLL and .lib in 32 bits we use.

I also add the NI doc to generate such a DLL (usefull for another board and/or for 64-bit version). Unfortunatelly, it is in French 😞

 

Hope it can help

0 Kudos
Message 10 of 14
(4,596 Views)