Skip to content

Repository files navigation

PCAN Basic LabVIEW

Image Image

A lightweight wrapper for PCAN Basic API. This wrapper has been tested against version PCAN Basic API V4.10.1.968 with Peak Driver 8.20.0 (Linux), 4.6.4 (Windows x86/x64) and is meant to be used with PEAK-Systems USB CAN dongles.

This project includes code for event driven read on linux rt from the LinuxRT-IPC project, licensed under Apache License 2.0.

source/peak/PCANBasic64.dll and source/peak/PCANBasic32.dll PCAN-Basic V4.10.1.968 Copyright (c) 2025 PEAK-System Technik GmbH Darmstadt, Germany All rights reserved.

PEAK-System Technik GmbH grants the right to the customer to use the files in this software package as long as this is done in connection with original hardware by PEAK-System or OEM hardware coming from PEAK-System. It is NOT allowed to use any of these files (even not parts) with third-party hardware.

Please read the End User License Agreement of the company PEAK-System Technik GmbH at: www.peak-system.com/quick/eula


VIPM

The vipm folder contains a VIPM package with the VIs necessary to interface the driver from LabVIEW.
It creates a PCAN Basic palette under Instrument I/O.


Prerequisites

Windows

NI-RT Linux

  • Download PCAN Basic for Linux
  • Copy peak-linux-driver-8.20.0.tar.gz to /home/lvuser/ on real-time target using a FTP client or Webdav
  • Enter following commands in terminal to build and install pcan linux driver on NI-RT Linux:
  cd /home/lvuser
  tar -xzf peak-linux-driver-8.20.0.tar.gz
  cd peak-linux-driver-8.20.0
  make clean
  make
  sudo make install
  sudo mkdir -p /lib/modules/$(uname -r)/misc
  sudo cp $(find /lib/modules/ -name "pcan.ko" | head -n 1) /lib/modules/$(uname -r)/misc/
  sudo find /lib/modules/ -name "pcan.ko" ! -path "/lib/modules/$(uname -r)/*" -exec rm {} \;
  sudo depmod -a
  sudo modprobe pcan
  cd libpcanbasic
  make clean
  make
  sudo make install

Note: Errors will appear during build. They arise from missing g++ on NI-RT Linux. You can ignore these.

Palette

palette.png

Sample Usage

Read Write

read

Read Event Driven

read

About

PCAN Basic API LabVIEW Wrapper

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages