.mf4 file import: Missing scaling for one channel

13 次查看(过去 30 天)
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 个评论
Siying Liu
Siying Liu 2021-7-16
Hello,
The attached zip folder is empty. Could you provide the file again?
Thanks!

请先登录,再进行评论。

采纳的回答

Siying Liu
Siying Liu 2021-7-21
编辑:Siying Liu 2021-7-21
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!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Vehicle Calibration 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by