Engee documentation

CAN Setup

Configuring the CAN port of the module.

blockType: EngeeFunction

Path in the library:

/Interfaces/CAN/CAN Setup

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.

Ports

None.

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

Details

Available interfaces:

Interface name

Decoding

"canalystii"

CANalyst-II

"cantact"

CANtact CAN Interface

"etas"

ETAS

"gs_usb"

Geschwister Schneider and candleLight

"iscan"

isCAN

"ixxat"

IXXAT Virtual Communication Interface

"kvaser"

Kvaser’s CANLIB

"neousys"

Neousys CAN Interface

"neovi"

Intrepid Control Systems neoVI

"nican"

National Instruments NI-CAN

"nixnet"

National Instruments NI-XNET

"pcan"

PCAN Basic API

"robotell"

Robotell CAN-USB interface

"seeedstudio"

Seeed Studio USB-CAN Analyzer

"serial"

CAN over Serial

"slcan"

CAN over Serial / SLCAN

"socketcan"

SocketCAN

"socketcand"

socketcand Interface

"systec"

SYSTEC interface

"udp_multicast"

Multicast IP Interface

"usb2can"

USB2CAN Interface

"vector"

Vector

"virtual"

Virtual

Values

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

Default value

socketcan

Program usage name

m_interface

Tunable

No

Evaluatable

Yes

# Port: — the CAN port to be used for message transmission

Details

The list of available CAN ports depends on the operating system you are using.:

  • On Linux, you can get it using the command ip a — the output will specify interfaces of the form can0, can1 etc. Before using it, it is necessary to activate the CAN interface, for example, for socketcan it is done like this: sudo modprobe can, then sudo ip link set can0 type can bitrate 125000 and sudo ip link set can0 up.

  • In Windows, the list of interfaces can be viewed through the programs included with the drivers. For Kvaser devices, this is Kvaser CanKing, for PEAK equipment, it is PCAN-View. The names of the ports can look like PCAN_USBBUS1, PCAN_USBBUS2 etc .

Before using the block CAN Setup It is necessary to make sure that the CAN interface is correctly configured and active in the system.

Default value

"can0"

Program usage name

m_port

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

500.0

Program usage name

m_speed

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

true (switched on)

Program usage name

m_bus_off

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

-1

Program usage name

m_sample_time

Tunable

No

Evaluatable

Yes