Hello,
I have the v1 can adapter working and showing information that updates on the CAN Monitor.
I have made a simple XML to test to see if the gauges will work but I think I am missing something.
Here is my XML Code:
The signals are specified from my aftermarket ecu and here is an example for the TPS information.
-
-
<ID_TYPE>STANDARD</ID_TYPE>
0x101
0x7FF
<PAYLOAD_SIZE>8</PAYLOAD_SIZE>
\
\
-
<PAYLOAD_SIZE>8</PAYLOAD_SIZE>
-<PACKED_STRUCTURE>
8
-
TPS
%
<START_BIT>8</START_BIT>
<BIT_LENGTH>8</BIT_LENGTH>
<BYTE_ORDER>BIG_ENDIAN</BYTE_ORDER>
<DATA_TYPE>UNSIGNED</DATA_TYPE>
1
0
0
100
I feel like I am missing something easy, as I have made sure the xml is loaded, I have he proper baud rate and the adapter, and I can see the CAN messages in the monitor and also see them change.
Thanks!
I think your ‘length’ is set wrong in your XML. The length parameter is the value size in bytes within the CAN frame. So in your TPS:
<START_BIT>8</START_BIT>
<BIT_LENGTH>8</BIT_LENGTH>
You should set offset to 1 and length to 1.
Well that doesn’t seem to be it.
I have tried a offset being 0 or 1 and the length 0, 1, or 2 and all the combinations together and it doesn’t read. TPS stays 0
However the original code made the TPS go to 100 but didn’t move.
At 0 TPS I get
0x101 00 00 00 00 00 00 00 00
At 100% I get
0x101 00 00 00 00 00 00 63 00
And can watch the values move as I sweep the pedal.
It seems like the TPS is on frame 7th byte (63hex = 99dec), so offset should be 7 and length 1.
Good news I got it to work…it was an offset of 6 and length of 1. I really have no idea how I am going to relate this to all the other signals as the CAN description file clearly list them in a different way. Sigh