Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
auke.klazema
HPIB
Commits
224a6c4a
Commit
224a6c4a
authored
Feb 16, 2018
by
auke.klazema
Browse files
Renamed some parameters
parent
e075c415
Changes
1
Hide whitespace changes
Inline
Side-by-side
hpib.py
View file @
224a6c4a
...
...
@@ -71,29 +71,29 @@ class PrologixGpibUsb(PortDevice):
self
.
_devices
=
"Not scanned."
self
.
_hpib_address
=
-
1
def
command
(
self
,
hpib_address
,
command
Str
):
def
command
(
self
,
hpib_address
,
command
):
if
hpib_address
!=
self
.
_hpib_address
:
self
.
_commandStr
=
"++addr "
+
str
(
hpib_address
)
+
chr
(
10
)
self
.
_commandStr
=
"++addr "
+
str
(
hpib_address
)
+
chr
(
10
)
self
.
_hpib_address
=
hpib_address
else
:
self
.
_commandStr
=
""
self
.
_commandStr
+=
command
Str
+
chr
(
10
)
self
.
_commandStr
+=
command
+
chr
(
10
)
self
.
_commandCount
=
self
.
_serialPort
.
write
(
self
.
_commandStr
)
def
query
(
self
,
hpib_address
,
query
Str
,
count
=
80
):
def
query
(
self
,
hpib_address
,
query
,
count
=
80
):
if
hpib_address
!=
self
.
_hpib_address
:
self
.
_commandStr
=
"++addr "
+
str
(
hpib_address
)
+
chr
(
10
)
self
.
_commandStr
=
"++addr "
+
str
(
hpib_address
)
+
chr
(
10
)
self
.
_hpib_address
=
hpib_address
else
:
self
.
_commandStr
=
""
self
.
_commandStr
+=
query
Str
+
chr
(
10
)
+
"++read eoi"
+
chr
(
10
)
self
.
_commandStr
+=
query
+
chr
(
10
)
+
"++read eoi"
+
chr
(
10
)
self
.
_commandCount
=
self
.
_serialPort
.
write
(
self
.
_commandStr
)
self
.
_returnStr
=
self
.
_serialPort
.
readline
()
return
self
.
_returnStr
[:
-
1
]
def
set_local
(
self
,
hpib_address
):
#self._commandStr = "++addr "+str(hpib_address)+chr(10)+"loc "+str(hpib_address)+chr(10)
#self._commandCount = self._serialPort.write(self._commandStr)
#
self._commandStr = "++addr "+str(hpib_address)+chr(10)+"loc "+str(hpib_address)+chr(10)
#
self._commandCount = self._serialPort.write(self._commandStr)
return
def
getDevices
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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