Open mikesmitti opened 3 years ago
Hello Mike,
it's hard to figure out what is going on. Any way you can send a scrambled file?
Hello Daniel, I will try to gather further information.
Best regards
Here is the traceback leading to the MdFexception (shortened to the important parts):
File "xyz_mf4.py", line 661, in plot_by_parameters mf4_signals = self._mf4file.select(signal_list) File "...\site-packages\asammdf\mdf.py", line 2656, in select virtual_groups = self.included_channels( File "...\site-packages\asammdf\blocks\mdf_v4.py", line 7542, in included_channels group, idx = self._validate_channel_selection(name) File "...\site-packages\asammdf\blocks\mdf_common.py", line 113, in _validate_channel_selection raise MdfException(f'Channel "{name}" not found')
It seems like the missing signal is not found in mdf_common.channels_db.
However, looking into the next file, which has the completely same setup and dbc/arxml files, all works perfectly well
Best regards
Edit: it is all recorded with CANoe 12. Even the same measurement start. Just stop and start the logging block once. Nothing else changed.
After further investigation, I think it is a problem with multiplexing. Since there are 2 PDUs mapped to the same frame, the second PDU is not found. The first PDU is always found.
The frame has one outer PDU, which contains 8 inner PDUs, in which there are the different signals. Every inner PDU has its own muxer_id. Maybe the problem arises when there is more than one inner PDU in the actual frame? Is it possible for asammdf to read TWO PDUs from the very same frame (e.g. the SAME bus message)?
Some background: I do the stacking as mentioned here #420 After stacking the original and the extract_bus_logging, i do the select. I tried the select on just the original data, but that does not work at all.
For now we just handle the signal multiplexing inside a PDU, but there must be some other mechanism for multiplexing the PDU's as you have in your file. I can't make progress on this issue without a sample file
I will try to make a sample configuration, but that may take some days.
Best regards
Hello,
The current release of canmatrix will not allow multiple PDU decoding as they are considered as multiplexed frame. so only first one will be decoded. so imo, even if Daniel is using his own code to decode CAN frames, he cannot know if frame is a multiplexed frame or a pdu container frame with canmatrix<=0.9
Here's the related issue: https://github.com/ebroecker/canmatrix/issues/575 And merged PR: https://github.com/ebroecker/canmatrix/pull/576
hope this helps :-)
++
@jazi007 thank you for the input. Is there any way you could share such an arxml file via e-mail? I can't figure this out from the description alone
@danielhrisca you have an example in canmatrix repo:
it's only one frame but I think it's enough to understand difference between multiplexed frame and contained PDU ones
Hello,
I upgraded to asammdf 7.0.7 (from 6.2.0) today and did a new try on that topic. Result is that extract_bus_logging does leave an empty opbject, wheras in 6.2.0 it worked properly.
REsulting on that, select, does raise an exception.
I tried it with a minimal example as well:
` mdffile = MDF(file) arxml_object = load_can_database(Path(arxml)) dbc_object = load_can_database(Path(dbc)) dbf = {"CAN" : [(arxml, arxml_object), (dbc, dbc_object)]} mdftemp = mdffile.extract_bus_logging(database_files=dbf)
vals = mdftemp.select(['xyz']) ` bus_logging_map and channels_db are empty in mdftemp
This is related to this issue:
Python version
('python=3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit ' '(AMD64)]') 'os=Windows-10-10.0.19042-SP0' 'numpy=1.20.3' 'asammdf=6.2.0'