Rest bus simulation CAN User Interface

Prerequisites

  1. Create a new project.

  2. Configure the Hardware device(s).

  3. Import a database (CAN)

Creating nodes by Drag and Drop

After adding a CAN database, drag and drop (an) ECU(s) to the Nodes element.

../_images/can_drag_drop_ecus.gif

Transmitting a frame

1.Choose the frame to be sent

Before setting signals and sending a frame, you need to start the ECU and enable the frame to be sent.

../_images/can_ui_start_ecu.gif

2.Set and send signals

Every time a signal is set (by changing its value and pushing the enter button) a frame will be sent with the new values.

../_images/can_ui_set_signal.gif

Generator

The generator is used to customize a signal's physical value. A predefined or customizable function will be followed by the latter over time. Using the Signal Graphics tool, the effects of adjusting the generator column are seen.

../_images/RBS_Generator_culomn.gif

Generator Column

The generator column could be set to one of the following options:

  • Value When this option is selected, the generator will have no effect on the physical value of the signal. This option is selected by default.

  • Random When this option is selected, a pop-up window would be displayed asking for Min and Max values. Once set, the generator would then change the physical value of the selected signal randomly while respecting the minimum and maximum values entered previously. The preview in the pop-up window would give an approximate estimation of what the signal's output might look like in the Signal Graphics tool.

../_images/traffic_generator_RandomGenerator.PNG
  • Sinusoidal Wave Choosing this option and filling the Min, Max, Phase, and Frequency fields make the generator force the physical value signal to follow a sinusoidal wave function. A preview of a cycle of that function would be displayed.

../_images/traffic_generator_SinWaveGenerator.PNG
  • Sawtooth This option makes the physical value signal follow a sawtooth wave. In order for it to function properly, the Min, Max, Phase, and Frequency fields must be filled. The preview illustrated in the pop-up shows an approximation of what the generator will make the physical value signal look like.

../_images/traffic_generator_SawtoothGenerator.PNG
  • Triangle To make the signal output of the physical value follow a triangle function, this option should be selected. A preview of the one cycle of the function is displayed with the default values of the function's parameters (Min, Max, Phase, and Frequency). The preview will change once the default values are changed to the desired ones.

../_images/traffic_generator_TriangleGenerator.PNG
  • Square Selecting this option means making the signal output of the physical value follows a square wave shape. A preview containing the shape of a single cycle will be displayed once the Duty cycle, Min, Max, Phase, and Frequency values are configured. Otherwise, it will display a default shape according to the default values.

../_images/traffic_generator_SquareWaveGenerator.PNG
  • Semicircle The semicircle function option makes the signal output, if configured, follow a semicircle periodic wave. One cycle of the wave is displayed automatically with the default values. To configure it properly, Min, Max, Phase, and Frequency fields should be adapted as desired.

../_images/traffic_generator_SemiCircleGenerator.PNG
  • Custom List This option requires the use of a list of values. The values entered should be separated by a comma "," in order for the list to be recognized. The physical signal output will iterate on the values list one by one, while respecting the order they were introduced in. An illustration of some cycles that the function would follow would be presented in the pop-up window.

../_images/traffic_generator_CustomListGenerator.PNG
  • Equation In order to customize the physical value of a specific signal according to a specific function, this option should be chosen. It would require entering the lowest and highest values of the desired function (Min, Max) and the equation that the physical value should follow. The preview in the pop-up window will provide an approximate estimate of the output of the signal in the system.

../_images/traffic_generator_EquationGenerator.PNG

To customize the equation, a specific syntax should be respected. The equation should define a function depending on, at most, two variables "t" and "i" where "t" represents time and "i" represents the index of the message. The following table contains possible operators and functions that could be used in the definition of the equation:

Operators and Functions

Keywords

Description

Example

+

Addition

a+b

-

Subtraction

a-b

*

Multiplication

a*b

/

Division

a/b

^

Exponentiation

a^b

#

Modulo Function

a#b

sin

Sine Function

sin(t)

cos

Cosine Function

cos(t)

tan

Tangent Function

tan(t)

abs

Absolute Function

abs(t)

sqrt

Square Root Function

sqrt(t)

sec

Secant Function

sec(t)

Receiving a frame

To properly receive a frame, the ECU should already be started and the received frame enabled. Every time a frame with the same name/id from another ECU is sent over the network, the new values will automatically be received and set in the interface.

../_images/can_ui_receive_frame.gif

Save a frame

  • To save a frame and use the saved values as default every time the project is opened, click on Save Button.

  • Only transmitted frames could be saved.

../_images/can_ui_save_signals.png

Reset a frame

  • To reset a frame to the default values in the database, click on Reset Button.

  • Only transmitted frames could be reset. To reset a received frame, you need to reset a transmitted frame from another ECU.

../_images/can_ui_reset_signals.png

Demonstration

../_images/can_ui_demo.gif