Unexpected result for conversion using V>0

For some reason Check Engine Light is 1 but Malfunction Flags is 0. What gives? Since Check Engine Light has identical mapping to Malfunction Flags, the values should both be zero. How does V>0 resolve to 1?

<frame id="0x387" endianness="big">
      <value name="Malfunction Flags" offset="0" length="4"></value>
      <value targetId="65" name="Check Engine Light" offset="0" length="4" units="bit" conversion="V>0"></value>
</frame>

Did some further testing. I tried ā€œV!=0ā€, ā€œV>0ā€ and also tried mapping the check engine light to the full 4 byte frame of malfunction flags like below:

<frame id="0x387">
<value targetId="65" name="Check Engine Light" offset="0" length="4"></value>
</frame>

But Check Engine Light remains 0 even when frame 0x387 contains 0x00 0x08 0x00 0x00 according to the CAN monitor in RealDash.

Not sure if you really mean conversion=ā€œV>1ā€? That means that value will be 1 if that 4 byte value is less than 1. As value is not marked as signed value ā€œV>1ā€ will never be true.

What Iā€™m attempting to do is:
If 4-byte malfunction flags has any value other than 0, Check Engine Light is 1. Otherwise Check Engine Light should be 0.

<value targetId="65" offset="0" length="4" conversion="V != 0"></value>

The above should work just fine for that.

1 Like