xPC Target | ![]() ![]() |
The Setup block is used to define general settings of the stacked CAN board(s). The CAN driver blocks for this board support up to three boards for each target system what leads to the availability of up to six CAN ports. For each board in the target system exactly one Setup driver block has to be used in a model.
The dialog box of the Setup block lets you define the following settings.
Board -- The first control (pop-up menu) lets you define which board is being accessed by this driver block instance. The board number (1...3) can be seen as a reference identifier in order to differentiate the boards if multiple boards are present in the target system. The physical board finally referenced by the board number depends on the I/O Base Address edit field described further below. If just one board is present in the target system, board number 1 should be selected.
CAN 1 - Baud rate -- The second control (pop-up menu) lets you define the most common baud rates for CAN port 1. If special timing is necessary (baud rate), the value CAN 1 - User defined baud rate can be selected. In this case the third control (edit field) is used to provide the four values for the timing information. The vector elements have the following meaning
For more information about these values see the Softing user manual for this board.
CAN 1 - Baud rate -- The fourth control (pop-up menu) lets you define the most common baud rates for CAN port 2. If special timing is necessary (baud rate), the value "User defined" can be selected. In this case the fifth control (edit field) is used to provide the four values for the timing information. The vector elements have the following meaning
For more information about these values see the Softing user manual for this board.
Initialization and Termination -- The sixth and seventh control (edit fields) can be used to define CAN messages sent during initialization and termination of the Setup block.
I/O Base address -- The eighth control (edit field) is used to define the I/O base address of the board to be accessed by this block instance. The I/O Base address is given by the DIP-switch setting on the board itself. The I/O address range is 3 bytes and is mainly used to transfer the information which memory base address the board should use. See the Softing user manual for this board on how the I/O base address can be set. The I/O base address entered in this control has to correspond with the DIP-switch setting on the board. If more than one board is present in the target system a different I/O base address has to be entered for each board. In this case the I/O base address itself defines which board is referenced by which board number.
Memory base address -- The ninth control (edit field) is used to define the memory base address of the board to be accessed by this block instance. The memory base address is a software setting only (no corresponding DIP-switch is found on the board). The memory address range is 64 kilobytes. If more than one board is present in the target system a different memory base address has to be entered for each board and you have to make sure that the defined address ranges do not overlap. Because the xPC Target kernel only reserves a subset of the address range between 640 kilobytes and 1megabytes for memory mapped devices the address ranges have to lie within the following range:
The board allows activating proper termination for each of the two CAN ports separately by means of jumpers found on the board. Refer to the boards user manual on how the DIP-switches have to be set. Both CAN ports have to be terminated properly when you use the provided loop-back model in order to test the board and drivers.
![]() | CAN Driver Blocks for the CAN-AC2-104 (PC/104) with Philips SJA1000 CAN-Controller | Send Driver Block | ![]() |