The N55 channel managed to put together a recipe for MHD custom logging their oil level (https://www.spoolstreet.com/threads/measuring-oil-level-through-mhd.9335/) and, before that, the N54 channel managed to do the same (https://www.spoolstreet.com/threads/measuring-oil-level-through-mhd.9329/).
I've been trying to get this working for the B58. Perhaps somebody has succeeded with this, can chime in on whether I've got this right...
I'm using a file naming convention like 00003076501103_UserChannels.xml where 00003076501103 is the 'PRG Hex' reported by MHD. I do not know if this name is important, but importing such files succeeds.
The overall file structure appears to follow a formula similar to the N54 and N55 case, namely
<?xml version="1.0" standalone="yes"?>
<ActualValues>
<ActualValue ReqBlock="$measurement-hex-address-according-to-a2l" Size="$size-in-bytes" DataA="$x-coefficient" DataB="$constant" Prefix="$memory-segment-leading-digits-unused" Units="$units" RoundingDigits="$decimal-places" signed="$1-if-signed-otherwise-skip-this-attribute">
</ActualValues>
Here's an example for Dzwt_pf1, the temperature correction component of an overall timing correction:
<ActualValue ReqBlock="51801f14" Size="2" DataA="0.1" DataB="0.0" Prefix="51" Units="°" RoundingDigits="1" signed="1">
<Text xml:lang="en">Dzwt_pf1</Text>
</ActualValue>
This is so because the a2l file declares:
/begin MEASUREMENT
Dzwt_pf1
"Temperaturkorrektur ZW-Klopfgrenze Pfad1"
SWORD
juwcFuc_Dtmczic_mCgfamd_q__aa0o
1
100.
-3276.8
3276.7
FORMAT "%6.1"
ECU_ADDRESS 0x51801F14
/end MEASUREMENT
and
/begin COMPU_METHOD
juwcFuc_Dtmczic_mCgfamd_q__aa0o
"juwcFuc_Dtmczic_mCgfamd_q__aa0o"
RAT_FUNC
"%6.3"
"°"
COEFFS 0. 10. 0. 0. 0. 1.
/end COMPU_METHOD
Here, the COEFFS dictate that the formula for translating the engineering value (timing advance in degrees) to the ECU value (a two byte integer) is ecuval=(10*x + 0)/1 (see https://cdn.intrepidcs.net/support/ASAP2Editor/TabConMethods.htm). This means that to get from the ECU measurement to a logging channel value we have to invert the translation.
Thus the MHD DataA value is f/b = 1/10 = 0.1 and DataB is c/b = 0/10 = 0.
I've been trying to get this working for the B58. Perhaps somebody has succeeded with this, can chime in on whether I've got this right...
I'm using a file naming convention like 00003076501103_UserChannels.xml where 00003076501103 is the 'PRG Hex' reported by MHD. I do not know if this name is important, but importing such files succeeds.
The overall file structure appears to follow a formula similar to the N54 and N55 case, namely
<?xml version="1.0" standalone="yes"?>
<ActualValues>
<ActualValue ReqBlock="$measurement-hex-address-according-to-a2l" Size="$size-in-bytes" DataA="$x-coefficient" DataB="$constant" Prefix="$memory-segment-leading-digits-unused" Units="$units" RoundingDigits="$decimal-places" signed="$1-if-signed-otherwise-skip-this-attribute">
</ActualValues>
Here's an example for Dzwt_pf1, the temperature correction component of an overall timing correction:
<ActualValue ReqBlock="51801f14" Size="2" DataA="0.1" DataB="0.0" Prefix="51" Units="°" RoundingDigits="1" signed="1">
<Text xml:lang="en">Dzwt_pf1</Text>
</ActualValue>
This is so because the a2l file declares:
/begin MEASUREMENT
Dzwt_pf1
"Temperaturkorrektur ZW-Klopfgrenze Pfad1"
SWORD
juwcFuc_Dtmczic_mCgfamd_q__aa0o
1
100.
-3276.8
3276.7
FORMAT "%6.1"
ECU_ADDRESS 0x51801F14
/end MEASUREMENT
and
/begin COMPU_METHOD
juwcFuc_Dtmczic_mCgfamd_q__aa0o
"juwcFuc_Dtmczic_mCgfamd_q__aa0o"
RAT_FUNC
"%6.3"
"°"
COEFFS 0. 10. 0. 0. 0. 1.
/end COMPU_METHOD
Here, the COEFFS dictate that the formula for translating the engineering value (timing advance in degrees) to the ECU value (a two byte integer) is ecuval=(10*x + 0)/1 (see https://cdn.intrepidcs.net/support/ASAP2Editor/TabConMethods.htm). This means that to get from the ECU measurement to a logging channel value we have to invert the translation.
Thus the MHD DataA value is f/b = 1/10 = 0.1 and DataB is c/b = 0/10 = 0.