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
Operations
Operations
Metrics
Environments
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
Mateus Goto
IC-Interface Control
Commits
738cb9d3
Commit
738cb9d3
authored
Aug 11, 2022
by
Mateus Goto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TEST] system commands
parent
64e385f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
NHR9400series/NHR9400.py
NHR9400series/NHR9400.py
+10
-2
NHR9400series/__pycache__/NHR9400.cpython-310.pyc
NHR9400series/__pycache__/NHR9400.cpython-310.pyc
+0
-0
NHR9400series/__pycache__/NHR9430.cpython-310.pyc
NHR9400series/__pycache__/NHR9430.cpython-310.pyc
+0
-0
main.py
main.py
+12
-4
No files found.
NHR9400series/NHR9400.py
View file @
738cb9d3
...
...
@@ -119,6 +119,8 @@ class NHR9400():
return
self
.
receiveString
(
value
)
def
close
(
self
):
self
.
systWatchdogService
()
self
.
__s
.
send
(
"SOUR:OUTP:ON 0
\n
"
.
encode
())
self
.
__s
.
send
(
"ABOR
\n
"
.
encode
())
self
.
__s
.
send
(
"SYST:LOC
\n
"
.
encode
())
...
...
@@ -145,16 +147,22 @@ class NHR9400():
#Command specifies the interval (Seconds) in which a command must be received. Query returns the programmed watchdog interval (Seconds).
def
systWatchdogInterval
(
self
,
interval
):
if
interval
<
0
:
return
-
1
self
.
__s
.
send
((
"SYST:WATC:INT"
+
str
(
interval
)
+
"
\n
"
).
encode
())
self
.
__s
.
send
((
"SYST:WATC:SERV
\n
"
).
encode
())
self
.
__s
.
send
((
"SYST:WATC:INT "
+
str
(
interval
)
+
"
\n
"
).
encode
())
self
.
__s
.
send
((
"SYST:WATC:SERV
\n
"
).
encode
())
print
(
self
.
checkErrors
())
#Command determines the type communication required to reset the watchdog timer. Query returns the type of communication required to reset the watchdog timer.
def
systWatchdogRobust
(
self
,
bool
):
if
bool
!=
0
or
bool
!=
1
:
return
-
1
self
.
__s
.
send
((
"SYST:WATC:ROB"
+
str
(
bool
)
+
"
\n
"
).
encode
())
self
.
__s
.
send
((
"SYST:WATC:ROB "
+
str
(
bool
)
+
"
\n
"
).
encode
())
value
=
self
.
__s
.
recv
(
1024
)
return
self
.
receiveString
(
value
)
#Command resets watchdog timer
def
systWatchdogService
(
self
):
self
.
__s
.
send
((
"SYST:WATC:SERV
\n
"
).
encode
())
################################# Digital Subsystem ############################
...
...
NHR9400series/__pycache__/NHR9400.cpython-310.pyc
View file @
738cb9d3
No preview for this file type
NHR9400series/__pycache__/NHR9430.cpython-310.pyc
View file @
738cb9d3
No preview for this file type
main.py
View file @
738cb9d3
...
...
@@ -22,16 +22,24 @@ def main():
for
elem
in
nhr10
:
print
(
"nhr10 ip: "
,
elem
.
getIp
())
print
(
"nhr10 max current: "
,
elem
.
instrumentCapCurrent
())
print
(
"nhr10 max current range: "
,
elem
.
instrumentCapCurrentRange
())
print
(
"nhr10 max freq range: "
,
elem
.
instrumentCapFreqRange
())
print
(
"nhr10 max power range: "
,
elem
.
instrumentCapPowerMax
())
print
(
"nhr10 max voltage range: "
,
elem
.
instrumentCapVoltageMaxMin
())
print
(
"nhr10 current range: "
,
elem
.
instrumentCapCurrentRange
())
print
(
"nhr10 freq range: "
,
elem
.
instrumentCapFreqRange
())
print
(
"nhr10 power range: "
,
elem
.
instrumentCapPowerMax
())
print
(
"nhr10 voltage range: "
,
elem
.
instrumentCapVoltageMaxMin
())
print
(
"nhr10 watch dog interval: "
,
elem
.
systWatchdogInterval
(
5
))
for
elem
in
nhr30
:
print
(
"nhr30 ip: "
,
elem
.
getIp
())
print
(
"nhr30 max current: "
,
elem
.
instrumentCapCurrent
())
print
(
"nhr30 current range: "
,
elem
.
instrumentCapCurrentRange
())
print
(
"nhr30 freq range: "
,
elem
.
instrumentCapFreqRange
())
print
(
"nhr30 power range: "
,
elem
.
instrumentCapPowerMax
())
print
(
"nhr30 voltage range: "
,
elem
.
instrumentCapVoltageMaxMin
())
print
(
"nhr30 range: "
,
elem
.
instrumentCapResistenceRL
())
time
.
sleep
(
3
)
...
...
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