예제 #1
0
def voltageCurrentGain(self, mainWindow):
	value = mainWindow.voltageCurrentWeightParamDialog.getValue()
	data = [value['mask']]
	data.extend(trans_floats_to_bytes(value['phase_a']))
	data.extend(trans_floats_to_bytes(value['phase_b']))
	data.extend(trans_floats_to_bytes(value['phase_c']))
	frame = createFrame(105, 10, data, 67)
	send_frame(frame, mainWindow)
예제 #2
0
def powerOffset(self, mainWindow):
	value = mainWindow.powerOffsetParamDialog.getValue()
	data = [value['mask']]
	data.extend(trans_floats_to_bytes(value['phase_a']))
	data.extend(trans_floats_to_bytes(value['phase_b']))
	data.extend(trans_floats_to_bytes(value['phase_c']))
	frame = createFrame(105, 8, data, 67)
	send_frame(frame, mainWindow)
예제 #3
0
def startPrice(self, mainWindow):
	data = []
	value = mainWindow.startPriceParamDialog.getValue()
	data.append(value['electricity'])
	data.append(value['power'])
	data = trans_floats_to_bytes(data)
	frame = createFrame(105, 4, data, 67)
	send_frame(frame, mainWindow)
예제 #4
0
def temperatureCalib(self, mainWindow):
	try:
		data = []
		data.append(mainWindow.tempSpinBox.value())
		data = trans_floats_to_bytes(data)	#温度校准
		frame = createFrame(105, 5, data, 67)
		send_frame(frame, mainWindow)
	except Exception as e:
		print(e)
예제 #5
0
def powerGainCompensation(self, mainWindow):
	try:
		value = mainWindow.powerGainCompensationParamDialog.getValue()
		data = [value['mask']]
		data.extend(trans_floats_to_bytes(value['phase_a']))
		data.extend(trans_floats_to_bytes(value['phase_b']))
		data.extend(trans_floats_to_bytes(value['phase_c']))
		frame = createFrame(105, 6, data, 67)
		send_frame(frame, mainWindow)
	except Exception as e:
		print(e)
예제 #6
0
def readData(self, mainWindow):

	frame = createFrame(105, 16, [], 67)
	send_frame(frame, mainWindow)
예제 #7
0
def stopCaLib(self, mainWindow):
	frame = createFrame(105, 11, [], 67)
	send_frame(frame, mainWindow)
예제 #8
0
def powerRms(self, mainWindow):
	frame = createFrame(105, 9, [], 67)
	send_frame(frame, mainWindow)