NI recommends users to set baud rate value in the database.
- Launch NI-XNET Database Editor.
- Open the database file. Select the CAN Cluster you wish to modify.
- Under CAN Cluster Properties, select <Custom> from Baud Rate drop down menu.
- Configure the custom baud rate.
To configure custom baud rate of a CAN interface programmatically, write the hexadecimal value from the custom baud rate dialog to Interface:64bit Baud Rate
or Interface:CAN:64bit FD Baud Rate
- Place a property node on your block diagram by going to the Measurement I/O palette >> XNET >> Session Node. Once you have dropped down the node on the block diagram, click the section under XNET Session and navigate to Interface >> 64bit Baud Rate. Navigate to Interface >> CAN >> 64bit FD Baud Rate for CAN FD.
- Copy the hexadecimal value from the custom baud rate dialog to the constant or the control and wire the value to the property node.
- Format the input value into hexadecimal representation if necessary. Right click the constant or the control and choose Display Format... then select Hexadecimal.
When choosing the values for the different parameters in the XNET Database Editor, keep the following in mind:
- NI XNET Hardware runs with 40 MHz, so the Time Quantum is 25 ns. If you get the parameters from a hardware with a different frequency, you have to adapt the values. E.g. if your parameters are made for a hardware with 80 MHz, you have to use only half of the value for the XNET hardware.
- For some of the values, the hardware adds 1 to the configured value. E.g. if you need a BRP of 2, you need to set 1.