예제 #1
0
ps_volt = 48
ps_current = 2
print "Accessing the XPF6020 Power Supply"
ps = xpf6020.Xpf6020(ps_path)
ps.reset_ps()
ps.set_voltage(1, ps_volt)
ps.set_currentlimit(1, ps_current)

# Discharge battery @ CV mode, 46V, and 50V max
# print "Accessing the BK8500 Electronic Load"
# bkload = bk8500.Bk8500()
# bkload.remote_switch('on')

print "Accessing the Temperature Chamber"
tchamber_path = '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A603R0MG-if00-port0'
chamber = watlowf4.WatlowF4(tchamber_path)
chamber.conditioning_on(False)

# Write headers
ts = utils.get_timestamp()
logdir = '../motherbrain_tc_test-%s.csv' % ts
logfile = open(logdir, 'wt')
try:
    if logfile.tell() == 0:
        raise IOError, 'Null Error'
except IOError:
    logfile.write('TIMESTAMP')
    for sbvar in sbvars:
        logfile.write(',%s' % sbvar)
    for i2cvar in i2cvars:
        logfile.write(',%s' % i2cvar)
예제 #2
0
                    '--verbose',
                    action='store_true',
                    help='Tee serial communications to the console')
args = parser.parse_args()

print "Accessing the Power Supply"
sore = xpf6020.Xpf6020(args.sorensen)
sore.reset_ps()
sore.set_voltage(1, 40)
sore.set_currentlimit(1, 2)
sleep(1)
sore.all_output('on')
sleep(3)

print "Accessing the Temperature Chamber"
chamber = watlowf4.WatlowF4(args.tchamber)

print "Accessing Major Tom"
tom = shell.Shell(args.majortom)
sb = shell.Scoreboard(tom, None)
sbvars = []
sbvars.append('gopro_target_video_on')
sbvars.append('gopro0_video_on')
sbvars.append('gopro0_voltage_camera_5v')
sbvars.append('gopro0_current_camera_5v')
sbvars.append('version_hash_gopro0')
sbvars.append('gopro1_video_on')
sbvars.append('gopro1_voltage_camera_5v')
sbvars.append('gopro1_current_camera_5v')
sbvars.append('version_hash_gopro1')
sbvars.append('gopro2_video_on')