Why is extractedData[7] and bitData[0][7] giving different values?

Hi,
I am new to Arduino. I am trying to put the values from bitData into extractedData as per the startbits[x[i]] and lengths[x[i]]. I just want to know the extractedData[7] and bitData[0][7] are giving different values?

#include <SPI.h>
#include <string.h>
#include <CSV_Parser.h>

#define CAN_2515

#if defined(SEEED_WIO_TERMINAL) && defined(CAN_2518FD)
const int SPI_CS_PIN  = BCM8;
const int CAN_INT_PIN = BCM25;
#else

const int SPI_CS_PIN = 3; //Arduino MKR Shield = 3
const int CAN_INT_PIN = 7; //Arduino MKR Shield = 7
#endif

#ifdef CAN_2518FD
#include "mcp2518fd_can.h"
mcp2518fd CAN(SPI_CS_PIN);
#endif

#ifdef CAN_2515
#include "mcp2515_can.h"
mcp2515_can CAN(SPI_CS_PIN);
#endif

char * dbc =  "Name;Message;Multiplexing/Group;Startbit;Length [Bit];Byte Order;Value Type;Initial Value;Factor;Offset;Minimum;Maximum;Unit;Value Table;Comment;Message ID;GenSigInactiveValue;GenSigSendType;GenSigStartValue\n"
              "Name;Message;Multiplexing/Group;Startbit;Length [Bit];Byte Order;Value Type;Initial Value;Factor;Offset;Minimum;Maximum;Unit;Value Table;Comment;Message ID;GenSigInactiveValue;GenSigSendType;GenSigStartValue\n"
              "BMS_AncVolt_V;BMS_PackInfo3;-;16;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Fuel Cell Voltage - measured by HVM;0x71D;0;Cyclic;0\n"
              "BMS_BalancingStatus_enum;BMS_Status2;-;12;4;Intel;Unsigned;0;1;0;0;15;enum;VtSig_BMS_BalancingStatus_enum;Balancing state;0x291;0;Cyclic;0\n"
              "BMS_Cell_ChrgCycles_num;BMS_PackInfo5;-;0;16;Intel;Unsigned;0;0.1;0;0;6553.4;num;-;-;0x71F;0;Cyclic;0\n"
              "BMS_Cell_TempAvg_degC;BMS_CellTemperatureInfo;-;48;8;Intel;Signed;0;1;0;-128;127;degC;-;Average cell temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMax_CmuId_num;BMS_CellTemperatureInfo;-;32;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with highest temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMax_degC;BMS_CellTemperatureInfo;-;24;8;Intel;Signed;0;1;0;-128;127;degC;-;Maximum cell temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMax_Id_num;BMS_CellTemperatureInfo;-;40;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with highest temperature.;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMin_CmuId_num;BMS_CellTemperatureInfo;-;8;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with lowest temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMin_degC;BMS_CellTemperatureInfo;-;0;8;Intel;Signed;0;1;0;-128;127;degC;-;Minimum cell temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMin_Id_num;BMS_CellTemperatureInfo;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with lowest temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_VoltDelta_V;BMS_PackInfo1;-;0;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Cell voltage difference between minimum and maximum cell voltage;0x71B;0;Cyclic;0\n"
              "BMS_Cell_VoltMax_CmuId_num;BMS_CellVoltageInfo;-;48;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with maximum voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMax_Id_num;BMS_CellVoltageInfo;-;56;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with maximum voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMax_V;BMS_CellVoltageInfo;-;32;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Maximum cell voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMin_CmuId_num;BMS_CellVoltageInfo;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with minimum voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMin_Id_num;BMS_CellVoltageInfo;-;24;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with lowest voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMin_V;BMS_CellVoltageInfo;-;0;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Minimum cell voltage;0x713;0;Cyclic;0\n"
              "BMS_Chrg_CapacityRemain_Ah;BMS_Status2;-;32;8;Intel;Unsigned;0;0.2;0;0;51;-;-;Battery Pack Charge Capacity Remaining in Ah;0x291;0;Cyclic;0\n"
              "BMS_Chrg_TmRemain_min;BMS_PackInfo5;-;16;16;Intel;Unsigned;0;1;0;0;65534;minutes;-;-;0x71F;0;Cyclic;0\n"
              "BMS_ChrgComplete_bool;BMS_Status2;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS charge complete flag. 0 = Not complete, 1 = Complete.;0x291;0;Cyclic;0\n"
              "BMS_ChrgCurLim30s_A;BMS_Limits2;-;16;16;Intel;Unsigned;0;0.1;0;0;6553.5;A;-;Charge Current Limit for 30 second events / continuous;0x296;0;Cyclic;0\n"
              "BMS_ChrgCurrLim30s_enum;BMS_FltInfo_Derate1;-;48;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_ChrgCurrLim30s_enum;Charge Current Limit Enumeration for 30 second events / continuous;0x73F;0;Cyclic;0\n"
              "BMS_ChrgCurrReq_A;BMS_Limits1;-;32;16;Intel;Unsigned;0;0.1;0;0;6553.5;A;-;Current request for charging in Amps;0x295;0;Cyclic;0\n"
              "BMS_ChrgModeReqFb_bool;BMS_Status1;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;Charge mode request acknowledgement feedback (0 = charge mode not requested feedback, 1 = charge mode requested feedback);0x290;0;Cyclic;0\n"
              "BMS_ChrgPwrLim10s_enum;BMS_FltInfo_Derate1;-;16;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_ChrgPwrLim10s_enum;Regen Current Limit Enumeration for 10 second events / instantaneous;0x73F;0;Cyclic;0\n"
              "BMS_ChrgPwrLim10s_W;BMS_Limits1;-;16;16;Intel;Unsigned;0;20;0;0;1310700;W;-;Regen Current Limit for 10 second events / instantaneous;0x295;0;Cyclic;0\n"
              "BMS_ChrgVolt_V;BMS_PackInfo3;-;32;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Anc Voltage - measured by HVM;0x71D;0;Cyclic;0\n"
              "BMS_ChrgVoltMax_V;BMS_Limits1;-;48;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Maximum charging voltage of pack;0x295;0;Cyclic;0\n"
              "BMS_CMU1_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_voltage1;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage10;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage11;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage12;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage13;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage14;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage2;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage3;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage4;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage5;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage6;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage7;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage8;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage9;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_voltage1;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage10;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage11;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage12;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage13;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage14;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage2;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage3;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage4;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage5;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage6;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage7;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage8;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage9;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_voltage1;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage10;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage11;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage12;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage13;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU3_voltage14;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU3_voltage2;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage3;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage4;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage5;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage6;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage7;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage8;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage9;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU4_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_voltage1;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage10;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage11;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage12;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage13;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage14;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage2;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage3;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage4;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage5;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage6;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage7;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage8;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage9;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_voltage1;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage10;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage11;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage12;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage13;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage14;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage2;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage3;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage4;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage5;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage6;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage7;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage8;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage9;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_voltage1;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage10;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage11;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage12;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage13;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage14;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage2;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage3;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage4;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage5;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage6;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage7;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage8;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage9;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU7_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_voltage01;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage02;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage03;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage04;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage05;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage06;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage07;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage08;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage09;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage10;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage11;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage12;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage13;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage14;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_voltage1;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage10;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage11;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage12;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage13;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage14;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage2;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage3;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage4;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage5;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage6;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage7;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage8;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage9;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Voltages3;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x509;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Voltages2;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x508;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Voltages1;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x507;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Temp1;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x500;0;Cyclic;0\n"
              "BMS_Cool_Emgncy_Req_bool;BMS_Status2;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Emergency cooling request;0x291;0;Cyclic;0\n"
              "BMS_Cool_None_Req_bool;BMS_Status2;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS no cooling request;0x291;0;Cyclic;0\n"
              "BMS_Cool_Normal_Req_bool;BMS_Status2;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Normal cooling request;0x291;0;Cyclic;0\n"
              "BMS_Counter_num;BMS_Status1;-;8;4;Intel;Unsigned;0;1;0;0;15;count;-;4 bit continuously incrementing counter. Wraps around to 0 after 15.;0x290;0;Cyclic;0\n"
              "BMS_Counter_num;BMS_Status2;-;8;4;Intel;Unsigned;0;1;0;0;15;count;-;4 bit continuously incrementing counter. Wraps around to 0 after 15.;0x291;0;Cyclic;0\n"
              "BMS_Dischrg_CapacityRemain_Ah;BMS_Status2;-;24;8;Intel;Unsigned;0;0.2;0;0;51;-;-;Battery Pack Discharge Capacity Remaining in Ah;0x291;0;Cyclic;0\n"
              "BMS_DischrgPwrLim10s_enum;BMS_FltInfo_Derate1;-;0;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_DischrgPwrLim10s_enum;Discharge Current Limit Enumeration for 10 second events / instantaneous;0x73F;0;Cyclic;0\n"
              "BMS_DischrgPwrLim10s_W;BMS_Limits1;-;0;16;Intel;Unsigned;0;20;0;0;1310700;W;-;Discharge Current Limit for 10 second events / instantaneous;0x295;0;Cyclic;0\n"
              "BMS_DischrgPwrLim30s_enum;BMS_FltInfo_Derate1;-;32;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_DischrgPwrLim30s_enum;Discharge Current Limit Enumeration for 30 second events / continuous;0x73F;0;Cyclic;0\n"
              "BMS_DischrgPwrLim30s_W;BMS_Limits2;-;0;16;Intel;Unsigned;0;20;0;0;1310700;W;-;Discharge Current Limit for 30 second events / continuous;0x296;0;Cyclic;0\n"
              "BMS_EmgncyCttrOpening_bool;BMS_Status1;-;15;1;Intel;Unsigned;0;1;0;0;1;bool;-;Emergency contactor opening warning (0 = contactors not able to open, 1 = contactors about to open due to emergency);0x290;0;Cyclic;0\n"
              "BMS_FltDisbl_Act_bool;BMS_Status2;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Disable Fault is active;0x291;0;Cyclic;0\n"
              "BMS_FltDrate_Act_bool;BMS_Status2;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Derate Fault is active;0x291;0;Cyclic;0\n"
              "BMS_FltLmpHm_Act_bool;BMS_Status2;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Limp Home Fault is active;0x291;0;Cyclic;0\n"
              "BMS_FltWarn_Act_bool;BMS_Status2;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Warn Fault is active;0x291;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_0_bool;BMS_FltInfo_Sfty1;-;9;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 0...;0x72A;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_1_bool;BMS_FltInfo_Sfty1;-;10;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 1...;0x72A;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_2_bool;BMS_FltInfo_Sfty1;-;11;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 2...;0x72A;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_3_bool;BMS_FltInfo_Sfty1;-;12;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 3...;0x72A;0;Cyclic;0\n"
              "BMS_HVBattTotalCapacity_kWh;BMS_PackInfo1;-;16;12;Intel;Unsigned;0;0.1;0;0;102.35;kWh;-;Total battery capacity in kWh (energy content)....;0x71B;0;Cyclic;0\n"
              "BMS_HvBus1_Tract_OnFb_bool;BMS_Status1;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 1 (Traction) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus2_Chrg_OnFb_bool;BMS_Status1;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 2 (Fuel Cell) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus3_Anc_OnFb_bool;BMS_Status1;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 3 (Ancillary) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus4_Null_OnFb_bool;BMS_Status1;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 4 (Not Used) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus5_Null_OnFb_bool;BMS_Status1;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 5 (Not Used) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_IsolDisbl_ReqFb_bool;BMS_Status1;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;Isolation monitor disable request feedback (0 = requested enabled, 1 = requested disabled);0x290;0;Cyclic;0\n"
              "BMS_IsolVal_kohm;BMS_PackInfo2;-;32;16;Intel;Unsigned;0;1;0;0;65535;kohm;-;Isolation Value in kohm;0x71C;0;Cyclic;0\n"
              "BMS_PackCurr_A;BMS_Status1;-;40;16;Intel;Signed;0;0.1;0;-3276.8;3276.7;A;-;Battery Pack Current (Convention: Positive = Discharge , Negative = Charge);0x290;0;Cyclic;0\n"
              "BMS_PackPwr_W;BMS_Status2;-;40;16;Intel;Signed;0;40;0;-1310720;1310680;W;-;Calculated Pack Power in Watts (Convention: Positive = Discharge , Negative = Charge);0x291;0;Cyclic;0\n"
              "BMS_PackVolt_Meas_V;BMS_PackInfo1;-;48;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Battery Pack Voltage - measured by HVM;0x71B;0;Cyclic;0\n"
              "BMS_PackVolt_Sum_V;BMS_PackInfo2;-;16;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Battery Pack Voltage - summation of cell voltages;0x71C;0;Cyclic;0\n"
              "BMS_PackVolt_V;BMS_Status1;-;24;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Battery Pack Voltage;0x290;0;Cyclic;0\n"
              "BMS_Press_CoolInlet_bar;BMS_PackInfo4;-;16;16;Intel;Unsigned;0;0.001;0;0;65.535;bar;-;Coolant inlet pressure;0x71E;0;Cyclic;0\n"
              "BMS_Press_CoolOutlet_bar;BMS_PackInfo4;-;32;16;Intel;Unsigned;0;0.001;0;0;65.535;bar;-;Coolant outlet pressure;0x71E;0;Cyclic;0\n"
              "BMS_ResponseLevel_1_bool;BMS_FltInfo_Sfty1;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 1 (CAT3);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_2_bool;BMS_FltInfo_Sfty1;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 2 (CAT3);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_3_bool;BMS_FltInfo_Sfty1;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 3 (CAT3);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_4_bool;BMS_FltInfo_Sfty1;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 4 (CAT4);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_5_bool;BMS_FltInfo_Sfty1;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 5 (CAT5);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_6_bool;BMS_FltInfo_Sfty1;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 6 (CAT6);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_7_bool;BMS_FltInfo_Sfty1;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 7 (CAT7);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_8_bool;BMS_FltInfo_Sfty1;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 8 (CAT7);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_9_bool;BMS_FltInfo_Sfty1;-;8;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 9 (CAT7);0x72A;0;Cyclic;0\n"
              "BMS_SftyLyr_FaultCode_num;BMS_FltInfo_Sfty1;-;16;32;Intel;Unsigned;0;1;0;-1;0;-;-;BMS Safety Layer Fault Codes;0x72A;0;Cyclic;0\n"
              "BMS_SftyLyr_FaultCodeActNum_num;BMS_FltInfo_Sfty1;-;48;8;Intel;Unsigned;0;1;0;0;255;-;-;BMS Number of Active Safety Layer Fault Codes;0x72A;0;Cyclic;0\n"
              "BMS_ShutdownOk_bool;BMS_Status1;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;Shutdown request has been received and the battery is ready to be shutdown (0 = not ready to shutdown, 1 = ready to shutdown);0x290;0;Cyclic;0\n"
              "BMS_SOC_pack_CellVoltMax_pc;BMS_PackInfo5;-;32;16;Intel;Unsigned;0;0.01;0;0;100;%;-;Cell Voltage Maximum State Of Charge;0x71F;0;Cyclic;0\n"
              "BMS_SOC_pack_CellVoltMin_pc;BMS_PackInfo5;-;48;16;Intel;Unsigned;0;0.01;0;0;100;%;-;Cell Voltage Minimum State Of Charge;0x71F;0;Cyclic;0\n"
              "BMS_SOC_pack_pc;BMS_PackInfo2;-;0;16;Intel;Unsigned;0;0.01;0;0;100;%;-;Pack State Of Charge (Actual State of Charge);0x71C;0;Cyclic;0\n"
              "BMS_SOC_pc;BMS_Status1;-;16;8;Intel;Unsigned;0;0.5;0;0;100;%;-;Usable State of Charge;0x290;0;Cyclic;0\n"
              "BMS_SoftwareVersion_num;BMS_PackInfo2;-;48;16;Intel;Unsigned;0;1;0;0;65534;num;-;-;0x71C;0;Cyclic;0\n"
              "BMS_SOH_pc;BMS_PackInfo1;-;32;16;Intel;Unsigned;0;0.01;0;0;100;%;-;State Of Health;0x71B;0;Cyclic;0\n"
              "BMS_Startup_Rdy_bool;BMS_Status1;-;14;1;Intel;Unsigned;0;1;0;0;1;bool;-;Startup ready status to indicate readiness for receiving requests (0 = startup not complete, 1 = startup complete);0x290;0;Cyclic;0\n"
              "BMS_Status1_CRC_num;BMS_Status1;-;56;8;Intel;Unsigned;0;1;0;0;255;num;-;CRC value calculated on the message (8 bit), for safety reasons this must be calculated correctly.;0x290;0;Cyclic;0\n"
              "BMS_Status2_CRC_num;BMS_Status2;-;56;8;Intel;Unsigned;0;1;0;0;255;num;-;CRC value calculated on the message (8 bit), for safety reasons this must be calculated correctly.;0x291;0;Cyclic;0\n"
              "BMS_Status_enum;BMS_Status2;-;16;8;Intel;Unsigned;0;1;0;0;255;enum;VtSig_BMS_Status_enum;BMS status enumeration;0x291;0;Cyclic;0\n"
              "BMS_Temp_CoolInlet_degC;BMS_PackInfo4;-;0;8;Intel;Unsigned;-20;0.5;-20;-20;107.5;degC;-;Coolant inlet temperature;0x71E;0;Cyclic;0\n"
              "BMS_Temp_CoolOutlet_degC;BMS_PackInfo4;-;8;8;Intel;Unsigned;-20;0.5;-20;-20;107.5;degC;-;Coolant outlet temperature;0x71E;0;Cyclic;0\n"
              "BMS_TractVolt_V;BMS_PackInfo3;-;0;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Traction Voltage - measured by HVM;0x71D;0;Cyclic;0\n"
              "VSC_ChrgModeReq_bool;VSC_BatCmd;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;Stationary Charge mode request (0 = charge mode not requested, 1 = charge mode requested);0x270;0;Cyclic;0\n"
              "VSC_Cmd_CRC_num;VSC_BatCmd;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;CRC value calculated on the message (8 bit), for safety reasons this must be calculated correctly.;0x270;0;Cyclic;0\n"
              "VSC_Counter_num;VSC_BatCmd;-;8;4;Intel;Unsigned;0;1;0;0;15;count;-;4 bit continuously incrementing counter. Wraps around to 0 after 15.;0x270;0;Cyclic;0\n"
              "VSC_CrashStatus_bool;VSC_BatCmd;-;13;1;Intel;Unsigned;0;1;0;0;1;bool;-;This signal defines the crash status of the vehicle safety system....;0x270;0;Cyclic;0\n"
              "VSC_HvBus1_Tract_OnReq_bool;VSC_BatCmd;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 1 (Traction) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus2_Chrg_OnReq_bool;VSC_BatCmd;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 2 (Fuel Cell) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus3_Anc_OnReq_bool;VSC_BatCmd;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 3 (Ancillary) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus4_Null_OnReq_bool;VSC_BatCmd;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 4 (Not Used) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus5_Null_OnReq_bool;VSC_BatCmd;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 5 (Not Used) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_IsolDisbl_Req_bool;VSC_BatCmd;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;Battery Pack Isolation monitor disable request (0 = enable, 1 = disable);0x270;0;Cyclic;0\n"
              "VSC_ShutdownReq_bool;VSC_BatCmd;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;Shutdown request to prepare system for shutting down (0 = no shutdown requested, 1 = shutdown requested);0x270;0;Cyclic;0\n"
              "VSC_StorageModeReq_bool;VSC_BatCmd;-;12;1;Intel;Unsigned;0;1;0;0;1;bool;-;Storage Mode request prepare system for storage mode (0 = no storage mode requested, 1 = storage mode requested);0x270;0;Cyclic;0\n";
              

int dbc_index = 0;
char *to_find_list[] = {"BMS_HvBus1_Tract_OnFb_bool", "BMS_HvBus2_Chrg_OnFb_bool", "BMS_HvBus3_Anc_OnFb_bool", "BMS_HvBus4_Null_OnFb_bool", "BMS_HvBus5_Null_OnFb_bool", "BMS_Status_enum", "BMS_IsolVal_kohm"};
CSV_Parser cp(dbc,"s--udud--dfd--s--ux---", true, ';');

char      **names          = (char**)cp[0];
uint16_t  *startbits       = (uint16_t*)cp[3];
uint16_t  *lengths         = (uint16_t*)cp[4];
int16_t   *initial_values  = (int16_t*)cp[7];
float     *factors         = (float*)cp[8];
int16_t   *offsets         = (int16_t*)cp[9];
char      **units          = (char**)cp[12];
int32_t   *message_ids     = (int32_t*)cp[15];

int x[sizeof(to_find_list) / sizeof(to_find_list[0])];

void setup() {

  Serial.begin(115200);
  delay(5000);

  while (cp.parseRow()) {
    char      *name          = names[0];
    uint16_t  startbit       = startbits[0];
    uint16_t  length         = lengths[0];
    int16_t   initial_value  = initial_values[0];
    float     factor         = factors[0];
    int16_t   offset         = offsets[0];
    char      *unit          = units[0];
    int32_t   message_id     = message_ids[0];
    
    dbc_index++;
  }

  while (CAN_OK != CAN.begin(CAN_500KBPS)) {             // init can bus : baudrate = 500k
    Serial.println("CAN init fail, retry...");
    delay(100);
  }
  Serial.println("CAN init ok!");

  for (int i = 0; i < sizeof(x) / sizeof(x[0]); i++) {
    x[i] = searcher(to_find_list[i]);
  }
}

void loop() {
  unsigned char len = 0;
  unsigned char canData[8];
  unsigned char bitData[8][8];
  unsigned int extractedData[64];
  unsigned int extractedData2[64];

  if (CAN_MSGAVAIL == CAN.checkReceive()) {         // check if data coming
    CAN.readMsgBuf(&len, canData);    // read data,  len: DLC, data: CAN data 

    unsigned long canId = CAN.getCanId();

    Serial.println("-----------------------------");
    Serial.print("Get data from ID: 0x");
    Serial.println(canId, HEX);
    
    for (int i = 0; i < len; i++) {
      int* binNum = decToBin(canData[i]);

      for (int j = 0; j < 8; j++) {
        bitData[i][j] = binNum[j];
      }

      Serial.print(canData[i], HEX);
      Serial.print("\t");

      for (int j = 0; j < 8; j++) {
        Serial.print(bitData[i][j]);
      }

      Serial.println();

    }

    for (int i = 0; i < sizeof(x)/sizeof(x[0]); i++) {
      int index = 0;

      for (int j = (startbits[x[i]] + lengths[x[i]]) / 8; j >= startbits[x[i]] / 8; j--) {

        for (int k = 0; k < 8; k++) {

          extractedData[index++] = bitData[j][k];
        }
      }
    }

    Serial.print(bitData[0][7]);
    Serial.print("\t");
    Serial.print(extractedData[7]);
    Serial.println();

  }
}
 
char feedRowParser() {
  return dbc[dbc_index++];
}

bool rowParserFinished() {
  return dbc[dbc_index] == 0;
}

int searcher(char *to_find) {
  for(int i = 2; i < dbc_index - 1; i++) {
    if (strcmp(names[i], to_find) == 0) {
      return i;
    }
  }
}

int* decToBin(int decimalNumber) {
  static int binaryNumber[8];

  for (int i = 7; i >= 0; i--) {
    binaryNumber[i] = decimalNumber % 2;
    decimalNumber = decimalNumber / 2;
  }

  return binaryNumber;
}
CAN init ok!
-----------------------------
Get data from ID: 0x290
7	00000111
0	00000000
0	00000000
0	00000000
0	00000000
0	00000000
0	00000000
0	00000000
1	0```

Huh? Sorry, I don't understand: what is that "extractedData[0][7]"?
Extracted data is a single dimension array:

  unsigned int extractedData[64];

And the serial "dump" output seems to be incomplete.

    unsigned int extractedData[64];

In your sketch, extractedData is a one dimensional array so does extractedData[0][7] make any sense ?

Sorry, I meant extractedData[7].
@UKHeliBob
@docdoc

Well, fist of all to answer your question I need to understand where/how you see the extractedData[7] and bitData[0][7] are giving different values, as the serial output isn't quite clear to me/us (and looks like it's incomplete) with hist a bunch of lines with a decimal value and (apparently) its binary equivalent. Next, the code seems to print canData[] array values, a tab, and the 8 bits from bitData[]: where does the extractedData[] array come in that serial output, demonstrating extractedData[7] and bitData[0][7] are different? Could you make another serial output showing exactly what you're compaining for?

Just to be clear, the sketch isn't easy to be understood, so just as a start I see you set the extractedData array here:

    for (int i = 0; i < sizeof(x)/sizeof(x[0]); i++) {
      int index = 0;
      for (int j = (startbits[x[i]] + lengths[x[i]]) / 8; j >= startbits[x[i]] / 8; j--) {
        for (int k = 0; k < 8; k++) {
          extractedData[index++] = bitData[j][k];
        }
      }
    }

This means you use a growing "index" variable, so my question is: if you need a tight correlation between extractedData and bitData elements (where the first array is 64 elements corresponding to the scan of the second 8x8 array, in rows and columns) why don't you just use j and k variables and get rid of "index"? Example:

    for (int i = 0; i < sizeof(x)/sizeof(x[0]); i++) {
      for (int j = (startbits[x[i]] + lengths[x[i]]) / 8; j >= startbits[x[i]] / 8; j--) {
        for (int k = 0; k < 8; k++) {
          extractedData[j*8+k] = bitData[j][k];
        }
      }
    }

I don't know if that can answer your question, anyway I see some other things about x[] and startbits[] arrays, but I can't quite get it as they'd need more time to be studied and checked. I mean this:

int x[sizeof(to_find_list) / sizeof(to_find_list[0])];
...
  for (int i = 0; i < sizeof(x) / sizeof(x[0]); i++) {
    x[i] = searcher(to_find_list[i]);
  }

For the moment I won't go further on this, just let me know if the above index change can be a solution or not.

  • No need to go further, thanks. Can you tell me the reason this code isn't printing Checkpoint 2 instead? I want it to go through the whole loop printing data for each canId or message_id.
  • I have the changed the code a bit for easy understanding. Please, do suggest other additions for further ease.
    @UKHeliBob @docdoc
#include <SPI.h>
#include <string.h>
#include <CSV_Parser.h>

#define CAN_2515

#if defined(SEEED_WIO_TERMINAL) && defined(CAN_2518FD)
const int SPI_CS_PIN  = BCM8;
const int CAN_INT_PIN = BCM25;
#else

const int SPI_CS_PIN = 3; //Arduino MKR Shield = 3
const int CAN_INT_PIN = 7; //Arduino MKR Shield = 7
#endif

#ifdef CAN_2518FD
#include "mcp2518fd_can.h"
mcp2518fd CAN(SPI_CS_PIN);
#endif

#ifdef CAN_2515
#include "mcp2515_can.h"
mcp2515_can CAN(SPI_CS_PIN);
#endif

char * dbc =  "Name;Message;Multiplexing/Group;Startbit;Length [Bit];Byte Order;Value Type;Initial Value;Factor;Offset;Minimum;Maximum;Unit;Value Table;Comment;Message ID;GenSigInactiveValue;GenSigSendType;GenSigStartValue\n"
              "Name;Message;Multiplexing/Group;Startbit;Length [Bit];Byte Order;Value Type;Initial Value;Factor;Offset;Minimum;Maximum;Unit;Value Table;Comment;Message ID;GenSigInactiveValue;GenSigSendType;GenSigStartValue\n"
              "BMS_AncVolt_V;BMS_PackInfo3;-;16;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Fuel Cell Voltage - measured by HVM;0x71D;0;Cyclic;0\n"
              "BMS_BalancingStatus_enum;BMS_Status2;-;12;4;Intel;Unsigned;0;1;0;0;15;enum;VtSig_BMS_BalancingStatus_enum;Balancing state;0x291;0;Cyclic;0\n"
              "BMS_Cell_ChrgCycles_num;BMS_PackInfo5;-;0;16;Intel;Unsigned;0;0.1;0;0;6553.4;num;-;-;0x71F;0;Cyclic;0\n"
              "BMS_Cell_TempAvg_degC;BMS_CellTemperatureInfo;-;48;8;Intel;Signed;0;1;0;-128;127;degC;-;Average cell temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMax_CmuId_num;BMS_CellTemperatureInfo;-;32;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with highest temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMax_degC;BMS_CellTemperatureInfo;-;24;8;Intel;Signed;0;1;0;-128;127;degC;-;Maximum cell temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMax_Id_num;BMS_CellTemperatureInfo;-;40;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with highest temperature.;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMin_CmuId_num;BMS_CellTemperatureInfo;-;8;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with lowest temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMin_degC;BMS_CellTemperatureInfo;-;0;8;Intel;Signed;0;1;0;-128;127;degC;-;Minimum cell temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_TempMin_Id_num;BMS_CellTemperatureInfo;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with lowest temperature;0x717;0;Cyclic;0\n"
              "BMS_Cell_VoltDelta_V;BMS_PackInfo1;-;0;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Cell voltage difference between minimum and maximum cell voltage;0x71B;0;Cyclic;0\n"
              "BMS_Cell_VoltMax_CmuId_num;BMS_CellVoltageInfo;-;48;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with maximum voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMax_Id_num;BMS_CellVoltageInfo;-;56;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with maximum voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMax_V;BMS_CellVoltageInfo;-;32;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Maximum cell voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMin_CmuId_num;BMS_CellVoltageInfo;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with minimum voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMin_Id_num;BMS_CellVoltageInfo;-;24;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with lowest voltage;0x713;0;Cyclic;0\n"
              "BMS_Cell_VoltMin_V;BMS_CellVoltageInfo;-;0;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Minimum cell voltage;0x713;0;Cyclic;0\n"
              "BMS_Chrg_CapacityRemain_Ah;BMS_Status2;-;32;8;Intel;Unsigned;0;0.2;0;0;51;-;-;Battery Pack Charge Capacity Remaining in Ah;0x291;0;Cyclic;0\n"
              "BMS_Chrg_TmRemain_min;BMS_PackInfo5;-;16;16;Intel;Unsigned;0;1;0;0;65534;minutes;-;-;0x71F;0;Cyclic;0\n"
              "BMS_ChrgComplete_bool;BMS_Status2;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS charge complete flag. 0 = Not complete, 1 = Complete.;0x291;0;Cyclic;0\n"
              "BMS_ChrgCurLim30s_A;BMS_Limits2;-;16;16;Intel;Unsigned;0;0.1;0;0;6553.5;A;-;Charge Current Limit for 30 second events / continuous;0x296;0;Cyclic;0\n"
              "BMS_ChrgCurrLim30s_enum;BMS_FltInfo_Derate1;-;48;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_ChrgCurrLim30s_enum;Charge Current Limit Enumeration for 30 second events / continuous;0x73F;0;Cyclic;0\n"
              "BMS_ChrgCurrReq_A;BMS_Limits1;-;32;16;Intel;Unsigned;0;0.1;0;0;6553.5;A;-;Current request for charging in Amps;0x295;0;Cyclic;0\n"
              "BMS_ChrgModeReqFb_bool;BMS_Status1;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;Charge mode request acknowledgement feedback (0 = charge mode not requested feedback, 1 = charge mode requested feedback);0x290;0;Cyclic;0\n"
              "BMS_ChrgPwrLim10s_enum;BMS_FltInfo_Derate1;-;16;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_ChrgPwrLim10s_enum;Regen Current Limit Enumeration for 10 second events / instantaneous;0x73F;0;Cyclic;0\n"
              "BMS_ChrgPwrLim10s_W;BMS_Limits1;-;16;16;Intel;Unsigned;0;20;0;0;1310700;W;-;Regen Current Limit for 10 second events / instantaneous;0x295;0;Cyclic;0\n"
              "BMS_ChrgVolt_V;BMS_PackInfo3;-;32;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Anc Voltage - measured by HVM;0x71D;0;Cyclic;0\n"
              "BMS_ChrgVoltMax_V;BMS_Limits1;-;48;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Maximum charging voltage of pack;0x295;0;Cyclic;0\n"
              "BMS_CMU1_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU1_voltage1;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage10;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage11;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage12;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage13;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage14;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage2;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage3;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage4;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage5;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage6;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage7;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage8;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU1_voltage9;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU2_voltage1;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage10;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage11;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage12;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage13;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage14;BMS_CMU_Voltages1;BMS_CMU_counter = 0x6;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage2;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage3;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage4;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage5;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage6;BMS_CMU_Voltages1;BMS_CMU_counter = 0x4;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage7;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage8;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU2_voltage9;BMS_CMU_Voltages1;BMS_CMU_counter = 0x5;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x1;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU3_voltage1;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage10;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage11;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage12;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage13;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU3_voltage14;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU3_voltage2;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage3;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage4;BMS_CMU_Voltages1;BMS_CMU_counter = 0x7;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage5;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage6;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage7;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage8;BMS_CMU_Voltages1;BMS_CMU_counter = 0x8;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU3_voltage9;BMS_CMU_Voltages1;BMS_CMU_counter = 0x9;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0\n"
              "BMS_CMU4_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x2;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU4_voltage1;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage10;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage11;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage12;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage13;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage14;BMS_CMU_Voltages2;BMS_CMU_counter = 0x3;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage2;BMS_CMU_Voltages2;BMS_CMU_counter = 0x0;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage3;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage4;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage5;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage6;BMS_CMU_Voltages2;BMS_CMU_counter = 0x1;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage7;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage8;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU4_voltage9;BMS_CMU_Voltages2;BMS_CMU_counter = 0x2;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x3;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU5_voltage1;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage10;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage11;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage12;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage13;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage14;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage2;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage3;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage4;BMS_CMU_Voltages2;BMS_CMU_counter = 0x4;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage5;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage6;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage7;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage8;BMS_CMU_Voltages2;BMS_CMU_counter = 0x5;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU5_voltage9;BMS_CMU_Voltages2;BMS_CMU_counter = 0x6;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x4;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU6_voltage1;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage10;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage11;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage12;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage13;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage14;BMS_CMU_Voltages3;BMS_CMU_counter = 0x0;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU6_voltage2;BMS_CMU_Voltages2;BMS_CMU_counter = 0x7;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage3;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage4;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage5;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage6;BMS_CMU_Voltages2;BMS_CMU_counter = 0x8;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage7;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage8;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU6_voltage9;BMS_CMU_Voltages2;BMS_CMU_counter = 0x9;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x508;0;Cyclic;0\n"
              "BMS_CMU7_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x5;56;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU7_voltage01;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage02;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage03;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage04;BMS_CMU_Voltages3;BMS_CMU_counter = 0x1;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage05;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage06;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage07;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage08;BMS_CMU_Voltages3;BMS_CMU_counter = 0x2;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage09;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage10;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage11;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage12;BMS_CMU_Voltages3;BMS_CMU_counter = 0x3;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage13;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU7_voltage14;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x6;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0\n"
              "BMS_CMU8_voltage1;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage10;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage11;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage12;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage13;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage14;BMS_CMU_Voltages3;BMS_CMU_counter = 0x7;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage2;BMS_CMU_Voltages3;BMS_CMU_counter = 0x4;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage3;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage4;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage5;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage6;BMS_CMU_Voltages3;BMS_CMU_counter = 0x5;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage7;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage8;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU8_voltage9;BMS_CMU_Voltages3;BMS_CMU_counter = 0x6;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x509;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Voltages3;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x509;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Voltages2;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x508;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Voltages1;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x507;0;Cyclic;0\n"
              "BMS_CMU_counter;BMS_CMU_Temp1;Multiplexor;0;6;Intel;Unsigned;0;1;0;0;63;count;-;-;0x500;0;Cyclic;0\n"
              "BMS_Cool_Emgncy_Req_bool;BMS_Status2;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Emergency cooling request;0x291;0;Cyclic;0\n"
              "BMS_Cool_None_Req_bool;BMS_Status2;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS no cooling request;0x291;0;Cyclic;0\n"
              "BMS_Cool_Normal_Req_bool;BMS_Status2;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Normal cooling request;0x291;0;Cyclic;0\n"
              "BMS_Counter_num;BMS_Status1;-;8;4;Intel;Unsigned;0;1;0;0;15;count;-;4 bit continuously incrementing counter. Wraps around to 0 after 15.;0x290;0;Cyclic;0\n"
              "BMS_Counter_num;BMS_Status2;-;8;4;Intel;Unsigned;0;1;0;0;15;count;-;4 bit continuously incrementing counter. Wraps around to 0 after 15.;0x291;0;Cyclic;0\n"
              "BMS_Dischrg_CapacityRemain_Ah;BMS_Status2;-;24;8;Intel;Unsigned;0;0.2;0;0;51;-;-;Battery Pack Discharge Capacity Remaining in Ah;0x291;0;Cyclic;0\n"
              "BMS_DischrgPwrLim10s_enum;BMS_FltInfo_Derate1;-;0;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_DischrgPwrLim10s_enum;Discharge Current Limit Enumeration for 10 second events / instantaneous;0x73F;0;Cyclic;0\n"
              "BMS_DischrgPwrLim10s_W;BMS_Limits1;-;0;16;Intel;Unsigned;0;20;0;0;1310700;W;-;Discharge Current Limit for 10 second events / instantaneous;0x295;0;Cyclic;0\n"
              "BMS_DischrgPwrLim30s_enum;BMS_FltInfo_Derate1;-;32;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_DischrgPwrLim30s_enum;Discharge Current Limit Enumeration for 30 second events / continuous;0x73F;0;Cyclic;0\n"
              "BMS_DischrgPwrLim30s_W;BMS_Limits2;-;0;16;Intel;Unsigned;0;20;0;0;1310700;W;-;Discharge Current Limit for 30 second events / continuous;0x296;0;Cyclic;0\n"
              "BMS_EmgncyCttrOpening_bool;BMS_Status1;-;15;1;Intel;Unsigned;0;1;0;0;1;bool;-;Emergency contactor opening warning (0 = contactors not able to open, 1 = contactors about to open due to emergency);0x290;0;Cyclic;0\n"
              "BMS_FltDisbl_Act_bool;BMS_Status2;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Disable Fault is active;0x291;0;Cyclic;0\n"
              "BMS_FltDrate_Act_bool;BMS_Status2;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Derate Fault is active;0x291;0;Cyclic;0\n"
              "BMS_FltLmpHm_Act_bool;BMS_Status2;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Limp Home Fault is active;0x291;0;Cyclic;0\n"
              "BMS_FltWarn_Act_bool;BMS_Status2;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;Any Warn Fault is active;0x291;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_0_bool;BMS_FltInfo_Sfty1;-;9;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 0...;0x72A;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_1_bool;BMS_FltInfo_Sfty1;-;10;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 1...;0x72A;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_2_bool;BMS_FltInfo_Sfty1;-;11;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 2...;0x72A;0;Cyclic;0\n"
              "BMS_HMI_WarnLevel_3_bool;BMS_FltInfo_Sfty1;-;12;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS HMI safety layer warning level 3...;0x72A;0;Cyclic;0\n"
              "BMS_HVBattTotalCapacity_kWh;BMS_PackInfo1;-;16;12;Intel;Unsigned;0;0.1;0;0;102.35;kWh;-;Total battery capacity in kWh (energy content)....;0x71B;0;Cyclic;0\n"
              "BMS_HvBus1_Tract_OnFb_bool;BMS_Status1;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 1 (Traction) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus2_Chrg_OnFb_bool;BMS_Status1;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 2 (Fuel Cell) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus3_Anc_OnFb_bool;BMS_Status1;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 3 (Ancillary) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus4_Null_OnFb_bool;BMS_Status1;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 4 (Not Used) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_HvBus5_Null_OnFb_bool;BMS_Status1;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 5 (Not Used) feedback (negative & relevant positive contactor are open or closed) (0 = open, 1 = closed);0x290;0;Cyclic;0\n"
              "BMS_IsolDisbl_ReqFb_bool;BMS_Status1;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;Isolation monitor disable request feedback (0 = requested enabled, 1 = requested disabled);0x290;0;Cyclic;0\n"
              "BMS_IsolVal_kohm;BMS_PackInfo2;-;32;16;Intel;Unsigned;0;1;0;0;65535;kohm;-;Isolation Value in kohm;0x71C;0;Cyclic;0\n"
              "BMS_PackCurr_A;BMS_Status1;-;40;16;Intel;Signed;0;0.1;0;-3276.8;3276.7;A;-;Battery Pack Current (Convention: Positive = Discharge , Negative = Charge);0x290;0;Cyclic;0\n"
              "BMS_PackPwr_W;BMS_Status2;-;40;16;Intel;Signed;0;40;0;-1310720;1310680;W;-;Calculated Pack Power in Watts (Convention: Positive = Discharge , Negative = Charge);0x291;0;Cyclic;0\n"
              "BMS_PackVolt_Meas_V;BMS_PackInfo1;-;48;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Battery Pack Voltage - measured by HVM;0x71B;0;Cyclic;0\n"
              "BMS_PackVolt_Sum_V;BMS_PackInfo2;-;16;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Battery Pack Voltage - summation of cell voltages;0x71C;0;Cyclic;0\n"
              "BMS_PackVolt_V;BMS_Status1;-;24;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Battery Pack Voltage;0x290;0;Cyclic;0\n"
              "BMS_Press_CoolInlet_bar;BMS_PackInfo4;-;16;16;Intel;Unsigned;0;0.001;0;0;65.535;bar;-;Coolant inlet pressure;0x71E;0;Cyclic;0\n"
              "BMS_Press_CoolOutlet_bar;BMS_PackInfo4;-;32;16;Intel;Unsigned;0;0.001;0;0;65.535;bar;-;Coolant outlet pressure;0x71E;0;Cyclic;0\n"
              "BMS_ResponseLevel_1_bool;BMS_FltInfo_Sfty1;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 1 (CAT3);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_2_bool;BMS_FltInfo_Sfty1;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 2 (CAT3);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_3_bool;BMS_FltInfo_Sfty1;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 3 (CAT3);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_4_bool;BMS_FltInfo_Sfty1;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 4 (CAT4);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_5_bool;BMS_FltInfo_Sfty1;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 5 (CAT5);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_6_bool;BMS_FltInfo_Sfty1;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 6 (CAT6);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_7_bool;BMS_FltInfo_Sfty1;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 7 (CAT7);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_8_bool;BMS_FltInfo_Sfty1;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 8 (CAT7);0x72A;0;Cyclic;0\n"
              "BMS_ResponseLevel_9_bool;BMS_FltInfo_Sfty1;-;8;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS Safety Layer Response Level 9 (CAT7);0x72A;0;Cyclic;0\n"
              "BMS_SftyLyr_FaultCode_num;BMS_FltInfo_Sfty1;-;16;32;Intel;Unsigned;0;1;0;-1;0;-;-;BMS Safety Layer Fault Codes;0x72A;0;Cyclic;0\n"
              "BMS_SftyLyr_FaultCodeActNum_num;BMS_FltInfo_Sfty1;-;48;8;Intel;Unsigned;0;1;0;0;255;-;-;BMS Number of Active Safety Layer Fault Codes;0x72A;0;Cyclic;0\n"
              "BMS_ShutdownOk_bool;BMS_Status1;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;Shutdown request has been received and the battery is ready to be shutdown (0 = not ready to shutdown, 1 = ready to shutdown);0x290;0;Cyclic;0\n"
              "BMS_SOC_pack_CellVoltMax_pc;BMS_PackInfo5;-;32;16;Intel;Unsigned;0;0.01;0;0;100;%;-;Cell Voltage Maximum State Of Charge;0x71F;0;Cyclic;0\n"
              "BMS_SOC_pack_CellVoltMin_pc;BMS_PackInfo5;-;48;16;Intel;Unsigned;0;0.01;0;0;100;%;-;Cell Voltage Minimum State Of Charge;0x71F;0;Cyclic;0\n"
              "BMS_SOC_pack_pc;BMS_PackInfo2;-;0;16;Intel;Unsigned;0;0.01;0;0;100;%;-;Pack State Of Charge (Actual State of Charge);0x71C;0;Cyclic;0\n"
              "BMS_SOC_pc;BMS_Status1;-;16;8;Intel;Unsigned;0;0.5;0;0;100;%;-;Usable State of Charge;0x290;0;Cyclic;0\n"
              "BMS_SoftwareVersion_num;BMS_PackInfo2;-;48;16;Intel;Unsigned;0;1;0;0;65534;num;-;-;0x71C;0;Cyclic;0\n"
              "BMS_SOH_pc;BMS_PackInfo1;-;32;16;Intel;Unsigned;0;0.01;0;0;100;%;-;State Of Health;0x71B;0;Cyclic;0\n"
              "BMS_Startup_Rdy_bool;BMS_Status1;-;14;1;Intel;Unsigned;0;1;0;0;1;bool;-;Startup ready status to indicate readiness for receiving requests (0 = startup not complete, 1 = startup complete);0x290;0;Cyclic;0\n"
              "BMS_Status1_CRC_num;BMS_Status1;-;56;8;Intel;Unsigned;0;1;0;0;255;num;-;CRC value calculated on the message (8 bit), for safety reasons this must be calculated correctly.;0x290;0;Cyclic;0\n"
              "BMS_Status2_CRC_num;BMS_Status2;-;56;8;Intel;Unsigned;0;1;0;0;255;num;-;CRC value calculated on the message (8 bit), for safety reasons this must be calculated correctly.;0x291;0;Cyclic;0\n"
              "BMS_Status_enum;BMS_Status2;-;16;8;Intel;Unsigned;0;1;0;0;255;enum;VtSig_BMS_Status_enum;BMS status enumeration;0x291;0;Cyclic;0\n"
              "BMS_Temp_CoolInlet_degC;BMS_PackInfo4;-;0;8;Intel;Unsigned;-20;0.5;-20;-20;107.5;degC;-;Coolant inlet temperature;0x71E;0;Cyclic;0\n"
              "BMS_Temp_CoolOutlet_degC;BMS_PackInfo4;-;8;8;Intel;Unsigned;-20;0.5;-20;-20;107.5;degC;-;Coolant outlet temperature;0x71E;0;Cyclic;0\n"
              "BMS_TractVolt_V;BMS_PackInfo3;-;0;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Traction Voltage - measured by HVM;0x71D;0;Cyclic;0\n"
              "VSC_ChrgModeReq_bool;VSC_BatCmd;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;Stationary Charge mode request (0 = charge mode not requested, 1 = charge mode requested);0x270;0;Cyclic;0\n"
              "VSC_Cmd_CRC_num;VSC_BatCmd;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;CRC value calculated on the message (8 bit), for safety reasons this must be calculated correctly.;0x270;0;Cyclic;0\n"
              "VSC_Counter_num;VSC_BatCmd;-;8;4;Intel;Unsigned;0;1;0;0;15;count;-;4 bit continuously incrementing counter. Wraps around to 0 after 15.;0x270;0;Cyclic;0\n"
              "VSC_CrashStatus_bool;VSC_BatCmd;-;13;1;Intel;Unsigned;0;1;0;0;1;bool;-;This signal defines the crash status of the vehicle safety system....;0x270;0;Cyclic;0\n"
              "VSC_HvBus1_Tract_OnReq_bool;VSC_BatCmd;-;0;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 1 (Traction) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus2_Chrg_OnReq_bool;VSC_BatCmd;-;1;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 2 (Fuel Cell) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus3_Anc_OnReq_bool;VSC_BatCmd;-;2;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 3 (Ancillary) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus4_Null_OnReq_bool;VSC_BatCmd;-;3;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 4 (Not Used) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_HvBus5_Null_OnReq_bool;VSC_BatCmd;-;4;1;Intel;Unsigned;0;1;0;0;1;bool;-;High voltage bus 5 (Not Used) request (negative & relevant positive contactor to be closed or opened) (0 = open, 1 = close);0x270;0;Cyclic;0\n"
              "VSC_IsolDisbl_Req_bool;VSC_BatCmd;-;5;1;Intel;Unsigned;0;1;0;0;1;bool;-;Battery Pack Isolation monitor disable request (0 = enable, 1 = disable);0x270;0;Cyclic;0\n"
              "VSC_ShutdownReq_bool;VSC_BatCmd;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;Shutdown request to prepare system for shutting down (0 = no shutdown requested, 1 = shutdown requested);0x270;0;Cyclic;0\n"
              "VSC_StorageModeReq_bool;VSC_BatCmd;-;12;1;Intel;Unsigned;0;1;0;0;1;bool;-;Storage Mode request prepare system for storage mode (0 = no storage mode requested, 1 = storage mode requested);0x270;0;Cyclic;0\n";
              

int dbc_index = 0;
char *to_find_list[] = {"BMS_HvBus1_Tract_OnFb_bool", "BMS_HvBus2_Chrg_OnFb_bool", "BMS_HvBus3_Anc_OnFb_bool", "BMS_HvBus4_Null_OnFb_bool", "BMS_HvBus5_Null_OnFb_bool", "BMS_Status_enum", "BMS_IsolVal_kohm"};
CSV_Parser cp(dbc,"s--udud--dfd--s--ux---", true, ';');

char      **names          = (char**)cp[0];
uint16_t  *startbits       = (uint16_t*)cp[3];
uint16_t  *lengths         = (uint16_t*)cp[4];
int16_t   *initial_values  = (int16_t*)cp[7];
float     *factors         = (float*)cp[8];
int16_t   *offsets         = (int16_t*)cp[9];
char      **units          = (char**)cp[12];
int32_t   *message_ids     = (int32_t*)cp[15];

int x[sizeof(to_find_list) / sizeof(to_find_list[0])];

void setup() {

  Serial.begin(115200);
  delay(5000);

  while (cp.parseRow()) {
    char      *name          = names[0];
    uint16_t  startbit       = startbits[0];
    uint16_t  length         = lengths[0];
    int16_t   initial_value  = initial_values[0];
    float     factor         = factors[0];
    int16_t   offset         = offsets[0];
    char      *unit          = units[0];
    int32_t   message_id     = message_ids[0];
    
    dbc_index++;
  }

  while (CAN_OK != CAN.begin(CAN_500KBPS)) {             // init can bus : baudrate = 500k
    Serial.println("CAN init fail, retry...");
    delay(100);
  }
  Serial.println("CAN init ok!");

  for (int i = 0; i < sizeof(x) / sizeof(x[0]); i++) {
    x[i] = searcher(to_find_list[i]);
  }
}

void loop() {
  unsigned char dlc = 0;
  unsigned char canData[8];
  unsigned char data[8][8];
  unsigned int byteData[64] = {0};

  if (CAN_MSGAVAIL == CAN.checkReceive()) {         // check if data coming
    CAN.readMsgBuf(&dlc, canData);    // read data,  dlc: DLC, data: CAN data 

    unsigned long canId = CAN.getCanId();

    Serial.println("-----------------------------");
    Serial.print("Get data from ID: 0x");
    Serial.println(canId, HEX);
    
    for(int i = 0; i < sizeof(x) / sizeof(x[0]); i++) {

      unsigned int index = x[i];

      if (message_ids[index] == canId) {

        int index_byte = 0; unsigned int sb = startbits[index]; unsigned int len = lengths[index];
      
        for (int i = 0; i < dlc; i++) { //This for loop converts the whole data into binary format
          int* binNum = decToBin(canData[i]);

          for (int j = 0; j < 8; j++) {
            data[i][j] = binNum[j];
          }

          Serial.print(canData[i], HEX);
          Serial.print("\t");
        }

        for (int j = 0; j < 8; j++) { //Printing the data for verification
          Serial.print(data[i][j]);
        }
        Serial.println();

        for (int i = 0; i < 8; i++) {

          if ((sb + len) % 8 != 0) { //If startbits + length > the byte size, we will have to take the next byte into consideration

            for (int j = (sb + len) / 8; j >= sb / 8; j--) { //Extract the necessary bytes
              
              for (int k = 0; k < 8; k++) {
                byteData[index_byte++] = data[j][k];
              }
              Serial.print("Checkpoint 1 ");
            }
            Serial.print("Checkpoint 2 ");
          }

          else { //If startbits + length is divisible by 8

            for (int j = ((sb + len) / 8) - 1; j >= sb / 8; j--) {

              for (int k = 0; k < 8; k++) {

                byteData[index_byte++] = data[j][k];
              }
              Serial.print("Checkpoint 3 ");
            }
            Serial.print("Checkpoint 4 ");
          }
          Serial.print("Checkpoint 5 ");
        }

        unsigned int bitData[len] = {0};
        Serial.println();
        Serial.print("Extracted Data: ");

        for (int i = 0; i < len; i ++) { //Extract the data according to the bit length
          bitData[i] = byteData[i];
          Serial.print(bitData[i]);
        }

        Serial.println();
      }
    }
  }
}

char feedRowParser() {
  return dbc[dbc_index++];
}

bool rowParserFinished() {
  return dbc[dbc_index] == 0;
}

int searcher(char *to_find) {
  for(int i = 2; i < dbc_index - 1; i++) {
    if (strcmp(names[i], to_find) == 0) {
      return i;
    }
  }
}

int* decToBin (int decimalNumber) {
  static int binaryNumber[8];

  for (int i = 7; i >= 0; i--) {
    binaryNumber[i] = decimalNumber % 2;
    decimalNumber = decimalNumber / 2;
  }

  return binaryNumber;
}

int binTodec (unsigned int binaryNumber[], int size) {
  int decimalNumber = 0;
  int index = 0;
  for (int i = size - 1; i >= 0; i--) {
    decimalNumber += binaryNumber[index++] * pow(2, i);
  }

  return decimalNumber;
}
CAN init ok!
-----------------------------
Get data from ID: 0x290
7	0	0	0	0	0	0	0	00000111
Checkpoint 1 Checkpoint 1 Checkpoint 1 Checkpoint 1 Checkpoint 1 Checkpoint 1 Checkpoint 1 Checkpoint 1 Checkpoint 1 ```

Looks like something to do with the first for() not ending:

            for (int j = (sb + len) / 8; j >= sb / 8; j--) { //Extract the necessary bytes

To test it, I'd just add some more debug printouts, and see what happens:

        for (int i = 0; i < 8; i++) {
          //If startbits + length > the byte size, we will have to take the next byte into consideration
          if ((sb + len) % 8 != 0) { 
            //Extract the necessary bytes
Serial.print("j from ");Serial.print((sb + len) / 8);Serial.print(" to ");Serial.println(sb / 8);
            for (int j = (sb + len) / 8; j >= sb / 8; j--) {
Serial.print("j=");Serial.print(j);
              for (int k = 0; k < 8; k++) {
                byteData[index_byte++] = data[j][k];
Serial.print(" data[");Serial.print(j);Serial.print("][";
Serial.print(k);Serial.print("]=");Serial.print(data[j][k]);
Serial.print(" index_byte=");Serial.println(index_byte);
              }
              Serial.print("Checkpoint 1 ");
            }
            Serial.print("Checkpoint 2 ");
          }

I tried the code. Why is j going negative if it is constrained to be greater than or equal to 0?

CAN init ok!
-----------------------------
Get data from ID: 0x290
7	0	0	0	0	0	0	0	00000111
j from 0 to 0
j=0 data[0][0]=0 index_byte=1
 data[0][1]=0 index_byte=2
 data[0][2]=0 index_byte=3
 data[0][3]=0 index_byte=4
 data[0][4]=0 index_byte=5
 data[0][5]=1 index_byte=6
 data[0][6]=1 index_byte=7
 data[0][7]=1 index_byte=8
Checkpoint 1 j=-1 data[-1][0]=7 index_byte=9
 data[-1][1]=0 index_byte=10
 data[-1][2]=0 index_byte=11
 data[-1][3]=0 index_byte=12
 data[-1][4]=0 index_byte=13
 data[-1][5]=0 index_byte=14
 data[-1][6]=0 index_byte=15
 data[-1][7]=0 index_byte=16
Checkpoint 1 j=-2 data[-2][0]=242 index_byte=17
 data[-2][1]=255 index_byte=18
 data[-2][2]=255 index_byte=19
 data[-2][3]=255 index_byte=20
 data[-2][4]=243 index_byte=21
 data[-2][5]=255 index_byte=22
 data[-2][6]=255 index_byte=23
 data[-2][7]=8 index_byte=24
 data[-2][5]=255 index_byte=22
 data[-2][6]=255 index_byte=23
 data[-2][7]=8 index_byte=24
Checkpoint 1 j=-3 data[-3][0]=253 index_byte=25
 data[-3][1]=255 index_byte=26
 data[-3][2]=255 index_byte=27
 data[-3][3]=255 index_byte=28
 data[-3][4]=8 index_byte=29
 data[-3][5]=0 index_byte=30
 data[-3][6]=0 index_byte=31
 data[-3][7]=0 index_byte=32
Checkpoint 1 j=-4 data[-4][0]=1 index_byte=33
 data[-4][1]=0 index_byte=34
 data[-4][2]=0 index_byte=35
 data[-4][3]=0 index_byte=36
 data[-4][4]=0 index_byte=37
 data[-4][5]=0 index_byte=38
 data[-4][6]=0 index_byte=39
 data[-4][7]=0 index_byte=40
Checkpoint 1 j=-5 data[-5][0]=40 index_byte=41
 data[-5][1]=0 index_byte=42
 data[-5][2]=0 index_byte=43
 data[-5][3]=0 index_byte=44
 data[-5][4]=0 index_byte=45
 data[-5][5]=0 index_byte=46
 data[-5][6]=0 index_byte=47
 data[-5][7]=0 index_byte=48
Checkpoint 1 j=-6 data[-6][0]=144 index_byte=49
 data[-6][1]=127 index_byte=50
 data[-6][2]=0 index_byte=51
 data[-6][3]=32 index_byte=52
 data[-6][4]=96 index_byte=53
 data[-6][5]=126 index_byte=54
 data[-6][6]=0 index_byte=55
 data[-6][7]=32 index_byte=56
Checkpoint 1 j=-7 data[-7][0]=0 index_byte=57
 data[-7][1]=0 index_byte=58
 data[-7][2]=0 index_byte=59
 data[-7][3]=0 index_byte=60
 data[-7][4]=0 index_byte=61
 data[-7][5]=0 index_byte=62
 data[-7][6]=0 index_byte=63
 data[-7][7]=0 index_byte=64
Checkpoint 1 j=-8 data[-8][0]=48 index_byte=65
 data[-8][1]=126 index_byte=66
 data[-8][2]=0 index_byte=67
 data[-8][3]=32 index_byte=68
 data[-8][4]=144 index_byte=69
 data[-8][5]=2 index_byte=70
 data[-8][6]=0 index_byte=71
 data[-8][7]=0 index_byte=72
Checkpoint 1 j=-9 data[-9][0]=144 index_byte=73
 data[-9][1]=126 index_byte=74
 data[-9][2]=0 index_byte=75
 data[-9][3]=32 index_byte=76

@UKHeliBob @docdoc

See this:

for (int j = (sb + len) / 8; j >= sb / 8; j--) {

How are "sb" and "len" defined?

  unsigned int sb = 0; unsigned int len = 0;

So, you need to investigate on how the "j >= sb/8" condition will be evaluated, knowing "j" is "int" and "sb" an unsigned int. If both were unsigned int you can't get it down to -1, right?

That condition always fails even if "j" is less than zero, because converting "j" to unsigned int gives 65535 (2's complement for -1) and it is always greater than zero. And as the compiler needs to perform that unsigned int division before testing, it'll use "unsigned int" as the data format for the test.

Thus, you just need to force the compiler with an explicit cast to convert "sb/8" into a signed int before comparing:

  for (int j = (sb + len) / 8; j >= (int)(sb / 8); j--) {

Give it a try...

I dont know why but precomputing the values changes things

for (int i = 0; i < 8; i++) { //If startbits + length > the byte size, we will have to take the next byte into consideration
          
          int from = (sb + len) / 8; int to = sb / 8;
          if ((sb + len) % 8 != 0) { //Extract the necessary bytes
            Serial.print("j from ");
            Serial.print((sb + len) / 8);
            Serial.print(" to ");
            Serial.println(sb / 8);
            
            for (int j = from; j >= to; j--) {
              Serial.print("j=");
              Serial.print(j);
              
              for (int k = 0; k < 8; k++) {

                byteData[index_byte++] = data[j][k];
                Serial.print(" data[");
                Serial.print(j);
                Serial.print("][");
                Serial.print(k);
                Serial.print("]=");
                Serial.print(data[j][k]);
                Serial.print(" index_byte=");
                Serial.println(index_byte);
              }
              Serial.print("Checkpoint 1 ");
            }
            Serial.print("Checkpoint 2 ");
          }

          else { //If startbits + length is divisible by 8

            for (int j = ((sb + len) / 8) - 1; j >= sb / 8; j--) {

              for (int k = 0; k < 8; k++) {

                byteData[index_byte++] = data[j][k];
              }
              Serial.print("Checkpoint 3 ");
            }
            Serial.print("Checkpoint 4 ");
          }
          Serial.print("Checkpoint 5 ");
        }
CAN init ok!
-----------------------------
Get data from ID: 0x290
7	0	0	0	0	0	0	0	00000111
j from 0 to 0
j=0 data[0][0]=0 index_byte=1
 data[0][1]=0 index_byte=2
 data[0][2]=0 index_byte=3
 data[0][3]=0 index_byte=4
 data[0][4]=0 index_byte=5
 data[0][5]=1 index_byte=6
 data[0][6]=1 index_byte=7
 data[0][7]=1 index_byte=8
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0
j=0 data[0][0]=0 index_byte=9
 data[0][1]=0 index_byte=10
 data[0][2]=0 index_byte=11
 data[0][3]=0 index_byte=12
 data[0][4]=0 index_byte=13
 data[0][5]=1 index_byte=14
 data[0][6]=1 index_byte=15
 data[0][7]=1 index_byte=16
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0
j=0 data[0][0]=0 index_byte=17
 data[0][1]=0 index_byte=18
 data[0][2]=0 index_byte=19
 data[0][3]=0 index_byte=20
 data[0][4]=0 index_byte=21
 data[0][5]=1 index_byte=22
 data[0][6]=1 index_byte=23
 data[0][7]=1 index_byte=24
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0
j=0 data[0][0]=0 index_byte=25
 data[0][1]=0 index_byte=26
 data[0][2]=0 index_byte=27
 data[0][3]=0 index_byte=28
 data[0][4]=0 index_byte=29
 data[0][5]=1 index_byte=30
 data[0][6]=1 index_byte=31
 data[0][7]=1 index_byte=32
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0
j=0 data[0][0]=0 index_byte=33
 data[0][1]=0 index_byte=34
 data[0][2]=0 index_byte=35
 data[0][3]=0 index_byte=36
 data[0][4]=0 index_byte=37
 data[0][5]=1 index_byte=38
 data[0][6]=1 index_byte=39
 data[0][7]=1 index_byte=40
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0
j=0 data[0][0]=0 index_byte=41
 data[0][1]=0 index_byte=42
 data[0][2]=0 index_byte=43
 data[0][3]=0 index_byte=44
 data[0][4]=0 index_byte=45
 data[0][5]=1 index_byte=46
 data[0][6]=1 index_byte=47
 data[0][7]=1 index_byte=48
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0
j=0 data[0][0]=0 index_byte=49
 data[0][1]=0 index_byte=50
 data[0][2]=0 index_byte=51
 data[0][3]=0 index_byte=52
 data[0][4]=0 index_byte=53
 data[0][5]=1 index_byte=54
 data[0][6]=1 index_byte=55
 data[0][7]=1 index_byte=56
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0
j=0 data[0][0]=0 index_byte=57
 data[0][1]=0 index_byte=58
 data[0][2]=0 index_byte=59
 data[0][3]=0 index_byte=60
 data[0][4]=0 index_byte=61
 data[0][5]=1 index_byte=62
 data[0][6]=1 index_byte=63
 data[0][7]=1 index_byte=64
Checkpoint 1 Checkpoint 2 Checkpoint 5 
Extracted Data: 0
7	0	0	0	0	0	0	0	00000000
j from 0 to 0
j=0 data[0][0]=0 index_byte=1
 data[0][1]=0 index_byte=2
 data[0][2]=0 index_byte=3
 data[0][3]=0 index_byte=4
 data[0][4]=0 index_byte=5
 data[0][5]=1 index_byte=6
 data[0][6]=1 index_byte=7
 data[0][7]=1 index_byte=8
Checkpoint 1 Checkpoint 2 Checkpoint 5 j from 0 to 0

Read my previous post... :wink:

Yep. This worked. I got the same output. Thank you!!!!!

Good. I'm glad I could help you but please note my primary goal wasn't much giving you a working code, but first of all letting you understand why that happened... :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.