Case Studies

Automotive Communication Toolkit for NI cRIO Embedded Controller

Posted in Automotive, Consumer Goods, Embedded Development & Programming, Energy and Utilities, Green Technology, LabVIEW, Product Development, Test & Measurement Automation

Summary

DMC delivered a LabVIEW software toolkit to a client that specializes in electrified commercial vehicle components. The toolkit was used to add the SAE J1939 CAN bus protocol to a new prototype using the NI single board RIO (scRIO) platform. 

J1939 CAN Bus Toolkit Operating Diagram

J1939 CAN Bus Toolkit Operating Diagram

SAE J1939 CAN Bus Frame

SAE J1939 CAN Bus Frame

SAE J1939 CAN Bus Toolkit for sbRIO

SAE J1939 CAN Bus Toolkit for sbRIO

Example Use of the J1939 Toolkit

Example Use of the J1939 Toolkit

Example Application Front Panel

Example Application Front Panel

Validation Test Bench Setup

Validation Test Bench Setup

Solution

DMC supported the client’s choice to use the FPGA and on-board CAN port included on the NI single board RIO (sbRIO) controller, along with an accessory electronics card interface to control the client’s power electronics subsystems. However, this choice had limited CAN bus support and lacked an available SAE J1939 protocol stack. The client needed the integration within the higher-level sbRIO application for their product.

DMC delivered a fully open solution which included all source code and hardware schematics. This solution enabled the client’s in-house process and test engineers to maintain, refine, and expand the system over time, supporting any future test requirements.

This solution utilizes NI CompactRIO (cRIO) Single-board controller. This is an embedded system for rapid commercial development and deployment. It is designed for high-volume and OEM embedded control and analysis applications that require high performance and reliability. Featuring an open embedded architecture and compact size, this flexible, customizable, commercial off-the-shelf (COTS) hardware device is part of an accelerated custom design platform that can help you get your custom embedded control system to market quickly. With the CompactRIO platform, you can take advantage of FPGA performance, real-time determinism, and reliability with relatively low nonrecurring engineering compared with custom hardware design.

The complete solution provides out-of-the-box support for peripherals such as USB or Ethernet, the communication interface between the processor and FPGA, and drivers to onboard and modular I/O. The complete integrated software solution reduced the time and risk of a new project and allows engineers to focus on application development.

This solution utilizes CAN Bus Usage on the NI sbRIO. National Instruments (NI) provides a simple toolkit called “NI-Embedded CAN for RIO” for performing CAN operations on sbRIO targets. The toolkit provides access to send and receive CAN bus information at the frame level. The toolkit does not provide automatic processing of CAN frames into engineering data, or support of higher-level protocols such as SAE J1939.

DMC developed a limited feature toolkit to implement the SAE J1939 toolkit on the NI sbRIO platform. The toolkit consists of an example main loop VI with independent write and read loops. The user can initialize both loops with the J1939 PGN and SPNs they are interested in reading and writing, and then they can use the simple functional global VIs to update or read the SPNs they need in the main body of their custom code. Furthermore, DMC validated the sbRIO code for the client on a test bench using standard and well-accepted Vector CAN tools as the benchmark.

Our experience with LabVIEW programming and being a National Instruments Alliance member since 1997 qualified us to provide an updated solution for our client by developing a LabVIEW software toolkit.

The client finished their initial prototype development and evaluation process on time and on-budget, thanks to the DMC J1939 sbRIO toolkit. They were able to provide several prototypes to their customers for preliminary evaluation of their hardware, and, thanks to the flexibility of the DMC toolkit, they were also able to modify their J1939 usage as needed to meet each individual customer’s specific J1939 requirements.

Learn more about DMC's Test and Measurement Automation expertise and contact us for your next project. 

Customer Benefits

  • Eliminated the need to design a custom electronic control module (ECM)
  • Client was able to provide several prototypes to their customers for preliminary evaluation of their hardware
  • Flexibility to meet individual customer’s specific J1939 requirements