I am working with the Softing CAN-AC2 in xPC Target 3.4 (R2008a).
For the decoding I am using an embedded MATLAB function for the decoding. In this function I use a typecast to split the 64-bit double into two uint32s.
Most of the time the decoding runs without any issues. However, sometimes the CAN data is formatted such that it actually represents a NaN if interpreted as a double.
Specifically a sNaN (first 12-bits are 1’s, and a one of the remaining bits is also 1). When this sNaN double is typecast to two uint32s, the sNaN is silently converted to a qNaN, which changes 1 bit of the data, thus corrupting it.
And my decoding does not work anymore.
Best Answer