.mf4 file import: Missing scaling for one channel

16 visualizaciones (últimos 30 días)
Frank Wuechner
Frank Wuechner el 4 de Mzo. de 2021
Comentada: Frank Wuechner el 26 de Jul. de 2021
Hello,
we are using the vehicle network toolbox extensively for automated measurement analysis. Now I suddenly have one file where everything looks fine in CANape but one specific channel looses the signal scaling when I import it with mdf() and read(). It shows only digits and not float values (32123 Nm instead of 250.12345 Nm) There seems to be nothing else suspicious when I look into it in CANape or the mdf object. When I save the file as .mat from CANape, the scaling is correct.
This worries me a lot as I have no way to identify and catch such import errors!
Is this a bug or is there some other explanation?
See attached mf4 file for and try yourself (I reduced it to the problematic channel only). I am using Matlab R2019b.
Thanks for any help!
  2 comentarios
Siying Liu
Siying Liu el 16 de Jul. de 2021
Hello,
The attached zip folder is empty. Could you provide the file again?
Thanks!
Frank Wuechner
Frank Wuechner el 20 de Jul. de 2021
Hello,
sorry for that and thanks a lot for looking into it. One more try:

Iniciar sesión para comentar.

Respuesta aceptada

Siying Liu
Siying Liu el 21 de Jul. de 2021
Editada: Siying Liu el 21 de Jul. de 2021
Hello Frank,
I understand that the channel in your MDF file contains a linear conversion rule and you were not able to obtain the correctly scaled values using mdf.read from R2019b. This is because processing the MDF conversion rule is not supported until R2021a. Please see the R2021a release note from Vehicle Network Toolbox.
-------------------------------
A temporary workaround would be to manually apply the linear conversion in MATLAB.
If you open your MDF file in Vector MDF Validator, you can check the scale factor for that specific channel:
You could then multiply your data (read by R2019b mdf.read) with this scale number.
Hope this helps!

Más respuestas (0)

Categorías

Más información sobre Vehicle Calibration en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by