Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 2.64 KB

File metadata and controls

56 lines (43 loc) · 2.64 KB

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.


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

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

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

Windows

Palette

palette.png

Sample Usage

Read Write

read

Read Event Driven

read