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.