.mf4 file import: Missing scaling for one channel
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Frank Wuechner
le 4 Mar 2021
Commenté : Frank Wuechner
le 26 Juil 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 commentaires
Siying Liu
le 16 Juil 2021
Hello,
The attached zip folder is empty. Could you provide the file again?
Thanks!
Réponse acceptée
Siying Liu
le 21 Juil 2021
Modifié(e) : Siying Liu
le 21 Juil 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!
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Vehicle Calibration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!