To make reference database dynamically, enter :can_fd: or :can_fd_brs: alias to the cluster (:memory) terminal of XNET Create Session node for CAN FD or CAN FD + BRS sessions respectively. For the information about the types of CAN I/O modes, refer to CAN:I/O Mode - NI-XNET Help.
You have to specify the value of 64bit Baud Rate and 64bit FD Baud Rate from XNET Session Property node.
- Please click the XNET Session Property node and select Interface » 64bit Baud Rate.
- Please click the XNET Session Property node and select Interface » CAN » 64bit FD Baud Rate.
Please refer to the below snippet. This code is based on CAN Frame Output Stream.vi example.
Additional Information
If frame error occurs, please check sample point of other ECU or third-party interfaces in your CAN bus refer to this link.
Error or Incorrect Frames When Using NI-XNET in CAN FD & BRSWhen you use CAN FD or CAN FD + BRS mode, payload length could be as long as 64 bytes. But only below options are available as the payload length.
- 0 byte
- 1 byte
- 2 bytes
- 3 bytes
- 4 bytes
- 5 bytes
- 6 bytes
- 7 bytes
- 8 bytes
- 12 bytes
- 16 bytes
- 20 bytes
- 24 bytes
- 32 bytes
- 48 bytes
- 64 bytes
For example, if you try to write 9 bytes data, you must choose 12 bytes to write. If you write the data with unsupportable payload length, such as 9 bytes, 11 bytes, etc, the communication doesn't work properly. This problem occurs both the case using a database file and the case using dynamic database. In a dynamic database, you don't have to set any other property for payload length like frame setting in the database file. You can just write that amount data array then implicitly that payload length is used.