![]() |
VOOZH | about |
dotnet add package Peak.PCANBasic.NET --version 5.0.1.1131
NuGet\Install-Package Peak.PCANBasic.NET -Version 5.0.1.1131
<PackageReference Include="Peak.PCANBasic.NET" Version="5.0.1.1131" />
<PackageVersion Include="Peak.PCANBasic.NET" Version="5.0.1.1131" />Directory.Packages.props
<PackageReference Include="Peak.PCANBasic.NET" />Project file
paket add Peak.PCANBasic.NET --version 5.0.1.1131
#r "nuget: Peak.PCANBasic.NET, 5.0.1.1131"
#:package Peak.PCANBasic.NET@5.0.1.1131
#addin nuget:?package=Peak.PCANBasic.NET&version=5.0.1.1131Install as a Cake Addin
#tool nuget:?package=Peak.PCANBasic.NET&version=5.0.1.1131Install as a Cake Tool
PCAN-Basic.NET is an interface for accessing and using the native PCAN-Basic API in .NET applications. The assembly is written using .NET Standard 2.0 which makes it suitable for developing under Windows and Linux.
The underlying native library (PCANBasic.dll on Windows and libpcanbasic.so on Linux), is used to do CAN communication through plug-and-play devices from PEAK-System Technik GmbH like PCAN-USB FD, and PCAN-PCI Express, among others.
Note: the native library files are not part of the PCAN-Basic.NET package. See next block for installation instructions.
For full online API documentation see docs.peak-system.com/API/PCAN-Basic.Net. Alternatively, the documentation is available as a CHM file. It can be found within the "NuGet" folder of the PCAN-Basic package, and can also be downloaded directly using this link.
For using PCAN-Basic.NET you need:
PCAN-Gateway devices: If you want to communicate to PCAN-Gateways devices using PCAN-Basic, then you need to additionally install the feature "Virtual PCAN-Gateway" within the PEAK-Drivers Setup. Note that this is only supported on Windows systems.
For using PCAN-Basic.NET you need:
Reference the following namespace from the file where you want to use PCAN-Basic functionality:
C#:
using Peak.Can.Basic;
VB:
Imports Peak.Can.Basic
C++/CLI:
using namespace Peak::Can::Basic;
The namespace contains type enumerations, structures and classes for PCAN-Basic API accessing. Use the class Api to access API methods and constants:
C#:
PcanStatus result;
result = Api.Initialize(PcanChannel.Usb01, Bitrate.Pcan500);
VB:
Dim result As PcanStatus
result = Api.Initialize(PcanChannel.Usb01, Bitrate.Pcan500)
C++/CLI:
using namespace Peak::Can::Basic;
result = Api::Initialize(channelUsed, Bitrate::Pcan500);
Use the class Worker for event driven reading and writing
C#:
Worker myWorker = new Worker();
PcanMessage message = new PcanMessage(0x100, MessageType.Standard, 3, new byte[] { 1, 2, 3 }, false);
Broadcast broadcast = new Broadcast(message, 100);
myWorker.MessageAvailable += OnMessageAvailable;
if (myWorker.AddBroadcast(ref broadcast))
Console.WriteLine($"Broadcast {broadcast.Index}' configured successfully.");
myWorker.Start();
Console.WriteLine("The Worker was activated successfully.");
VB:
Dim myWorker As Worker = New Worker()
Dim message As PcanMessage = New PcanMessage(&H100, MessageType.Standard, 3, New Byte() {1, 2, 3}, False)
Dim broadcast As Broadcast = New Broadcast(message, 100)
AddHandler myWorker.MessageAvailable, AddressOf OnMessageAvailable
If myWorker.AddBroadcast(broadcast) Then
Console.WriteLine($"Broadcast '{broadcast.Index}' configured successfully.")
End If
myWorker.Start()
Console.WriteLine("The Worker object was activated successfully.")
C++/CLI:
Worker^ myWorker = gcnew Worker();
PcanMessage^ message = gcnew PcanMessage(0x100, MessageType::Standard, 3, gcnew array<Byte> { 1, 2, 3 }, false);
Broadcast^ broadcast = gcnew Broadcast(message, 100);
myWorker->MessageAvailable += gcnew System::EventHandler(&OnMessageAvailable);
if (myWorker->AddBroadcast(broadcast))
Console::WriteLine("Broadcast '{0}' configured successfully.", broadcast->Index);
myWorker->Start(false, false, false);
Console::WriteLine("The Worker object was activated successfully.");
If you need further information or help, you can contact us using the following channels:
PEAK-System team
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Peak.PCANBasic.NET:
| Package | Downloads |
|---|---|
|
Meadow.Foundation.ICs.CAN.PCanBasic
PCAN-Basic USB CAN Controller for Windows |
|
|
CanKit.Adapter.PCAN
Peak PCAN (PCAN-Basic) adapter for CanKit, providing unified bus access to PCAN hardware on Windows. |
|
|
CanLink.Net
Can分析仪通讯库,整合广成/图莫斯/Peak的Can通讯工具收发消息的Can通讯库 |
|
|
CanLink.x86
Can分析仪通讯库,支持 “广成科技/天成创芯科技/图莫斯/Peak” 的Can通讯工具收发消息的Can通讯库(x86版本) |
|
|
Hsu.Can.Peak
Package Description |
Showing the top 1 popular GitHub repositories that depend on Peak.PCANBasic.NET:
| Repository | Stars |
|---|---|
|
WildernessLabs/Meadow.Foundation
Unified driver and library framework for Meadow applications.
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 5.0.1.1131 | 4,875 | 3/31/2026 | |
| 5.0.0.1115-beta | 1,397 | 12/9/2025 | 5.0.0.1115-beta is deprecated because it is no longer maintained. |
| 4.10.1.968 | 58,637 | 3/14/2025 | 4.10.1.968 is deprecated because it is no longer maintained. |
| 4.10.0.964 | 7,884 | 12/18/2024 | 4.10.0.964 is deprecated because it is no longer maintained. |
| 4.9.0.942 | 20,724 | 4/24/2024 | 4.9.0.942 is deprecated because it is no longer maintained. |
| 4.8.2.897 | 9,649 | 1/22/2024 | 4.8.2.897 is deprecated because it is no longer maintained. |
| 4.8.1.872 | 498 | 12/15/2023 | 4.8.1.872 is deprecated because it has critical bugs. |
| 4.8.0.830 | 2,552 | 10/5/2023 | 4.8.0.830 is deprecated because it is no longer maintained. |
| 4.7.1.818 | 11,615 | 7/12/2023 | 4.7.1.818 is deprecated because it is no longer maintained. |
| 4.7.0.793 | 5,482 | 3/7/2023 | 4.7.0.793 is deprecated because it is no longer maintained. |
| 4.6.2.753 | 4,349 | 10/25/2022 | 4.6.2.753 is deprecated because it is no longer maintained. |
See https://www.peak-system.com/PCAN-Basic.126.0.html for more information.