NI VeriStand has a number of native features for communicating with the CAN, LIN, and FlexRay buses using the NI-XNET products. These features play a role in frame acquisition, frame transmission, and more advanced bus capabilities.
One essential feature that allows for customized frame acquisition and transmission is a direct link from NI VeriStand to the NI-XNET Database Editor, which gives you the ability [j1] to configure and edit database files that will be used with CAN and FlexRay buses. Inside the editor, you can import and configure FIBEX, .DBC, and .NCD files. You can also import .LDF files for use with a LIN bus.
Figure 1. You can use the NI-XNET Database Editor in NI VeriStand.
Acquire CAN, LIN, and FlexRay Signals and Frames – NI VeriStand can acquire both raw frame and scaled signal data from the CAN, LIN, and FlexRay buses. For further analysis, you can obtain the received time and time difference from the last received frame for each frame.
Figure 2. Log and display data from CAN, LIN, or FlexRay buses in addition to their received time and time difference between frames.
Frame Data Logging – For the frames that the NI-XNET interfaces receive from the bus, NI VeriStand can log the raw data frames to file. You can also place a filter on this data logging to make sure that only certain frames are logged to the file while others are not.
Figure 3. You can log bus traffic being monitored to a specific file and include or exclude certain data.
Launch NI-XNET Bus Monitor – You can launch the NI-XNET Bus Monitor directly from NI VeriStand. With this tool, you gain a real-time view of the data that is on a particular bus. For a more customized view, select the specific port to be monitored in the Bus Monitor.
Figure 4. Launch the NI-XNET Bus Monitor to monitor traffic on the CAN, LIN, or FlexRay bus in real time.
Conditional Frame Transmission – You can configure the CAN, LIN, and FlexRay NI-XNET interfaces for both event and cyclic frame transmission. In addition, you can set conditions for the frame transmissions. The conditions include transmitting in response to a trigger, a value change of the frame, or neither one of these two occurring, which results in transmission.
Figure 5. You can set a transmission trigger for different conditions from the System Explorer.
Data Replay – When communicating with the CAN bus, you can replay data it has acquired back onto the CAN bus exactly as it was received. Because of the capability to acquire frame received time and time difference between frames, the data frames can be transmitted on the bus in the same order and time difference as they were initially received. You can filter this data to configure the replay for specific frames. This mode can be applicable in any restbus simulations.
Figure 6. Replay data on the bus as it was received and filter it to include or exclude specific frames.
Transmission Disabling – To allow for a quick transition from transmitting to not transmitting data frames, NI VeriStand also has the capability to disable the transmission of frames on the CAN, LIN, and FlexRay buses without uninitializing the driver for the interfaces.
Figure 7. NI VeriStand includes native functionality to disable transmission of frames.
Drop Cyclic Frames – For use cases in creating error situations on a CAN bus and inserting erroneous data, you can configure the hardware interface to drop cyclic frames, or skip transmissions. Specify that you would like to skip a number of transmissions and the hardware stops transmitting until this limit is reached and begins transmitting again after.
Figure 8. You can skip a specific number of cycles from cyclic frames as needed.
Change CAN Period Instantly – For cyclic transmission of CAN frames, NI VeriStand has native functionality to change the period of those cyclic transmissions quickly and easily. While the NI-XNET interface is transmitting cyclic frames with a certain period, you can change the period on the fly without stopping transmission.
Figure 9. Change the period of cyclic frames by specifying the transmit time.