PCAN-Basic is a programming application interface (API) for CAN communication using the PCAN system of the company PEAK-System Technik GmbH. It consists of a collection of Windows Device Drivers which allow the real-time connection of Windows applications to all CAN buses physically connected to a PC. PCAN-Basic supports connecting several CAN channels simultaneously, from the same or different types of devices. The following list shows the PCAN Channels that can be connected per PCAN Device:
PCAN-ISA | PCAN-Dongle | PCAN-PCI | PCAN-USB | PCAN-PC Card | PCAN-LAN | |
|---|---|---|---|---|---|---|
Number of Channels | 8 | 1 | 16 | 16 | 2 | 16 |
Using the API:
The PCAN-Basic offers the possibility to use several PCAN-Channels within the same application easily. The communication process is divided in 3 phases: initialization/start, interaction/operation and finalization of a PCAN-Channel.
Initialization: To start doing CAN communication using a Channel, it is necessary to first initialize it. This is done making a call to the Initialize method, or to Initialize method in case FD communication is desired.
Interaction: After a successful initialization, a PCAN Channel is ready to communicate with the connected CAN bus. Further configuration is not needed. The Read and Write methods can be then used to read and write CAN messages. If desired, extra configuration can be made to improve a communication session, like changing the message filter to target specific messages.
Finalization: When the communication is finished, the Uninitialize should be called to release the PCAN Channel and the resources allocated for it. In this way the channel is marked as "free" and can be used from other applications.
Hardware and Drivers:
Hardware | Is Plug-and-Play | Device Driver |
|---|---|---|
PCAN-Dongle | Pcan_dng.sys | |
PCAN-ISA | Pcan_isa.sys | |
PCAN-PC/104 | Pcan_isa.sys | |
PCAN-PCI | YES | Pcan_pci.sys |
PCAN-PCI Express | YES | Pcan_pci.sys |
PCAN-PCI Express FD | YES | Pcan_pci.sys |
PCAN-cPCI | YES | Pcan_pci.sys |
PCAN-miniPCI | YES | Pcan_pci.sys |
PCAN-miniPCIe | YES | Pcan_pci.sys |
PCAN-miniPCIe FD | YES | Pcan_pci.sys |
PCAN-M.2 | YES | Pcan_pci.sys |
PCAN-Chip PCIe FD | YES | Pcan_pci.sys |
PCAN-PC/104-Plus | YES | Pcan_pci.sys |
PCAN-PC/104-Plus Quad | YES | Pcan_pci.sys |
PCAN-PC/104-Express | YES | Pcan_pci.sys |
PCAN-PC/104-Express FD | YES | Pcan_pci.sys |
PCAN-ExpressCard | YES | Pcan_pci.sys |
PCAN-ExpressCard 34 | YES | Pcan_pci.sys |
PCAN-Chip PCIe FD | YES | Pcan_pci.sys |
PCAN-USB | YES | Pcan_usb.sys |
PCAN-USB FD | YES | Pcan_usb.sys |
PCAN-USB Pro | YES | Pcan_usb.sys |
PCAN-USB Pro FD | YES | Pcan_usb.sys |
PCAN-USB Hub | YES | Pcan_usb.sys |
PCAN-USB X6 | YES | Pcan_usb.sys |
PCAN-Chip USB | YES | Pcan_usb.sys |
PCAN-PC Card | YES | Pcan_pcc.sys |
PCAN-Ethernet Gateway DR | YES | Pcan_lan.sys |
PCAN-Ethernet Gateway FD DR | YES | Pcan_lan.sys |
PCAN-Wireless Gateway DR | YES | Pcan_lan.sys |
PCAN-Wireless Gateway | YES | Pcan_lan.sys |
PCAN-Wireless Automotive Gateway | YES | Pcan_lan.sys |
The Peak.Can.BasicApi class only supports plug-and-play devices. If it is desired to work with non plug-and-play devices, the class Peak.Can.Basic.BackwardCompatibilityPCANBasic is to be used.