ebroecker / canmatrix

Converting Can (Controller Area Network) Database Formats .arxml .dbc .dbf .kcd ...
BSD 2-Clause "Simplified" License
933 stars 401 forks source link

Physical Signal Range in XLSX Document #797

Open ganralf75 opened 5 months ago

ganralf75 commented 5 months ago

Hello,

I have a stupid question regarding generation of XLSX document out of a arxml / dbc.

I have considered that when a CAN signal contains a value table (e.g. w/ 2 values ERR & SNA) the physical range (e.g. 0...1000km) of the signal is not visible in XLSX document. Instead only the values of the value table will be documented.

Example w/ value table entries ERR & SNA but missing physical range in column T grafik

Example w/ no signal value table defined but physical range is documented grafik

Is there any parameter that I can use so that the physical signal range will also be documented in addition to the value table entries?

thanks in advance! ganralf75

ebroecker commented 5 months ago

Hi @ganralf75, this should be possible with: --additionalSignalAttributes min,max

ganralf75 commented 5 months ago

thanks a lot @ebroecker! It works :-)

ganralf75 commented 5 months ago

Hi @ebroecker! I tried --additionalSignalAttributes min,max w/ arxml file and it seems that the min and max values are not plausible. Is it a bug or did I someting wrong?

In this example signal.max should be 25.5barg image

kind regards, ganralf75

ebroecker commented 5 months ago

Hi @ganralf75 not easy to say without the sources...

You could additionally add signal.factor and signal.offset - so we can see what's calculated

ganralf75 commented 5 months ago

Hi @ebroecker, I added factor and offset. Both seem to be okay.

grafik

I looks like the max is calculated from physical max (which is 25barg) and not from raw max (which is 250).

Signal configuration from Vector AUTOSAR Explorer grafik

Signal Debugging Information grafik

ebroecker commented 5 months ago

Hi @ganralf75 maybe the arxml is parsed the wrong way. We had some issue using 'random' physical or internal contraints from 'ARXML'.

Maybe this bug is fixed with https://github.com/ebroecker/canmatrix/pull/779/files - but is not fixed right?

Maybe you could extract the contraints for this signal out of the ARXML, so we can isolate the problem ?

pempem98 commented 2 months ago

Look like the physical min/max was calculated twice (initial value was calculated correctly), it would be better if we have a sample input to debug