Coder Social home page Coder Social logo

canpp's Introduction

CAN++

Overview

CAN++ is a free Windows program for receiving, transmitting and analyzing (*.asc, .blf) CAN bus messages (CAN Classic and CAN FD) for using with SuperCAN devices or without CAN hardware (virtual bus). After import of CAN data base files (.dbc, *.arxml) CAN signals are shown in symbolic form. Signals can be presented as graphics (wave forms) too.

Furthermore:

  • CAN simulation is possible by programming CAN behaviour in C++.
  • CAN traces can be generated, imported and replayed (*.asc format, *.blf can be imported).
  • Diagnostics can be performed (PDX import, fault memory, measurement and identification data)

There are several devices which are supported by SuperCAN firmware and can be used with CAN++. For example:

CAN++ can be just started (no installation).
The user manual is located in sub folder doc/user_manual (Markdown and HTML version, work in progress).

Main screen Main screen

Traces

CAN traces can be generated, imported and replayed (.asc format). Import and replay is possible with BLF files too (.blf).

CAN transmit

  • cyclic, once, with time offset
  • define signals as raw or physical values
  • or define signals with wave configurator

Main screen Main screen

CAN simulation in C++

  • one .cpp file per CAN node (see Example ECU_main.cpp)
  • react on CAN-Messages (::onMessage()) or signals
  • send CAN messages
  • Timers (can be used for cyclic sending of CAN messages)
  • print text
  • integrated IDE and integrated C++ Compiler (DMC)
  • react on key presses
  • react on commands received from remote client program (See chapter "Remote control")

Main screen

Instead of the CAN++ IDE you can use your own of course. After first compiling of code CAN++ generates C++ classes for all CAN messages and signals (see canl/canl_data.cpp) so another IDE will give context input support too.

Remote control

CAN++ can be remote controlled. To do so start CAN++ with option -server on command line:

can++.exe -server

Currently following actions can be taken:

  • Start CAN bus

  • Stop CAN bus

  • Send a generic command to C++ simulation, which can be used to trigger self-defined actions, examples may be:

    • call a test function
    • set a global variable to switch behaviour
    • send a CAN message provided by command string
    • etc.

Please see client example source code (Python, C# and C++) in folder examples/remote_control.

CAN statistics

Main screen

CAN diagnostics

  • faultmemory
  • measurement data
  • identification
  • import PDX files

Main screen Main screen

Installation

CAN++ can be used without installation. It should not be placed in system folders like "C:\Programs". Path should contain "A-Za-z0-9_" only. Otherwise integrated Compiler will not work. By calling "INSTALL.bat" a shortcut is created on desktop.

Tips

How to flash SuperCAN firmware on Adafruit Feather M4 CAN Express (on Windows)

  • download SuperCAN firmware file supercan-firmware.tar.xz from https://github.com/jgressmann/supercan/releases/tag/latest-master
  • Unpack supercan-firmware.tar.xz (7-Zip could be used), needed file is supercan.uf2
  • plug in device
  • push the button on the device twice
  • a drive "FTHRBOOT" will show up in file explorer
  • drop the file supercan.uf2 on this drive
  • after 10 seconds replug the device

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.