Just to let you know: I used your script on the bms of a Powerqueen 24V 100Ah instead of 12V, it works perfectly :) ...