ni.com is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

NI VeriStand Add-Ons Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

NI VeriStand Add-on: J1939

 

Overview
The J1939 add-on provides the ability to monitor and communicate with any J1939 compliant devices on a CAN network. Specifically, it provides the ability to read and write J1939 frames (including frames over 8 bytes) imported from a database, read active and previously active trouble codes (DM1 & DM2), clear active and previously active trouble codes (DM11 & DM3), claim and cache J1939 device addresses, send J1939 requests, and generate raw frames on the network. This functionality is commonly used for testing J1939 compliant ECUs/ECMs. Typically, NI VeriStand is used to simulate the necessary parts of the system. Inputs to the ECU/ECM are set to error conditions, which trigger the ECU/ECM to generate a diagnostic trouble code (DTC). The J1939 add-on is used to confirm the correct DTC was issued. The error condition and DTC is then reset. Automation of this test sequence is made possible through NI TestStand or NI VeriStand Stimulus Profile Editor so that testing of all the desired cases is efficient and repeatable.

 

In addition to the add-on, a workspace control, workspace tool, SPN indicator, Stimulus Profile Editor automation sequences, host automation API, and system definition API are provided.  Help for the components is included in the form of the Getting Started document, examples, and video demonstrations attached below.  The embedded video is the demonstration for the workspace control.  It shows the main features of the J1939 Add-on in action.

 

NI XNET 16.0+ Notes
NI released native support for J1939 with the NI XNET 16.0 driver release. Versions 2015+ of the J1939 Addon supports this implementation. Previous versions (2014 and earlier) do not.

 

If you are upgrading from a previous version of the addon to the latest XNET based version, it is recommended that you

  • Completely remove your J1939 configuration from your existing system definition
  • Delete the previous J1939 addon folders out of the VeriStand folder
  • Install the latest version of the J1939 addon
  • Re-build your VeriStand configuration

Instructions for Use
The file named J1939 Addon 4.0.0_Built_<VS Version>.zip attached below contains all the built files for the J1939 Add-on, workspace control, workspace tool, SPN indicator, host automation API, and system definition API. It also contains installation instructions in the form of a readme.txt file. Use this if you want to use the custom device in VeriStand.

 

All the source for this addon resides on Github at https://github.com/NIVeriStandAdd-Ons/J1939-Custom-Device.

 

J1939 Add-on
The instructions for use are contained in the J1939 Add-on Getting Started Document.zip. Additionally, view the video named 1_Add_J1939_Addon_to_SysDef.mp4 attached in J1939 Add-on Getting Started Videos_1.zip.
J1939 Workspace Control
The instructions for use are contained in the J1939 Add-on Getting Started Document.zip. Additionally, view the video named 2_J1939_Workspace_Control.mp4 attached in J1939 Add-on Getting Started Videos_1.zip.
J1939 SPN Indicator
The instructions for use are contained in the J1939 Add-on Getting Started Document.zip. Additionally, view the video named 3_J1939_SPN_Indicator.mp4 attached in J1939 Add-on Getting Started Videos_1.zip.
J1939 Workspace Tool
The instructions for use are contained in the J1939 Add-on Getting Started Document.zip. Additionally, view the video named 4_J1939_Workspace_Tool.mp4 attached in J1939 Add-on Getting Started Videos_2.zip.
J1939 Stimulus Profile Editor Automation Sequences
The instructions for use are contained in the J1939 Add-on Getting Started Document.zip. Additionally, view the video named 5_J1939_Diagnostic_Channels_Automation.mp4 attached in J1939 Add-on Getting Started Videos_2.zip. The attached file J1939 Stimulus Profile Example.zip contains the example profile and sequence files.
J1939 Host Automation API
The instructions for use are contained in the J1939 Add-on Getting Started Document.zip. Additionally, view the video named 6_J1939_TestStand_API.mp4 attached in J1939 Add-on Getting Started Videos_2.zip. The attached file J1939 Addon 4.0.0_Built_<VS Version>.zip contains the example code named J1939 Host Automation API_Example.vi.
J1939 System Definition API
The instructions for use are contained in the J1939 Add-on Getting Started Document.zip. Additionally, view the video named 7_J1939_SysDef_API.mp4 attached in J1939 Add-on Getting Started Videos_3.zip. The attached file J1939 Addon 4.0.0_Built_<VS Version>.zip contains the example code named J1939 System Definition API_Example_Create Sysdef and Add J1939 CD.vi and J1939 System Definition API_Example_Get J1939 CD Settings.vi.

 

Installing the J1939 Add-on
To use the J1939 add-on, unzip the add-on files inJ1939 Addon 4.0.0_Built_<VS Version>.zip. Browse to J1939 Addon 4.0.0_Built_<VS Version>.zip\readme.txt and follow the directions.

If you are upgrading from a previous version of the addon to the latest XNET based version, it is recommended that you

  • Completely remove your J1939 configuration from your existing system definition
  • Delete the previous J1939 addon folders out of the VeriStand folder
  • Install the latest version of the J1939 addon
  • Re-build your VeriStand configuration

Add-on Requirements to Run the J1939 Add-on
All attempts have been made to provide an add-on compatible with the NI VeriStand shipping examples. The nature of some add-ons requires additional software or hardware to function.

 

Only NI-XNET CAN Interface hardware is currently supported. The add-on requires one NI-XNET CAN port per instance. The add-on has only been tested with NI PXI Real-Time controllers.
Software
This device was created for use with NI VeriStand 2015. In addition to NI VeriStand 2015, you must have the following software installed:
NI-XNET 16.0 or Later


Note: Versions for NI VeriStand 2013 through 2014 will continue to be attached for people needing those versions. Any new features will be added only to the 2015 and later versions.
Hardware
This add-on requires the following hardware:
NI-XNET CAN Interface Hardware

 

Add-on Requirements to Modify the J1939 Add-on
All the source for this addon resides on Github at https://github.com/NIVeriStandAdd-Ons/J1939-Custom-Device. Review the ReadMe.md file for this information.

  • The Master branch is the lastest.
  • The Custom_J1939_TP branch contains the last version of the code before moving to NI XNET.
  • The Legacy_2013_to_2014 branch contains the source for 2013.

Release Notes for the J1939 Add-on
<1.0.0>

  • Initial Release

<1.1.0>

  • <Feature> Added support for Pharlap cRIOs and NI 986x XNET modules
  • <Feature> Works with the Scan Engine and EtherCAT Addon
  • <Feature> Added Incoming and Outgoing Poll rates for CPU optimization at high primary control loop rates
  • <Change> Renamed TS API to Host Automation API
  • <Change> Changed the System Definition API distribution from a lvlib to a lvlibp
  • <Change> Made workspace objects have one common support llb
  • <Change> Cleaned up source code, VI naming, lvlib organization

<1.2.0>

  • <Feature> Windows support was added.
  • <Change> Output messages no longer have their source address forced to the address of the add-on. This allows the add-on to send messages from different source addresses.
  • <Change> The add-on's internal table now can support the same PGN from multiple source addresses.
  • <Change> The add-on will only respond to requests addressed specifically to the add-on.

<1.3.0>

  • <Change> Removed printing debug information to the screen. This was causing issues with the 2011 version so it was removed.

<2.0.0>

  • <Upgrade> The source code has been upgraded to LabVIEW 2013 to utilize new features.
  • <Change> Acknowledgements are now sent to global (xFF) and byte 5 is set to the destination address. This is per a J1939 specification change.
  • <Fix> Acknowledgements wheren't always replied to correctly. This is now fixed.
  • <Improvement> Load time was significantly improved. Now, most items at re-initialized on a system definition change.
  • <Improvement> Built file sizes reduced, allowing for faster download times.
  • <Feature> XNET 14.0 allows for multiple sessions to use the same port. Therefore, the J1939 addon does not require sole use of a port any longer.

<4.0.0>

  • <Change> Addon can only send from pre-defined addresses. This applies to RAW messages and to replies to requests.
  • <Change> All data is now acquired and generated in the VeriStand Primary Control Loop (PCL).
  • <Feature> True NI-XNET support for data channels.
  • <Feature> Information channels for timing on incoming messages.
  • <Feature> Event and Cyclic messages are now both supported.
  • <Feature> Disable channel support on all outgoing messages.
  • <Feature> Trigger channel support for event messages.
  • <Feature> Import for a generic J1939 database and apply to specific addresses.
  • <Upgrade> Improved workspace/tool operation.

Known Issues for the J1939 Add-on (current version)

  • You cannot have more than 490 frames for a given controller. This is a NI-XNET driver limitation.
  • One instance of the custom device requires sole ownership of one NI-XNET CAN port.
  • Testing has only been done on NI PXI Real-Time Controllers, NI-XNET PXI cards, Pharlap cRIOs and NI 986x modules. Therefore, no VxWorks cRIOs or NI 985x modules are supported.
  • Testing has been done on Windows and it is not supported. Therefore, using a NI 986x with a USB sleeve or CompactDAQ on Windows will not work. Windows is now supported. Testing was done with a NI 9171 and a NI 9862.
  • You cannot edit a J1939 database with this add-on.
  • You cannot select the same arbitration ID for generation and acquisition within the same instance of the add-on

Support and Contact
This add-on is provided as open-source software. If it does not meet your exact specification, you are encouraged to modify the source code to meet your needs. It is not officially supported by National Instruments. If you encounter a problem with this add-on, or if you have suggestions for a future revision, please post to the forum for this add-on (J1939 Add-on Feedback). You must use this feedback forum for support. Do not call National Instruments for support for this add-on. National Instruments does not support this code or guarantee its quality in any way. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).

 

 
Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
Comments
Rogefeller
Member
Member
on

Is this compatible with Veristand 2012?

Kevinye
Active Participant
Active Participant
on

There would be a deploying error using this add-ons in VeriStand 2018.

Below is the error information we got. How can we solve this problem?

 


?Files successfully deployed to the targets.
?Starting deployment group 1...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
The VeriStand Gateway encountered an error while deploying the System Definition file.

Details:
Error -1074384758 occurred at Project Window.lvlib:Project Window.vi >> Project Window.lvlib:Command Loop.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi

Possible reason(s):

NI-XNET: (Hex 0xBFF6308A) The interface name given does not specify a valid and existing interface. Solution: Use a valid and existing interface. These can be obtained using MAX, XNET system properties, or the LabVIEW XNET Interface IO name. If you are using CompactRIO, refer to the topic "Getting Started with CompactRIO" in the NI-XNET Hardware and Software Help.
=========================
NI VeriStand: NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi >> NI VeriStand Engine.lvlib:VeriStand Engine.vi >> NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi >> NI VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi >> Custom Devices Storage.lvlib:Initialize Device (HW Interface).vi

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
?Sending reset command to all targets...
?Stopping TCP loops.
Waiting for TCP loops to shut down...
?TCP loops shut down successfully.
?Unloading System Definition file...
?Connection with target Controller has been lost.

Contributors