文档库 最新最全的文档下载
当前位置:文档库 › 【灵冰肌】CANoe学习笔记-CANdb

【灵冰肌】CANoe学习笔记-CANdb

【灵冰肌】CANoe学习笔记-CANdb
【灵冰肌】CANoe学习笔记-CANdb

编辑dbc文件的时候,各内容的创建

CANdb++ Data Model

Control Units (ECUs: Electronic Control Units) (3)

Info (4)

Environment Variables (5)

Network Nodes (7)

Info (7)

Messages (9)

Info (10)

Signals and Message Signals (10)

Network:一个网络中往往有很多个控制单元ECU,ECU之间通过网络节点(NN)连接,并且在同一个CAN总线上交换信息。

Network

In a network there are usually multiple control units (ECUs) that are connected to one another by their network nodes (NN) and exchange information over the same CAN bus.

控制单元(电子控制单元ECUs):控制单元在网络中的角色是分配处理单元,并通过网络节点与别的控制单元之间的信息交换。

控制单元可能包含多样的sub-function(功能节点)。

环境变量在CANdb++的数据模型中被分配到控制单元。

多个网络节点可以被分配到一个控制单元,这会使能网关的建模。

当控制节点在处理过程中时候,其名字以及备注不能修改,因为CANdb数据库不支持控制单元作为一个独立的目标。

当一个数据库打开,一个控制单元就会被每一个节点install(安装,设置)。“还没理解明白install是怎么回事”

注:任何一个网络节点被定义的时候,CANdb就会自动定义一个同名的ECU,以及在在新的网络节点和ECU之间install a link。

当创建了一个网络节点,会为一个DBC数据库的一个网络建立一个link。

由于一个DBC数据库总是会包含既存的网络的数据,所以新的网络不能被install

Control Units (ECUs: Electronic Control Units)

Control units are the distributed processing units in the network.

Information is exchanged with other control units via network nodes,which represent the control unit's interface to the CAN bus.

Control units can also contain multiple sub-functions (functional nodes).

Environment variables are assigned to the control unit in the CANdb++ data model.

Several network nodes can be assigned to a control unit, which enables the modeling of gateways.

The name and comment of a control unit cannot be changed while processing, because a CANdb database doesn't support control units as independent objects.

When a database is opened a control unit is installed for every node.

Info

?Whenever a network node is defined, CANdb automatically defines a ECU with the same name, and a link is installed between the new network node and the

ECU.

?When a network node is designed (installed), this establishes a link to the one network of a DBC database.

Since a DBC database always contains the data of exactly one network, a new network cannot be installed

Environment Variables

Input and output variables of network nodes, such as switch position, sensor signals and actuator signals.

In the CANdb++ data model environment variables are assigned to the control unit.

Environment variables are defined by the following system parameters:?Symbolic name of the environment variable

?Value type (data type) of the environment variable

Integer – Signed 32 Bit Integer

String – ASCII String

Float – 64 Bit Float

Data – Byte field of a specified length (the length is set in the Length attribute).

?Access rights

Defines the rights that Electronic Control Units (ECU's) have when they access

environment variables.

Unrestricted: All ECU's have read and write access.

The assigned ECU's can read the environment variable.

Read:

(The environment variable represents a sensor.)

The assigned ECU's can write to the environment variable.

Write:

(The environment variable represents an actuator.)

Read/Write:The assigned ECU's can read from and write to environment variables.

?Unit

Unit of the physical quantity of the environment variable.

?Initial Value (only available for environment variables of value type Integer or Float) Initial value of the environment variables at the start of a simulation or measurement.

Remark:

When you enter '0' for both Minimum and Maximum, the Initial Value can be any value

(according to the chosen Value Type).

?Minimum and Maximum (only available for environment variables of value type Integer or Float)

Minimum and Maximum of a valid physical value.

Note:

When you enter '0' for both Minimum and Maximum, the Initial Value can be any value

(according to the chosen Value Type).

?Length (only available for environment variables of value type Data)

Length of the data field in byte.

?Comment

The following parameters may be assigned optionally to an environment variable:

?Value tables for environment variable values

?Concrete values for user-defined attributes

网络节点是控制单元和网络的接口,控制单元输出信息以及接收信息通过CAN总线。网络节点符号名以及地址定义了一个网络节点的系统参数。另外用户定义的属性可能被分配给一个网络节点(同样参照功能性网络节点)

注:·网络节点的地址和网络的地址是不同的,即每一个网络节点的地址在一个网络中只使用一次。

·任何时候当网络被定义,CANdb会自动的定义一个同名的ECU,并且在新的网络节点和ECU之间建立链接。

·当一个网络节点被设计,这会建立一个链接到DBC数据库中的一个网络中。

由于DBC数据库总是包含既存的一个网络的数据,一个新的网络不能被install。Network Nodes

Network nodes are the interfaces of the control unit to a network, over which the control unit outputs information and receives information via the CAN bus.

A network node is defined by the following system parameters:

?Symbolic network node name

?Address

In addition, optionally the concrete values for user-defined attributes may also be assigned to a network node (see also functional network nodes).

Info

?With CANdb++ version 1.1 several nodes may be assigned to a message as a senders (node). This function is only available with a CANdb++ database (*.MDC

file).

?The address of a network node must be unique within the network, i.e. each network node address may only be used once within a network!

?Whenever a network node is defined, CANdb automatically defines a ECU with the same name, and a link is installed between the new network node and the

ECU.

?When a network node is designed (installed), this establishes a link to the one network of a DBC database.

Since a DBC database always contains the data of exactly one network, a new network cannot be installed.

Message 可以在CAN总线上传输。一个message需要定义下面的系统参数:符号名称;CAN ID;DLC;传输类型;周期时间;发送该消息的网络节点;message signals;comment

Messages

Messages can be transmitted over the CAN bus. A message is defined by the following system parameters:

?Symbolic message name

?Identifier (CAN ID)

?Number of data bytes (DLC Data Length Code)

?Transmission type (not with DBC files)

?Cycle time (if the message is transmitted cyclically) (not with DBC files)

?Network node, that sends the message

With CANdb++ version 1.1 several nodes can be assigned to a message as a sender

(node). This function is only available with a CANdb++ database (*.MDC file).

?Message Signals

?Comment

In addition, optionally the concrete values of user-defined attributes can be assigned to a message.

Optionally, the concrete values of user-defined attributes can be assigned to a message.

Info

The CAN ID of a message within a network must be unique, i.e. each CAN ID may only be used once within a network!

| Rules for naming objects

信号代表着消息的最小单元,一个信号需要定义下面的系统参数:·符号名称(参照命名规则);信号长度(位);格式(intel或是motorola);数据类型

·Factor(系数,因子),offset(偏移量),physical unit(物理单元)

信号的raw value(原始数值)就是其在网络上传输的值,信号的physical value(物理量)是代表信号的物理量的值(例如:speed,rpm,temperature)

Physical alue=raw value*factor+offset

·初始值(default):初始值被设置作为物理值(如有需要映射到GenSigStartValue属性)·最大最小值(被设定作为物理量)

·单位·comment

另外,value table 以及用户定义的属性的值可以附属给一个信号。Message的数据字节可以被信号占有(occupy),One or more signals may be transported in the message depending on the signal length and number of data bytes in the message.

Signals and Message Signals

Signals represent the smallest unit of information. A signal is defined by the following system parameters:

?Symbolic signal name

(see also rules for naming objects)

?Signal length

The signal length is set in bits.

?Format (Intel or Motorola)

?Value type (data type)

Data Type Description

Signed: Signed Integer of set length (two's complement)

(the most significant bit is the sign (+/-) bit)

value range: -2^(SigLength-1) to +2^(SigLength-1)-1

Unsigned: Unsigned Integer of set length

value range: 0 to 2^SigLength-1

IEEE Float: 32 Bit IEEE Float

value range: 3,4 * 10^-38 to 3,4 * 10^38

precision: 7 digits

IEEE Double: 64 Bit IEEE Double

value range: 1,7 * 10^-308 to 1,7 * 10^308

precision: 15 digits

In MDC databases the following additional types are available:

Boolean 1-bit signal (unsigned) with the values true and false.

A value table with a predefined name is automatically assigned

to these signals.

Boolean signals have neither a conversion formula nor Min or

Max values.

ASCII String (unsigned) with a length entry in characters (8 bits

per Char). ASCII signals have neither a conversion formula nor Min or Max

values.

UNICODE String (unsigned int) with a length entry in characters (16

bits per Char).

UNICODE signals have neither a conversion formula nor Min or

Max values.

BCD Binary encoded decimal numbers (unsigned) with a length

entered in digits (4 bits per digit).

BCD signals do not have any conversion formula.

Packet Packet signal

Warning

When exporting signals whose types are only available in MDC databases, the data types are converted to existing DBC data types.

?Factor, Offset and Physical Unit

The raw value of a signal is the value as it is transmitted in the network.

The physical value of a signal is the value of the physical quantity

(e.g. speed, rpm, temperature, etc.) that represents the signal.

The signal's conversion formula (Factor, Offset) is used to

transform the raw value to a physical value or in the reverse

direction.

[Physical value] = ( [Raw value] * [Factor] ) + [Offset] ?Initial Value (Default)

The initial value is set as a physical value.

(mapped to the attribute GenSigStartValue if necessary) ?Minimum and Maximum

Minimum and Maximum are set as physical values.

?Unit

Unit of the signal's physical quantity.

?Comment

Info

The following values can not be used for strings:

Min,

Max,

Initial value and

Conversion formula

In addition, value tables and values for user-defined attributes can be attached to a signal.

The data bytes of a message can be occupied by signals. One or more signals may be transported in the message depending on the signal length and number of data bytes in the message.

A signal that was linked to a message is referred to as a message signal. The signal's position within the message is specified by indicating the start bit, see also signal based modelling.

TX Signals

Signals that are transmitted from a specific network node are called TX Signals.

RX Signals

Signals that are received by a specific network node are called RX Signals. Mapped TX Signals

Signals that are transmitted in a message from a network node are called Mapped TX Signals.

Mapped RX Signals

Signals that are received in a message from a network node are called Mapped RX Signals.

Gateway Signals

Gateway signals are routed over a gateway from one bus (source network) to another bus (destination network).

Gateway signals are displayed in the Overview window under the object type Vehicles.

相关文档