Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexray recorded mf4 file not being exported #273

Open
surendrasah opened this issue Nov 28, 2019 · 10 comments
Open

Flexray recorded mf4 file not being exported #273

surendrasah opened this issue Nov 28, 2019 · 10 comments

Comments

@surendrasah
Copy link

Hi,
I have recorded mf4 file on flexray. When i tried exporting it in csv or any other format with GUI tool, it throws exception. Can this tool be used for flxray recorded mf4 file or not?. If yes, then whats the problem. please help me out.

I am using Windows 10 and python 3.7 on Anaconda.

2019-11-28, 16:13:34

<class 'Exception'>
Traceback (most recent call last):
File "C:\Users\ssah\AppData\Local\Continuum\anaconda3\envs\py3.7\lib\site-packages\asammdf\gui\utils.py", line 150, in run
self.output = self._target(*self._args, **self._kwargs)
File "C:\Users\ssah\AppData\Local\Continuum\anaconda3\envs\py3.7\lib\site-packages\asammdf\mdf.py", line 1116, in export
ignore_value2text_conversions=ignore_value2text_conversions,
File "C:\Users\ssah\AppData\Local\Continuum\anaconda3\envs\py3.7\lib\site-packages\asammdf\mdf.py", line 3557, in to_dataframe
for channel_index in self._included_channels(group_index)
File "C:\Users\ssah\AppData\Local\Continuum\anaconda3\envs\py3.7\lib\site-packages\asammdf\mdf.py", line 372, in _included_channels
f"CAN_DataFrame or CAN_ErrorFrame not found in group {index}"
asammdf.blocks.utils.MdfException: CAN_DataFrame or CAN_ErrorFrame not found in group 4


File "C:\Users\ssah\AppData\Local\Continuum\anaconda3\envs\py3.7\lib\site-packages\asammdf\gui\widgets\file.py", line 1381, in export
progress=progress,
File "C:\Users\ssah\AppData\Local\Continuum\anaconda3\envs\py3.7\lib\site-packages\asammdf\gui\utils.py", line 117, in run_thread_with_progress
raise Exception(thr.error)

@danielhrisca
Copy link
Owner

Hello @surendrasah

you should not get this error, this is strange. Can you send the file so I can have a look over it?

@surendrasah
Copy link
Author

surendrasah commented Nov 29, 2019

Hi @danielhrisca
Thanks for quick response. I have recorded this trace using CANOE on Flexray. I want to export the file as CSV so that i can extract some of signal value like velocity, steering etc.

I would really appreciate if you can show or help to read this file to extract the value or export it as CSV.

Thanks

danielhrisca added a commit that referenced this issue Nov 29, 2019
@danielhrisca
Copy link
Owner

@surendrasah
check the new development branch code

@surendrasah
Copy link
Author

Hi @danielhrisca ,
thanks, I will check the new development branch.
Instead of using gui, I want to read it through a program. Is there any example? There are lot of examples in you developed tool but I am not able to figure out which one is required to

  1. export the mf4 file to csv or
  2. read the file and extract all signal value.

I would really appreciate your input on this.

Thanks
Surendra

@surendrasah
Copy link
Author

Hi @danielhrisca
I am not sure what i am missing but i am still getting same again and again after using the new release v 5.14.1 . if you can export it to csv, would you be able to help me with steps.

Thanks
Surendra

@danielhrisca
Copy link
Owner

pip install https://github.com/danielhrisca/asammdf/archive/development.zip -I --no-deps to install the development branch code

then

mdf = MDF('file.mf4')
mdf.export('csv', 'export.csv', single_time_base=True, raster=0.1)

you may want to tune the raster argument

@surendrasah
Copy link
Author

Hi @danielhrisca
I guess, I was not clear with my question. I want to extract signals from mdf4 file and export it into CSV file.
The attached CSV file which i got it by using above command is not at all arranged and these data are not signal values.
I am looking for signal name with their values like ESP_v_Signasl for velocity.
These are flexray based mdf4 file. For CAN, i can see that you need .dbc file to get better output.
So for Flexray, do we have any function to use the .xml databse file of flexray to extract the value?
I have alread sent you the mf4 file. please help me to extract the signal values.

from asammdf import MDF, Signal
mdf = MDF('20161129_IN-x1234_Erprobungsort_0000032.mf4')
speed = mdf.get('ESP_v_Signal')
print(speed)

Error: : Channel "ESP_V_Signal" not found.

I can see this signal name in CANOE tool.
export.zip

@danielhrisca
Copy link
Owner

Please see issue #259 . We rely on canmatrix for DBC parsing, but there is no fibex parser available; as such there is no extract_flexray_signal method

@surendrasah
Copy link
Author

So, it means that flexray signal cannot be extracted. Is there a way , you know of, to extract these signal. I have the fibex file, mf4 file but could not find any way to extract signals.

@danielhrisca
Copy link
Owner

@surendrasah @maxdd

it looks like canmatrix is starting to add Flexray and Eth support for arxml databases ebroecker/canmatrix#426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants