remove not needed debug

master
ademant 2019-05-26 16:34:38 +02:00
parent 1ee4746f29
commit a81ddfc7ce
1 changed files with 14 additions and 39 deletions

53
tri.py
View File

@ -53,18 +53,6 @@ while a > 1:
print("a{0} ".format(i) + ": {0} ;".format(test))
f1.write("a1_{0}".format(i) + ":{0};".format(test))
# curr_batt_diff = adcc.read_adc(3, gain=GAIN)
# curr_batt_mppt = adcc.read_adc(2, gain=GAIN)
# curr_out_1 = adc.read_adc(2,gain=GAIN)
# curr_out_2 = adc.read_adc(3,gain=GAIN)
# uv_ind=adc.read_adc(1,gain=GAIN)
# f1.write("{0} ;".format(curr_batt_diff))
# f1.write("{0} ;".format(curr_batt_mppt))
# f1.write("{0} ;".format(curr_out_1))
# f1.write("{0} ;".format(curr_out_2))
# f1.write("{0} ;".format(uv_ind))
#read the registers from logical address 0 to 30.
rr = client.read_holding_registers(0,90,unit=1)
@ -111,35 +99,22 @@ while a > 1:
hourm = rr.registers[42]*65536+rr.registers[43]
charge_state = rr.registers[50]
#debug
print "Battery Voltage: %.2f" % volt_batt
print "Battery Voltage_t: %.2f" % volt_batt_t
print "Battery Voltage Sense: %.2f" % volt_batt_sens
print "Array Voltage: %.2f" % volt_arr
print "Battery Current: %.2f" % curr_batt
print "Array Current: %.2f" % curr_arr
print "Power in: %.2f" % power_in
print "Power out: %.2f" % power_out
# print "Battery Voltage: %.2f" % volt_batt
# print "Battery Voltage_t: %.2f" % volt_batt_t
# print "Battery Voltage Sense: %.2f" % volt_batt_sens
# print "Array Voltage: %.2f" % volt_arr
# print "Battery Current: %.2f" % curr_batt
# print "Array Current: %.2f" % curr_arr
# print "Power in: %.2f" % power_in
# print "Power out: %.2f" % power_out
print "Controller Temp: %.2f" % temp_heatsink
print "Battery Temp: %.2f" % temp_batt
print "AH total: %.2f" % ah_total
print "kWh total: %.2f" % kwh_total
print "hours: %.2f" % hourm
print "charge state : %.2f" % charge_state
# print "Controller Temp: %.2f" % temp_heatsink
# print "Battery Temp: %.2f" % temp_batt
# print "AH total: %.2f" % ah_total
# print "kWh total: %.2f" % kwh_total
# print "hours: %.2f" % hourm
# print "charge state : %.2f" % charge_state
# out = "V:%.2f" % battsV + " A:%.3f" % chargeI + " AV:%.2f" % arrayV + " D:%.2f" % pwmDuty + " S:" + state[statenum] + " CT:%.2f" % regTemp + " P:%.2f" % powerIn + " AH:%.2f" % ampH + "\n"
# fil = open('/home/pi/dumpdata.txt', 'w')
# fil.write(out)
# fil.close()
counter += 1
# if counter == 24:
# tid = time.ctime()
# out = str(tid) + ",%.2f" % battsV + ",%.3f" % chargeI + ",%.2f" % arrayV + ",%.2f" % pwmDuty + "," + state[statenum] + ",%.2f" % regTemp + ",%.2f" % powerIn + ",%.2f" % ampH + "\n"
# fil = open('/mnt/dumplog.csv', 'a')
# fil.write(out)
# fil.close()
# counter = 0
time.sleep(5)
f1.write("\n")