Skip to content

pettaa123/PCAN-Basic-LabVIEW

Repository files navigation

PCAN Basic LabVIEW

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).

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

  • LabVIEW 2019 64 bit
  • (Optional) LUnit Test Framework (LabVIEW 2020)GitHub Repository

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

read

Write

read

Read Event Driven

read

About

PCAN Basic API LabVIEW Wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published