Receiving Freeform CAN messages that are 15 bits long( over 2 bytes)

Comments

2 comments

  • Avatar
    Adrian Barber

    any help on this? I can't believe, that we cant simply specify the free form CAN data as it is in the dbc file?  is this already on a feature request?

    0
    Comment actions Permalink
  • Avatar
    Adrian Barber

    Ive raised this as a feature request. 

     

    Meanwhile, the way we worked around this, as it was solved by Nan @ Murphy in the UK, not us, so it's worthwhile benefit showing the community as I'm sure other will have had a similar issue.

     

    we modify the spec of the 15 bit signal to 16 bits ( 2 full bytes, changing the start bit from 1 to 0)

    Then perform a calc that fires on change as follows: 

    the  1  at the end denotes the bits it needs shifting.

    the 32767 is calculated as:  2 raised to the power of 15, minus 1. Where 2 is base 2,  15 is the number of bits and 1 being the value of 2 raised to power 0.

     

    this then gives us the same value with the calulated vlaue as we see in CANCapture using the DBC file :)

     

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.