XML File frames definition

Hi,
I created a xml file for decoding canbus of multiple products

I was trying to add multiple because I have a set of data that I would like to use with but not for the other one.

When I add multiple frames sections it only recognize the first one and ignore the other

Is it possible to do that?
If not I guess I need to add multiple devices on same usb port with different definition files?

Thanks

Example

<frames baseId="1536"> 
<frame id="0" endianess="big">
      <value targetId="33" units="s" 	offset="0" length="2"></value> <!-- Seconds ECU has been on  -->
      <value targetId="35" units="ms" 	offset="2" length="2" conversion="V/1000"></value> <!-- Main pulsewidth bank 1  -->
      <value targetId="36" units="ms" 	offset="4" length="2" conversion="V/1000"></value> <!-- Main pulsewidth bank 2  -->
      <value targetId="37" units="RPM" 	offset="6" length="2"></value> <!-- RPM  -->
    </frame>
</frames>

<frames>
<frame id="0x2000FFEF">
  <value targetId="164" offset="1" length="1" startbit="1" bitcount="1"></value>
</frames>

Or is it better to simply all multiple connections to define multiple xml files?

Only one ‘frames’ tag is supported per XML file, so this should work:

<frames> 
  <frame id="1536" endianess="big">
    <value targetId="33" units="s" offset="0" length="2"></value> <!-- Seconds ECU has been on  -->
    <value targetId="35" units="ms" offset="2" length="2" conversion="V/1000"></value> <!-- Main pulsewidth bank 1  -->
    <value targetId="36" units="ms" offset="4" length="2" conversion="V/1000"></value> <!-- Main pulsewidth bank 2  -->
    <value targetId="37" units="RPM" offset="6" length="2"></value> <!-- RPM  -->
  </frame>
  <frame id="0x2000FFEF">
    <value targetId="164" offset="1" length="1" startbit="1" bitcount="1"></value>
  </frame>
</frames>

Updated: removed the baseId from frames tag.

On the second frame, an offset of 1536 is applied so If I want to do that, I need to remove it from the second frame id value.

Yes, just remove the ‘baseId’ and set the real CAN id for each frame.

Ok this was my question because I had like 40 frames that I need to offset for only one can device but I also have other can devices that doesn’t need this offset. This is why I was asking.

Is it better to have multiple XML definitions then?

Depends on a setup. If each device lives in their own CAN bus, its best to keep them separate and use multiple connections to read the data. If all frames are connected to same CAN bus, only option is to make an combined XML file.

Adding the same device multiple times with each time a different XML file wont work?
I would be great to support multiple in a same xml file then.

You are limited to one XML file per interface, but you can add as many frames as you want per XML file. As long as they’re on the same bus and use the same connection it doesn’t matter how many devices there are. Just put all the frames between the one set of “frames” tags. Don’t use the base id in “frames”, instead specify the id for each “frame”.

ok this is what I did and it worked.

But I have a lot of can messages and I had to offset them all for this specific device but not the other can frame from the other devices.
It would be great to be able to offset only a set of data so I dont have to manually edit 60 lines and risk to make mistakes.

Thanks!

1 Like

At some point we had plans for a feature to add multiple XML files for the connection. I think we dropped it due user interface complexities, and due the fact that anyone that actually needs this feature is considered such power user that they have no problem working with XML files.

Now that you can store your XML files in MRD and easily download them into RealDash connection settings the need for multi-xml has been even lower.

And as you may know, we are actively working on ‘Connection Editor’ to the MRD that allows you could create connection XML files with your web browser, I think its better that we concentrate our efforts to that one.

1 Like

Yes I agree. I think the connection editor is a great idea!

1 Like

I would love to be able to edit the XML in browser and have it immediately update in the car. The current workflow for changing the XML takes too many buttons presses.

1 Like