- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Introduction
This article provides two options for reading CAN bus messages into the ctrlX CORE X3 using CAN to USB adapters. The CAN to serial solution is recommended for current applications. A video tutorial for the CANdapter solution is provided under Useful Links.
Option 1: CAN to Serial
This adapter, named the CANdapter, from Ewert Energy Systems converts CAN messages to serial over USB. This was the most plug and play option of the two adapters. The data is immediately available on the serial port after issuing initialization commands and opening the serial port. The data stream is in hexadecimal format and must be decoded with the CAN bus message definition.
Example Node-RED code is provided below to read and decode data from an Orion Jr 2 BMS system. In this example, an Influx database is used to store the data. The required node comes from the node-red-contrib-influxdb pallet. The decoded CAN data is not available on the ctrlX Data Layer by default. Data can be provided to the ctrlX Data Layer using a custom application and the SDK for ctrlX OS, the PLC application, or the Key Value Database application.
Option 2: PCAN-USB
This adapter comes from PEAK System and is named the PCAN-USB. The adapter can utilize the Linux socket can interface, which is included in the ctrlX OS distribution. There is a Python library to work with this interface called python-can. At the moment, using this adapter will require a custom application as some configuration of the network interfaces is required that cannot be done from the Web UI of the ctrlX CORE. Please reach out directly if you'd like more information on this option.
Related Links
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.