In MxVDev, a Virtual Bus is created and configured using the Network Configuration dialog. See Connecting to a Hardware Bus. In MxTransIt, a virtual bus is created using Transforms. When configuring a Virtual Bus to support the testing of one or more MIL, SIL, or HIL nodes, the first step is usually to determine what other nodes (either real or simulated) you need on the bus. Apart from the Node(s) under test, your bus may have any of the types of nodes. Notes: •Nodes on the Virtual CAN bus are connected to the bus based on the bus name. In the Harness, for any Transform that has a CAN port, ensure that: oThe port is renamed to the name of the CAN bus that you want to connect to, and oThe port is exported •In general you don’t want to simulate the same entity on the bus more than once. If you do simulate the same node twice, both nodes will transmit messages with the same IDs onto the bus. To get Signals appearing correctly as Stimuli and Responses, if you are testing a real controller on the CAN bus, or you have a Simulator of a controller in the Harness (using the CAN/LIN Transmit drivers), then they should be selected in the Receive From column in Network Configuration. |
The CAN Bus Configuration dialog box determines how MxVDev interacts with the Virtual Bus. This box is presented as part of the Network Configuration process. The DBC file defines how Signal information is packaged and transmitted on the CAN BUS in the form of messages. Using this information you can configure how MxVDev and particular Transforms in the Test Harness interface with a CAN bus in your test environment. In the Receive From column, typically you select all real and simulated nodes in the Test Harness. This way you can monitor all bus activity of all of these nodes. In the Simulate and Transmit For column, select nodes that: •Are responsible for generating traffic used by the nodes checked in the Receive From column, but •Are not in the test harness MxVDev simulates the nodes that are selected in the Simulate and Transmit For column. Information in the DBC file associated with the bus is used as follows: •Spontaneous Transmission Method - Every time the message changes due to a signal change in an MxVDev TestCase, the message is transmitted on the bus. •Periodic (Cyclic) Transmission Method – Every time that the message is due to be transmitted the simulator constructs the message based on the current value of the Signals in the current test cases. If the Signal is not in a currently executing test case then the last value for signal is used. Initially if no changes are specified to a Signal then the value transmitted is the default value obtained from the DBC file. |
Normally, a DBC file is required to send CAN messages. The only exception is if you use an Override. Select the bus name from Project Stimulus in the Pick Signals dialog. To send a message, create a transition as with other message signals. Use the CAN message structure to format the transition. The TestCase MsgOverrideTest in the TurnDoorSample project includes an example of a CAN signal override. |