CAN_Transmit_Driver

Use this Transform to transmit signal information onto a CAN bus. The Transform uses the DBC file to create and transmit the messages.  It supports standard CAN and CAN FD.

Basic Configuration

1.Click 3dots_button in the CAN Database property to display the CAN Bus Configuration form.

Click to expand.

Click to expand.

2.Use the Add button to select the DBC file.

3.Select one or more nodes and messages to Simulate and Transmit for. If you select individual messages, only the selected messages are transmitted.

Note: If you select a node to be simulated by this Transform, be sure that the same node is not simulated by MxVDev. See Network Configuration. Selecting a node in both places can result in duplicate messages on the bus.

4.Click OK. The signals used by the selected nodes become inports on the Transform.

5.Use the Transform's Name property to change the port names to the name of the CAN bus. If you are using the CAN bus from MxVDev, then the name should match the name of the CAN bus used in Network Configuration there.

CAN_Driver_properties

6.Export the ports to be used in MxVDev.

Example

The figure below shows a very simple example of a closed-loop node. The CAN Receive Driver reads a value from the CANB bus, the C# Snippet does simple signal processing, and the CAN Transmit Driver transmits a new value back to the bus.

CANNodeSim

This C# Snippet is effectively simulating an ECU attached to the bus. In a more complex system, the ECU could be simulated by any of the following:

C# Snippet

SIL Easy

MxVMC

Custom Transform

Simulink

For a step-by-step example, see Putting a Signal on a CAN Bus.

MxV Bus Control Ports

To connect the MxV Bus Enable or the MxV Auto Bus Tx port to a TestCase, you must route the Signal through the router Transforms described below. Do not export the ports on the Transmit Driver Transform.

The MxV Bus Enable port accepts a Boolean input. A value of 1 enables the bus; 0 disables it. By default, the bus in enabled. To use this port with the MxV Bus Enable System Signal, which is a message, route it through the MxV Bus Enable Router Transform.

The MxV Auto Bus Tx port accepts a Boolean input. A value of 1 enables automatic message transmission on the bus; 0 disables it. To use this port with the MxV Auto Bus Tx System Signal, which is a message, route it through the MxV Auto Bus Tx Router Transform.

To use more than one CAN Transmit Driver, use PassThru Transforms to connect the other bus control ports (MxV Auto Msg Tx, MxV Auto Node Tx, MxV Auto Msg Cfg, or MxV Node Enable) to TestCases in MxVDev. Export the inport on the PassThru Transform. Do not export the ports on the CAN Transmit Drivers.

hmtoggle_plus1Example 1: Using the Bus Control Ports with a CAN Transmit Driver
hmtoggle_plus1Example 2: Using the Bus Control Ports with Multiple Networks
hmtoggle_plus1Example 3: A Full CAN Network Harness

 

Related Topics:

CAN Receive Driver

Bus Overview

CAN Transforms

Automatic Message Transmission

Bus Control System Signals