Import external DBC Multiplier – Divisor – Adder – Resolution
Hi I am trying to understand how an imported DBC is interpreted in the dash.
As an example I am using a CAN IMU unit from Bosch. All signals are 4 Bytes long.
Accel add giros offset (Adder): 32768 (x8000).
Accel scale: 0.0001274 g/digit
Giro scale: 0.005 °/s/digit
See first image for manufacturer data
-------------------------------
Using BusMaster I created a DBC file with all the data exchange on the vehicle CAN.
To get the right value in BusMaster I used:
Accel scale: 0.000127
Accel Offset: -4.17 -> (32768 * 0.0001274)
Giro scale: 0.005
Giro Offset: -163.84 -> (32768 * 0.005)
See image at the end for the BusMaster channel setup
--------------------------------
Exporting the setup to a DBC file I get the following.
BO_ 376 x178_IMU_AY_RY: 8 Vector__XXX
SG_ IMU_AY : 32|16@1+ (0.000127,-4.17) [-4.17|4.15295] "g" Vector__XXX
SG_ IMU_RY : 0|16@1+ (0.005,-163.84) [-163.84|163.835] "deg/s" Vector__XXX
-------------------------------
Importing the DBC file to the Dash, I get the following:
IMU AY
Base resolution: 0.0001 G
Offset: 4 -> (Byte index 4) -> ok
Length: 2 -> (2 Byte) -> ok
Output Length: 4 ( ?? 4 hex characters’ ??) ->??
Bit Mask (HEX): FFFF -> (All bits) -> ok
Multiplier: 14, Divisor: 11 -> (14/11 = 1.2727) -> ok close enough to 0.000127 (1.2727*0.0001 resolution)
Adder: 23836 -> ?? Can’t figure it out ??
See image at the end
IMU RY
Base resolution: 0.1 Hz -> Is 1 Hz equal to 1 rotation/s (360°/s) ???
Offset: 0 -> (Byte index 0) -> ok
Length: 2 -> (2 Byte) -> ok
Output Length: 4 ( ?? 4 hex characters’ ??) ->??
Bit Mask (HEX): FFFF -> (All bits) -> ok
Multiplier: 1, Divisor: 2700 -> (1/2700 = 0.003703) -> ?? Can’t figure it out ??
Adder: -5 -> ?? Can’t figure it out ??
See image at the end
-------------------------------------
Following a topic about dbc file on the forum the equation should be
“ (Raw CAN Value x Multiplier / Divisor + Adder) x Base Resolution ”
IMU AY issues
At a Raw CAN value of 32768 I should have 0.0000 G Force
(Raw CAN Value x Multiplier / Divisor + Adder) x Base Resolution
(32768 x 14 / 11 – 41705) x 0.0001 = 0.0000 G Force
The issue is that I cannot use an “Adder” value larger/smaller than -32768 / +32767
See the sixth image
IMU RY confusion
Should I divide the “Multiplier”, “Divisor” and “Adder” by 360 to end up with Hz?
------------------------------------
Can anyone help me on that?
Sure I could do try and error until I figure this out, but I it much better to have right the first time.
Thanks, Frank