CAN Setup
Configuring the CAN port of the module.
blockType: EngeeFunction
|
Path in the library:
|
Description
| To work with the block, install/update the support package. equipment. |
Block CAN Setup It is used to configure the CAN port of the module.
Parameters
Main group
#
Интерфейс: —
implementation of drivers for working with the CAN bus
socketcan | pcan | kvaser | vector | systec | cantact | canalystii | ETAS | gs_usb | iscan | ixxat | neousys | neovi | nican | nixnet | robotell | seeedstudio | serial | slcan | socketcand | udp_multicast | usb2can | virtual | marathon
Details
Available interfaces:
Interface name |
Decoding |
|---|---|
|
SocketCAN |
|
PCAN Basic API |
|
Kvaser’s CANLIB |
|
Vector |
|
SYSTEC interface |
|
CANtact CAN Interface |
|
CANalyst-II |
|
ETAS |
|
Geschwister Schneider and candleLight |
|
isCAN |
|
IXXAT Virtual Communication Interface |
|
Neousys CAN Interface |
|
Intrepid Control Systems neoVI |
|
National Instruments NI-CAN |
|
National Instruments NI-XNET |
|
Robotell CAN-USB interface |
|
Seeed Studio USB-CAN Analyzer |
|
CAN over Serial |
|
CAN over Serial / SLCAN |
|
socketcand Interface |
|
Multicast IP Interface |
|
USB2CAN Interface |
|
Virtual |
|
Marathon |
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
# Port: — ID of the CAN interface (port) to be used for sending and receiving messages
Details
How to get the port ID depends on the OS and the driver/adapter.:
Linux (for example, SocketCAN interface):
-
View the list of CAN interfaces with the command:
ip aThe output will have interfaces like
can0,can1and so on. These are the values that are specified in the Port parameter. -
Before using it, make sure that the interface is loaded and activated. An example for
can0:sudo modprobe can sudo ip link set can0 type can bitrate 125000 sudo ip link set can0 up
Windows:
-
Install the drivers for the adapter you are using.
-
Open the utility provided with the driver and see the list of available ports.:
-
For Kvaser — Kvaser CanKing devices;
-
For PEAK — PCAN-View equipment.
The names of the ports can look like
PCAN_USBBUS1,PCAN_USBBUS2etc.
-
Before using the unit, make sure that the selected CAN interface is correctly configured and active in the system.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
# Скорость передачи: — network transfer rate
Details
Network transfer rate (from 10 Kbit/s to 1 Mbit/s). All nodes in the network must operate at the same speed.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
# Восстановление шины в состоянии Bus-off: — the time to restore the active state of the interface after entering the Bus-off state
Details
The number 0 means — do not recover after Bus-off.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
# Шаг расчёта, с: — the time interval with which data is processed and exchanged over the CAN bus
Details
Defines the sampling period of the block with which CAN messages are sent and received during the simulation.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
