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": { "annotations": {
"list": [ "list": [
{ {
...@@ -37,7 +16,7 @@ ...@@ -37,7 +16,7 @@
"editable": true, "editable": true,
"gnetId": null, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 1,
"links": [], "links": [],
"panels": [ "panels": [
{ {
...@@ -276,14 +255,13 @@ ...@@ -276,14 +255,13 @@
"title": "NHR Set Voltage", "title": "NHR Set Voltage",
"type": "geeksrus-mqtt-panel", "type": "geeksrus-mqtt-panel",
"value": { "value": {
"type": "Buffer",
"data": [ "data": [
50, 110,
52, 117,
48, 108,
46, 108
48 ],
] "type": "Buffer"
}, },
"viewModel": { "viewModel": {
"maxValue": "100", "maxValue": "100",
...@@ -366,14 +344,13 @@ ...@@ -366,14 +344,13 @@
"title": "NHR Set Frequency", "title": "NHR Set Frequency",
"type": "geeksrus-mqtt-panel", "type": "geeksrus-mqtt-panel",
"value": { "value": {
"type": "Buffer",
"data": [ "data": [
50, 110,
52, 117,
48, 108,
46, 108
48 ],
] "type": "Buffer"
}, },
"viewModel": { "viewModel": {
"maxValue": "100", "maxValue": "100",
...@@ -632,5 +609,5 @@ ...@@ -632,5 +609,5 @@
"timezone": "", "timezone": "",
"title": "LabREI", "title": "LabREI",
"uid": "-SKl6PX4k", "uid": "-SKl6PX4k",
"version": 2 "version": 4
} }
\ No newline at end of file
...@@ -537,10 +537,21 @@ class NHR9400(): ...@@ -537,10 +537,21 @@ class NHR9400():
value = self.__s.recv(1024) value = self.__s.recv(1024)
return self.receiveFloat(value) 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 #Fetch the average current of all channels
def getCurrent(self): def getCurrent(self):
self.__s.send("INST:NSEL 1;CURR?\n".encode()) self.__s.send("FECT:CURR?\n".encode())
value = self.__s.recv(1024) value = self.__s.recv(1024)
print(value.decode())
print(value)
return self.receiveFloat(value) return self.receiveFloat(value)
#fetch individual value of current of one channel #fetch individual value of current of one channel
def getCurrentA(self): 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