Specifications

default. Please change the values to match the port and baudrate settings used to interface on
the PC.
Here's an example to run the command:
python fuse.py 5
The value “5” represents the fuse value to set. In this example, it is 5 A. With slight
modifications to the script, the program can also monitor voltage and power.
fuse.py
import sys, dcload
from time import time
from win32com.client import Dispatch
from msvcrt import kbhit
port = 5
baudrate = 38400
def ReadCurrent(load):
fields = load.GetInputValues().split("\t") # Split on tab characters
current = float(fields[0].split()[0]) # Remove the "A"
return current
def main():
# Check the command line
if len(sys.argv) != 2:
print "Usage: %s fuse_value_in_A" % sys.argv[0]
exit(1)
# Get the desired fuse value from the command line
fuse_value_A = float(sys.argv[1])
assert(fuse_value_A) > 0
# Establish a load connection
load = Dispatch('BKServers.DCLoad85xx')
load.Initialize(port, baudrate) # Open a serial connection
load.SetRemoteControl()
load.SetMode("cc") # Set to constant current mode
load.SetCCCurrent(fuse_value_A) # We won't exceed this value
load.TurnLoadOn()
current = ReadCurrent(load)
while current < fuse_value_A:
if kbhit(): break
current = ReadCurrent(load)
load.TurnLoadOff()
load.SetLocalControl()
main()
Reference
[1] http://data.energizer.com/PDFs/BatteryIR.pdf A technical bulletin on internal resistance.
16 of 17