2. Will just calculate slightly wrong the SOC if not calibrated correctly but has nothing to do with your charge problem.
9. I need just 10 to 15 seconds before the charging turns OFF to see what was the reason.
10. Was the power reset done ? as if so the left SBMS0 could not have gotten to 51% in one minute of charging only. Also I do not see the OV flag set on the second SBMS0 meaning this was not the fist charge since reset else charging will not have stopped until one cell voltage was at 4.1V for over 5 seconds.
It just looks like SOC was reset by the EOC threshold and then 3 seconds later it stopped charging as the SOC was at 99%
Not sure if I can paste code here but this is the relevant part
this first one is the rule for EXT IO4 set as type 1 and ON means close circuit charging enabled and OFF means open circuit so charger OFF
CFETerror refer's to CFET flag if is OFF for more than 3 second then charging will be OFF
sbms0charge refers to SOC limit so in your case is 99% thus more than 0 so charger will be ON unless is not a new day (not first time charging is done) see second part of the code for when this variable can become zero and turn off the charging.
sbms0dualPV is less relevant for you as you do not use dual PV array so none of your EXT IOx are set as type 6 thus it will level will always be L1
if (CFET==0){CFETerror++;}
else {CFETerror=0;}
if (DFET==0){DFETerror++;}
else {DFETerror=0;}
if (CFETerror>=3){CFETerror=3;}
if (DFETerror>=3){DFETerror=3;}
if (EXT[2]==1){if (CFETerror<=1 && sbms0charge>0 && (sbms0dualPV==1||sbms0dualPV==3)) {EXT4_ON;} else {EXT4_OFF;}}
Then this is the second part:
and as you can see if sbms0newday is 1 meaning this is first charge of the day then sbsm0charge will always be higher than zero on your case 99 (the default 99% charge limit) and charging should terminate when CFET flag is turned off and this happen at over voltage.
#if SBMSmodel==0
if (sbms0newday==1) {hsoc[9]=3;sbms0charge=DMPPTval1[0];} //max current when using type 6.
else
{
if (DMPPTval1[1]>=SOC1+hsoc[9]) {sbms0charge=DMPPTval1[0]; hsoc[9]=0;}
else {sbms0charge=0; hsoc[9]=3;scandelay=5;}
}
if (sbms0charge!=0 && scandelay==0 && CFETerror==0 && (EXT[0]==6||EXT[2]==6||EXT[4]==6||EXT[6]==6))
{
// if (sbms0dualPV==0){sbms0dualPV=1;scandelay=5;}
if (sbms0dualPV==1){if (sbms0charge>((PV1+1)/500)) {sbms0dualPV=2;scandelay=2;} }
else if (sbms0dualPV==2){if (sbms0charge>((PV1+1)/660)) {sbms0dualPV=3;scandelay=2;} if (sbms0charge<((PV1+1)/1200)){sbms0dualPV=1;scandelay=2;}}
else if (sbms0dualPV==3){if (sbms0charge<((PV1+1)/1200)){sbms0dualPV=2;scandelay=2;} }
}
if (CFETerror!=0 || sbms0charge==0 || (EXT[0]!=6 && EXT[2]!=6 && EXT[4]!=6 && EXT[6]!=6)) {sbms0dualPV=1;scandelay=3;}
if (scandelay>0){scandelay--;}
#endif