Port Properties Dialog Box
Use this dialog box to configure the interface and the baud rate for a port.
In the Properties dialog, you assign an interface name to the port, such as CAN0 or CAN1. The interface name identifies the physical port within NI-CAN APIs. The Properties dialog also contains the default baud rate for MAX tools and the Channel API.
Interfaces previously assigned to other physical ports are marked with an asterisk in the list box. If you select an interface used by another port, the other port is reassigned to the first unused interface.
The baud rate in this dialog is the default value for applications that use the Channel API and for the MAX tools. You can also use the Channel API Set Property function to set the baud rate within your application. Applications with CAN that use the Frame API must set the baud rate using the ncConfig function. Applications with LIN that use the Frame API must set the baud rate using the ncSetAttribute function.
Use the Baud Rate drop box to select from a list of commonly used baud rates.
By selecting the Advanced button for CAN hardware, you have full control over the bit timing registers. There are two 8-bit registers, BTR0 and BTR1. The calculations for the bit timing registers use a clock of 8 MHz for the Baud Rate Prescaler (BRP). The user can use one of the following methods to set the registers:
- Edit Bit Timing Register Value (BTR0, BTR1)
This method is recommended when you know the required register values.
- Edit Segments of Bit Timing Register
This method is recommended when you want to change a particular field in the registers.
- Baud Rate...
This button opens a window to view the register values (BTR0 and BTR1) for a given baud rate.
The baud rate is corrected to the nearest possible value. For example, 85 kBaud will be changed to 84.211 kBaud. The values for SJW and SPL do not affect the baud rate. After creating a list, you can pick one of the values and select Use to use those BTR values as your baud rate setting.
By selecting the Advanced button for LIN hardware, you can enter any value from 2400 to 20000 baud. For information on the actual baud rate calculated, refer to the ncSetAttribute function within the Frame API section of your NI-CAN Hardware and Software Manual.
This selection is available only for XS CAN cards. National Instruments XS CAN cards contain multiple transceivers for each CAN interface, and the transceiver is selected by software. For more information on XS CAN cards, refer to the NI-CAN Help at Help»Help Topics»NI-CAN»Hardware and Software Manual.
The transceiver type in this selection is the default value for applications that use the Frame API or Channel API. This transceiver type is switched into use when your application opens or initializes the specified interface. You can also change the transceiver type within your application, using Set Attribute in the Frame API and Set Property in the Channel API.