The baud rate of a NI 985x module can be set either in the Project Explorer or programmatically.
To set the baud rate for a NI 985x module from the project explorer:
- Right-click on the module in the Project Explorer window and select Properties. This will open the C Series Module Properties dialog box for the NI 985x module.
- Select the CAN0 or CAN1 tab and select the desired baud rate from the Baud Rate drop-down menu.
- Click OK.
To change the baud rate programmatically:Use a
Bit timing FPGA I/O Property Node for the specified CAN port . To use this property, CAN communication must be stopped for the port, otherwise the property node will return an error. An example implementation is shown:
The input to the
Bit Timing property must be the hexadecimal values of both Bit Timing Registers,
BTR1 and
BTR0. These values must be concatenated together with BTR1 as the most significant value and BTR0 as the least significant.
To determine the BTR values for a standard baud rate select the desired rate in the
C Series Module Properties as specified above in Part A. The BTR values for the selected rate can then be viewed in the CAN interface
Advanced…
Options.