Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

CANdapterFlow.jpg

Reading CAN bus data into ctrlX CORE

Sgilk
Frequent Contributor
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.

PCAN USB Device DetectionPCAN USB Device Detection

Related Links
Sgilk
Sgilk
Hello, my name is Sam and I am a Software Applications Engineer supporting ctrlX Automation. Feel free to reach out if you have any questions!
Must Read
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist