Import OBDII Shared Library to LabVIEW

A free API for vehicle diagnostics according to OBD-2 (ISO 15765-4)
Post Reply
srobertson
Posts: 2
Joined: Thu 18. Dec 2014, 16:51

Import OBDII Shared Library to LabVIEW

Post by srobertson » Thu 18. Dec 2014, 17:25

I've successfully imported the PCAN Basic, TP, UDP, CCP and XCP API's using the LabVIEW 2013 Import Shared Library tool. Everything went smoothly during the import process. I only had to occasionally include the PCAN Basic.h header to accompany some of the .dll's.

The problem I am having is when importing the OBDII API, LabVIEW reports the following problem...

------------------
The function cannot be imported into LabVIEW. This might be caused by one of the following problems:

The function is not declared in the header file but is exported in the library.

Check the header file to make sure it contains declarations of the function.

Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add preprocessor definitions. Click the Back button to return to the previous page of the wizard to add a preprocessor definitionsl (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").
__cplusplus;
--------------------


All of the functions which have "Async" on the name and also OBDII_GetUnitScaling() and OBDII_ReadResponse().
I have searched the header files but can't find the necessary declarations.
Do you have any suggestions how to resolve this problem?
Many thanks,
Scott

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Import OBDII Shared Library to LabVIEW

Post by PEAK-Support » Thu 18. Dec 2014, 17:53

We are sorry, but we do not have the knowledge how the LabVIEW 2013 Import Shared Library tool works in detail. Please contact the LabVIEW technical support. The DLLs are tested and work fine with C/C++/Pascal/VB.NET/C# etc. so it must be a restriction of LabVIEW 2013 Import Shared Library tool.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: Import OBDII Shared Library to LabVIEW

Post by K.Wagner » Fri 19. Dec 2014, 08:30

Hello,

just a tip: be sure that you have all libraries. Remember that OBDII needs the other 3 dlls, ISO-TP (PCAN-ISO-TP.dll), UDS (PCAN-UDS.dll), and PCAN-Basic (PCANBasic.dll). All these files are to be placed together in the system folder of Windows or in the application output folder:
APIs-Hierarchy
APIs-Hierarchy
Apis.jpg (45.33 KiB) Viewed 11434 times
Best regards,
Keneth

srobertson
Posts: 2
Joined: Thu 18. Dec 2014, 16:51

Re: Import OBDII Shared Library to LabVIEW

Post by srobertson » Fri 19. Dec 2014, 17:30

Thanks for the tips. I've contacted National Instruments and they are working with me on this problem.
I overcame the first problem by inserting declarations in the obd2 header file for the functions which had a problem.
I basically copied the existing declarations and added "Async" to the function name where needed and this satisfied Labview to allow me to continue.

Now I just have to work out why the Labview shared library tool will is producing "Void" data types for all the functions in the ISO-TP, UDS and OBD 2 VIs. (The PCAN-Basic API was fine).

I'll come back and post the solution if and when we find it so that other Labview user on the forum can benefit.

Post Reply