Page 1 of 1
function to initialize the PCAN PRO USB
Posted: Fri 25. Mar 2022, 15:41
by clem69
Hello,
I use a PCAN PRO USB and I develop with CVI.
I wanted to know which function to use to be able to initialize my PCAN USB PRO and thus be able to communicate in LIN with my slave.
Thank you
Re: function to initialize the PCAN PRO USB
Posted: Mon 28. Mar 2022, 09:04
by PEAK-Support
Using a standard Windows 32 or 64 bit DLL with CVI is part of the CVI support - not ours, so please contact NI.
We offer many simple samples for using the PCAN-USB CAN and LIN part from C/C++/C#/VB.Net etc.
Please use this well documented samples and also the online Help to start.
Explaining here in a Forum the Basics of CAN or LIN API, which are part of the
manual and the online help, make no sence.
Thats why setup all this ressources. Read the
PDF which is part of the API first. If you then have any more questions, please contact us by E-Mail.
Re: function to initialize the PCAN PRO USB
Posted: Tue 29. Mar 2022, 11:41
by clem69
I read your documentation. but I still don't understand how to tell my program that I want to configure a PCAN PRO USA with the following definitions.
// Hardware Types
//
#define LIN_HW_TYPE_USB 1 // LIN USB type // DEPRECATED
#define LIN_HW_TYPE_USB_PRO 1 // PCAN-USB Pro LIN type
#define LIN_HW_TYPE_USB_PRO_FD 2 // PCAN-USB Pro FD LIN type
#define LIN_HW_TYPE_PLIN_USB 3 // PLIN-USB type
do I have to enter the parameter of LINGETaivablehardware to then use LINinitializehardware?
I also did not find in your examples the use of the GETaivablehardware and initializehardware functions.
Thank you
Re: function to initialize the PCAN PRO USB
Posted: Tue 29. Mar 2022, 12:09
by PEAK-Support
What is PCAN PRO USA ?!?
In the API Package is a very simple step by step sample for Python - check the code it is a very simple console application.
The functions are identical - no matter which language you use...
PLIN-API\Samples\Python\PLIN_API_Console.py
There is also a Online Help in the package where all functions are also explained very well..

- PLIN-API Online Help
- LIN_API_Online_Help.JPG (144.49 KiB) Viewed 3275 times
also please Read the PLIN-Client and API Basics to understand the needed steps before you could initialize a Hardware (create a Client etc.)
In the simple Python sample it is very good explained how to start.