Engee documentation

CAN Pack

Combines individual signals into a CAN message.

blockType: CANPack

Path in the library:

/Basic/Additional/Interfaces/CAN Pack

Description

Block CAN Pack loads the signal data into the CAN message at specified intervals during the simulation.

Ports

Output

# CAN Msg — output CAN message
bus

Details

This unit has one output port: CAN Msg. Block CAN Pack accepts the specified input signals and packages them into a CAN message.

Data types

bus

Complex numbers support

I don’t

Input

# Data — input signal for CAN message
vector

Details

Block CAN Pack It has one input port by default. The number of input ports of the block is dynamic and depends on the number of signals specified for the block. For example, if the message contains four signals, then the block may have four input ports.

The unit supports all data types of input signals.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point

Complex numbers support

I don’t

Parameters

Main

# Data is input as — select the data signal
raw data | CANdb specified signals

Details
  • raw data — input data in the form of a vector UInt8. When this option is selected, the message parameters are specified. This option opens only one input port Data.

    The conversion formula:

    where — the initial value of the signal, and — the value of the packed signal.

  • CANdb specified signals — the message parameters are set in a dbc file, which must be specified in the parameter CANdb file. After uploading the file, the parameter appears in the block parameters Message list, which contains a list with all the messages specified in the file and corresponding to the CAN standard (CAN and CAN-FD messages can be stored in one file).

    After selecting a message from the list, all other fields of the block parameters are automatically filled in. These fields are read-only.

Values

raw data | CANdb specified signals

Default value

raw data

Program usage name

DataFormat

Tunable

No

Evaluatable

No

# CANdb file — dbc file

Details

Select the dbc file to work in the mode CANdb specified signals.

Dependencies

To use this parameter, set for the parameter Data is input as meaning CANdb specified signals.

Default value

Program usage name

CANdbFile

Tunable

No

Evaluatable

No

# Message list — the list of messages in the dbc file
String

Details

The list of messages in the dbc file that comply with the CAN standard.

Dependencies

To use this parameter, set for the parameter Data is input as meaning CANdb specified signals.

Default value

Program usage name

MsgList

Tunable

No

Evaluatable

Yes

# Name — name of the CAN message
String

Details

Specify the name of the CAN message.

This option is available if for the parameter Data is input as value selected raw data. If for the parameter Data is input as value selected CANdb specified signals, then this parameter is read-only.

Default value

CAN Msg

Program usage name

MsgName

Tunable

No

Evaluatable

Yes

# Identifier type — the type of the CAN message identifier
Standard (11-bit identifier) | Extended (29-bit identifier)

Details

Specify whether the CAN message identifier is standard or extended. By default, the standard type is used. The standard identifier is an 11-bit identifier, while the extended identifier is a 29-bit identifier.

This option is available if for the parameter Data is input as value selected raw data. If for the parameter Data is input as value selected CANdb specified signals, then this parameter is read-only.

Values

Standard (11-bit identifier) | Extended (29-bit identifier)

Default value

Standard (11-bit identifier)

Program usage name

MsgIDType

Tunable

No

Evaluatable

No

# CAN Identifier — ID of the CAN message
Real number

Details

Specify the ID of the CAN message. This number must be a positive integer from 0 before 2047 for the standard identifier and from 0 before 536870911 for the extended identifier.

This option is available if for the parameter Data is input as value selected raw data.

Default value

0

Program usage name

MsgIdentifier

Tunable

No

Evaluatable

Yes

# Length (bytes) — length of the CAN message
Real number

Details

Specify the length of the CAN message from 0 before 8 bytes.

This option is available if for the parameter Data is input as value selected raw data. If for the parameter Data is input as value selected CANdb specified signals, then this parameter is read-only.

Default value

8

Program usage name

MsgLength

Tunable

No

Evaluatable

Yes