Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IC-Interface Control
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
João Santos
IC-Interface Control
Commits
7e6cf308
Commit
7e6cf308
authored
Dec 22, 2023
by
joao-santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Updated] New NHR connection through mqtt
parent
cdd9cec9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
38 deletions
+26
-38
LabREI-1698857889340.json
LabREI-1698857889340.json
+14
-37
NHR9400series/NHR9400.py
NHR9400series/NHR9400.py
+12
-1
NHR9400series/__pycache__/NHR9400.cpython-310.pyc
NHR9400series/__pycache__/NHR9400.cpython-310.pyc
+0
-0
No files found.
LabREI-169
6967892939
.json
→
LabREI-169
8857889340
.json
View file @
7e6cf308
{
{
"__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"
:
[
5
0
,
11
0
,
52
,
117
,
4
8
,
10
8
,
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"
:
[
5
0
,
11
0
,
52
,
117
,
4
8
,
10
8
,
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
NHR9400series/NHR9400.py
View file @
7e6cf308
...
@@ -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
):
...
...
NHR9400series/__pycache__/NHR9400.cpython-310.pyc
View file @
7e6cf308
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment