CAN ID number in byte for more outputs with LinkECU

Hey guys!

As requested in the LinkECU thread here
https://www.realdash.net/forum/viewtopic.php?f=15&t=643&p=4332#p4332
it would be cool to set one byte as the frame ID.

I just want to meantion it here, so it’s on the feature request page :slight_smile:

Cheers, Toni

Yes, we did have this discussion with Link some time back. Will raise this to todo list.

This is interesting, I am mapping the data of a Fueltech FT450, some data are identified by a Byte, which they call MeasureID.

I do have working prototype for this, hope to publish Beta soon for you to test. Meanwhile, what do you think of describing the ‘MeasureID’ this way in RealDash XML:

    <frame id="5533" endianess="big" idFrom="0x3E8,0,2">
      <value targetId="37" offset="2" length="2"></value> <!-- RPM -->
      <value targetId="31" offset="4" length="2" conversion="V-100"></value> <!-- MAP -->
      <value targetId="14" offset="6" length="1" conversion="V-50"></value> <!-- CLT -->
      <value targetId="27" offset="7" length="1" conversion="V-50"></value> <!-- IAT -->
    </frame>

The new part of the XML would be idFrom=“CAN frame id, offset, length” attribute on each frame. Values in idFrom are:

  1. the real CAN frame ID where data is coming from.
  2. offset in frame data where frame is is read from.
  3. length (in bytes) of the frame id value in frame data.

Note that if ‘idFrom’ attribute is used, the ‘id’ attribute in frame refers to the id value coming in frame data, not the actual frame CAN ID.

Would this work well on your use-cases?

Sounds good to me, but I think the idFrom has to be an id offset you add to the id.
So if you set the FrameID to 1, it adds +1 to the ID whats used as the “normal” ID.
Then you can set the FrameID in Frame 1 to 1, so it’s ID+1, next Frame to 2, so ID+2 and so on.
That way you could use more parameters like oil temp etc. with the 6 streams that are allowed to use with the Link.

Highest FrameID possible is 255 in the Link Software.

I hope my english isn’t to bad for this to explain :smiley:

I’m not sure I understand what you mean. Can you link a document to Link ECU CAN that works that way?

This is now in 1.8.7-BETA1:
http://realdash.net/forum/viewtopic.php?f=2&t=1122&sid=035582737a8ee22674290f076bab1502

I hope this picture can explain what I mean.
The main ID here is 1000 and the first byte there is the FrameID which I think is added to the main ID.
It’s called compound frame at LinkECU.
link_display_compount_CAN.JPG
My Link CAN setup page for stream 1 and frame 1 looks like this for example
link_CAN_setup_page2.JPG
link_CAN_setup_page.JPG
So for one stream it’s only one CAN ID to choose (here 1520), but inside the stream, you can add up to 256 Frames. Therefor you have to ad the Frame ID (here 1) and the Frame ID position (here 0).

So I think the xml has to look like this.

--> for Frame 1 --> for Frame 2

so if the Frame ID in the first byte is 1, it’s 1520+1=1521, if the Frame ID is 2, it’s 1520+2=1522 and so on.

I hope this explains it a bit.

Yes, this clarifies a lot, thank you.

With current Beta implementation in RealDash, you can achieve this by using frame id as what is the id in data 0:

<frame id="1" endianess="big" idFrom="1520,0,1"> --> for Frame 1
<value targetId="151" units="Bar" offset="2" length="2" conversion="V/10"></value> <!-- OilPress -->
<value targetId="254" units="Lambda" offset="4" length="2" conversion="V/1000"></value> <!-- Lambda -->
<value targetId="93" units="Number" offset="6" length="2" conversion="ID254-V/1000"></value> <!-- Lambda-Diff -->
</frame>

<frame id="2" endianess="big" idFrom="1520,0,1"> --> for Frame 2
<value targetId="43" units="%" offset="2" length="2" conversion="V/10-100"></value> <!-- CLL -->
<value targetId="236" units="%" offset="4" length="2" conversion="V/10"></value> <!-- Prim DC -->
<value targetId="237" units="%" offset="6" length="2" conversion="V/10"></value> <!-- Sec DC -->
</frame>

Only downside is that the frame id in data 0 must be unique between all frames. I will think about how to improve this.

Maybe the ‘compound frames’ could be specified like this in XML:

<frame id="1520:1,0,1" endianess="big"> --> for Frame 1
<value targetId="151" units="Bar" offset="2" length="2" conversion="V/10"></value> <!-- OilPress -->
<value targetId="254" units="Lambda" offset="4" length="2" conversion="V/1000"></value> <!-- Lambda -->
<value targetId="93" units="Number" offset="6" length="2" conversion="ID254-V/1000"></value> <!-- Lambda-Diff -->
</frame>

<frame id="1520:2,0,1" endianess="big"> --> for Frame 2
<value targetId="43" units="%" offset="2" length="2" conversion="V/10-100"></value> <!-- CLL -->
<value targetId="236" units="%" offset="4" length="2" conversion="V/10"></value> <!-- Prim DC -->
<value targetId="237" units="%" offset="6" length="2" conversion="V/10"></value> <!-- Sec DC -->
</frame>

So frame id attribute would be CAN_ID : FRAME_ID, FRAME_ID_OFFSET, FRAME_ID_LENGTH

Ahhh okay now I get it!!

That’s beautiful!! That should word! I will try to test this this weekend. Thank you very much!

And the idea with “1520:2,0,1” sounds very good.

Can you tell me if the old version of CAN_XML will work if I update the beta?
I have not yet fully figured out what this is for!
As I understand it, you have now taught RealDash to bypass unspecified bytes in a frame, right?
Betting on productivity gains?
I really don’t understand …

I tried to use it but the application closes.

  <frame  id="84" endianess="big" idFrom="0x140810ff,4,1">
      <value name="Testeid" offset="2" length="2"></value> <!-- RPM -->
      
    </frame>

rdcan_2021-01-07_17-05-35.csv (485 KB)

Will the arduino sketch change now? or will it not affect arduino?

This change should not affect previous implementations in any way as it is an extension.

Ok, I will check with your XML file.

The XML parsing crash fixed and format how the Composite ID is defined is changed in 1.8.7-Beta2:
http://realdash.net/forum/viewtopic.php?f=2&t=1126&sid=5759bc671a7abf5cc4b1f7681f7d66eb

Ok, I tested Beta 2, I am able to map the data, it looks fine for me. Thank you very much. :smiley:

Tested this too with my Link ECU. Works perfect! Thank you very much! Really appreciate it!