These drivers use the SAE J1939 protocol to communicate with an automotive ECU (Electronic Control Module) using NI XNET hardware. This driver set is intended for, but not necessarily limited to, use in automated testing and hardware in the loop (HiL) simulation environments. They are completely free and open source.
Since this DMC implementation is written entirely in the LabVIEW development environment, which provides functions at a layer above the base CAN layer, there are several benefits to be realized:
- The drivers allow the simultaneous capture of data from both poll-and-response J1939 packets using the DMC drivers, and broadcasts CAN frames using the simplicity of the NI XNET API
- The J1939 CAN drivers integrate seamlessly with LabVIEW, since there are no external DLLs or third-party APIs involved
- Additional J1939 functionality can be easily incorporated or the implementation of a particular part of the J1939 protocol stack can be changed, since the source code is entirely LabVIEW based
Supported J1939 Functions
At this time, the following critical aspects of the SAE J1939 protocol specification are supported:
- Data Link Layer (J1939-21)
- Read / write Broadcast Announcement Messages (BAM) from / to a CAN network
- Read / write Connection Mode (CM) messages from / to a CAN network
- Application Layer (J1939-73)
- Defined Tool, Target, and Global addresses for Source and Destination
- Perform Parameter Group Number (PGN) request and response messaging
- Retrieve Active Diagnostic Trouble Codes (DTCs) using Diagnostic Message 1 (DM1)
- Retrieve Inactive DTCs using DM2, via active request or passive mode
- Clear Inactive DTCs using DM3
- Clear Active DTCs using DM11
- Memory Access Request (DM14), Memory Access Response (DM15), and Binary Data Transfer (DM16) for direct read and write of target memory
- Support for Short Seed/Key Security and Long Seed/Key Security (DM18). (User must provide the required LabVIEW code and proper algorithm for key generation)
- Multi-packet capability for DM1, DM2, DM14/15/16, and PGN Request/Response
The drivers are distributed as a VI Package, so VI Package Manager is required for installation. Once VI Package Manager is installed, double click on the package to install it. Once installation has been completed successfully, the J1939 drivers should show up in your LabVIEW 2017 palette as shown below:
Download the drivers. (Zip file)
Feel free to send fixes or useful feature adds to DMC at J1939@dmcinfo.com.
License
XNET J1939 CAN Drivers for LabVIEW
Copyright © 2024 DMC Inc.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.