Documentation

Softing CAN-AC2-PCI with SJA1000 Setup

Softing CAN-AC2-PCI with SJA1000 Setup block

Library

Simulink® Real-Time™ Library for CAN

Description

The Setup block defines general settings of the installed CAN boards. The CAN driver blocks for this board support up to 16 boards for each target system, making up to 32 CAN ports available. For each board in the target system, you must use exactly one Setup driver block.

Block Parameters

Board

Defines the board being accessed by this driver block instance. If multiple boards are present in the target computer, you can use the board number (1...16) to differentiate the boards. The physical board referenced by the board number depends on the PCI Slot parameter. If just one board is present in the target system, select board number 1.

CAN 1 - physical bus

Defines the physical CAN bus type of CAN port 1. In the board's standard configuration, only high-speed CAN is supported. By extending the board with low-speed CAN piggyback modules, you can also select low-speed CAN as the physical bus. Do not change this value to low-speed if the module is not present for the corresponding CAN port. If the module is present (see the Softing® user manual on how to install the modules), you can select between high-speed and low-speed CAN here.

CAN 1- baud rate

Defines the most common baud rates for CAN port 1. If your model requires a special baud rate, select the value User defined. In this case, you use the CAN 1 - user defined baud rate parameter to provide the four values for the timing information. The vector elements have the following meanings:

[ Prescaler, Synchronization-Jump-Width, Time-Segment-1, 
Time-Segment-2 ]

For more information about these values, see the Softing user manual for this board.

CAN 1 - user defined baud rate

See CAN 1- baud rate.

CAN 2 - physical bus

Defines the physical CAN bus type of CAN port 2. In the board's standard configuration, only high-speed CAN is supported. By extending the board with low-speed CAN piggyback modules, you can also select low-speed CAN as the physical bus. Do not set this value should to low-speed if the module is not present for the corresponding CAN port. If the module is present (see the Softing user manual on how to install the modules), you can select between high-speed and low-speed CAN here.

CAN 2 - baud rate

Defines the most common baud rates for CAN port 2. If your model requires a special baud rate, select the value User defined. In this case, you can use the CAN 2 - user defined baud rate parameter to provide the four values for the timing information. The vector elements have the following meanings:

[ Prescaler, Synchronization-Jump-Width, Time-Segment-1, 
Time-Segment-2 ]

For more information about these values, see the Softing user manual for this board.

CAN 2 - user defined baud rate

See CAN 2 - baud rate.

Initialization command structure and Termination

Defines CAN messages sent during initialization and termination of the Setup block.

Termination

Defines CAN messages sent during termination of the Setup block.

Show bus-off status output

Select this check box to enable the bus-off status output port. The output signal can be 1 (bus-off state); otherwise, it is 0. If the bus-off status persists, the block optionally initiates recovery, depending on the setting of Bus-off recovery.

Clear this check box to disable the output port.

Bus-off recovery

Use this parameter to specify how the model is to perform bus-off recovery for the CAN network.

From the list, select:

  • Off

    Does not perform bus-off recovery.

  • Auto

    Upon detection, the model waits 1 second to see if the bus-off state persists. After 1 second, bus-off recovery occurs.

  • Manual Trigger Input

    Enables you to input a signal when you want bus-off recovery to occur. Selecting this option creates an input port for the Setup block.

PCI slot (-1:autosearch)

If only one board of this type is in the target computer, enter -1 to locate the board.

If two or more boards of this type are in the target computer, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber,SlotNumber].

To determine the bus number and the PCI slot number, type:

tg = slrt;
getPCIInfo(tg, 'installed')

The board allows you to terminate each of the two CAN ports separately by means of DIP switches at the rear panel. Refer to the Softing user manual on how to set the DIP switches. Both CAN ports must be terminated when you use the loopback model provided to test the board and drivers.

Was this topic helpful?