13. Step-by-step examples
#Example 1: third-party dash (TX)
A dash accepts, on ID 0x100 (11 bits) at 500 kbit/s, an 8-byte frame with engine speed, engine temperature, throttle position and battery voltage, all in Intel. The dash specification says:
| Signal | Start bit | Bits | Scale | Offset | Unit |
|---|---|---|---|---|---|
| Engine speed | 0 | 16 | 1 | 0 | rpm |
| Engine temperature | 16 | 8 | 1 | −40 | °C |
| Throttle (TPS) | 24 | 8 | 0.4 | 0 | % |
| Battery | 32 | 16 | 0.1 | 0 | V |
- In CAN ports, turn on the port where the dash is connected (in this example, Port B) in RAW mode, 500 kbit/s, FD mode off. The CAN Terminator is on by default: leave it on only if the VCU is at one end of the bus.
- In Customizable CAN, turn the function on and, on the Signals tab, create four signals. In all of them: Bits ordering Intel, Value type Unsigned, Arithmetic channel on. Fill in VCU Channel, Start bit, Length, Scale and Offset according to the table.
- On the Frames tab, in Frame 1: Enabled, ID 100, Extended ID off, Bytes 8, Direction TX, Port B, Period 0.02 s (50 Hz). Check the boxes of the four signals.
- Write the map and turn the VCU off and back on if the port configuration changed.
- Open the CAN Sniffer on Port B, direction TX, Filtered mode, and check the frame.
With 5,432 rpm, 92.5 °C, 50% throttle and 13.8 V, the frame is transmitted as follows:
ID 0x100 38 15 84 7D 8A 00 00 00
RPM T TPS BAT
Engine speed 5,432 is 0x1538, which in Intel appears as 38 15. The temperature is sent as 132 (0x84): 92.5 + 40 = 132.5, truncated to 132. The throttle is sent as 125 (0x7D) and the battery as 138 (0x008A, in Intel 8A 00).
#Example 2: third-party sensor (RX)
A module transmits oil temperature on ID 0x501 (11 bits), every 50 ms, at 500 kbit/s. The manufacturer's DBC has:
BO_ 1281 OIL_MODULE: 8 MODULE
SG_ OIL_TEMP : 7|16@0- (0.1,0) [-50|200] "C" FT700
1281 in decimal is 0x501. The signal starts at bit 7, is 16 bits long, is Motorola (@0), signed (−), with scale 0.1 and offset 0.
- In CAN ports, turn on the port where the module is connected (in this example, Port C of the FT700; the FT470 has only Ports A and B) in RAW mode, 500 kbit/s. Terminator as in Example 1.
- In Customizable CAN, with the function on, create the signal: VCU Channel = Custom measurement #01, Bits ordering Motorola, Start bit 7, Length 16, Value type Signed, Scale 0.1, Offset 0, Arithmetic channel on.
- Configure a frame: ID 501, Extended ID off, Bytes 8, Direction RX, Port C (or the port chosen in step 1), Timeout 0.5 s. Check the signal's box.
- Write the map, turn the VCU off and back on if the port configuration changed and follow the channel in real time.
Expected readings: bytes 03 84 at the start of the frame (900) give 90.0 °C; bytes FF 38 (−200) give −20.0 °C. If the module stops transmitting, after about 0.5 s the channel goes to zero and is marked as having no valid data.
If you have the DBC, you can use Import DBC instead of typing the signal. The import replaces the current Customizable CAN configuration and leaves the imported frames transmitting zeros on Port A: before writing, disable the ones you will not use and set Direction to RX, the Port, the Timeout and the VCU Channel (see the import chapter).
#Example 3: fixed frame (waking up a module)
Some modules only start transmitting after receiving a presence message. Create a signal with VCU Channel None, Bits ordering Intel, Start bit 0, Length 8 and Fixed value A5. In a TX frame with the ID and Extended ID specified in the module's documentation, on the port where it is connected, with Bytes 1 and Period 0.1 s, check that signal's box. The VCU will send byte A5 every 100 ms. The module's answer, if any, is read by an RX frame. On a vehicle's original network, follow the warning in the Presentation.