Commit 7e6cf308 authored by joao-santos's avatar joao-santos

[Updated] New NHR connection through mqtt

parent cdd9cec9
{
"__inputs": [],
"__requires": [
{
"type": "panel",
"id": "geeksrus-mqtt-panel",
"name": "MQTT panel",
"version": "1.0.7"
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.5.3"
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
......@@ -37,7 +16,7 @@
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"id": 1,
"links": [],
"panels": [
{
......@@ -276,14 +255,13 @@
"title": "NHR Set Voltage",
"type": "geeksrus-mqtt-panel",
"value": {
"type": "Buffer",
"data": [
50,
52,
48,
46,
48
]
110,
117,
108,
108
],
"type": "Buffer"
},
"viewModel": {
"maxValue": "100",
......@@ -366,14 +344,13 @@
"title": "NHR Set Frequency",
"type": "geeksrus-mqtt-panel",
"value": {
"type": "Buffer",
"data": [
50,
52,
48,
46,
48
]
110,
117,
108,
108
],
"type": "Buffer"
},
"viewModel": {
"maxValue": "100",
......@@ -632,5 +609,5 @@
"timezone": "",
"title": "LabREI",
"uid": "-SKl6PX4k",
"version": 2
"version": 4
}
\ No newline at end of file
......@@ -537,10 +537,21 @@ class NHR9400():
value = self.__s.recv(1024)
return self.receiveFloat(value)
def testFunction(self):
self.__s.send("INST:NSEL 1; SENS:SWE:APER 1; INIT".encode())
# self.__s.send("FECT:CURR;\n".encode())
# value = self.__s.recv(1024)
# return self.receiveFloat(value)
def testFunction(self):
self.__s.send("INST:NSEL 1; SENS:SWE:APER 1; INIT".encode())
#Fetch the average current of all channels
def getCurrent(self):
self.__s.send("INST:NSEL 1;CURR?\n".encode())
self.__s.send("FECT:CURR?\n".encode())
value = self.__s.recv(1024)
print(value.decode())
print(value)
return self.receiveFloat(value)
#fetch individual value of current of one channel
def getCurrentA(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment