Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
HPIB
Commits
e075c415
Commit
e075c415
authored
Feb 16, 2018
by
auke.klazema
Browse files
Renamed some parameters
parent
054a8d21
Changes
1
Hide whitespace changes
Inline
Side-by-side
hpib.py
View file @
e075c415
...
...
@@ -8,7 +8,7 @@ class PortDevice(object):
def
command
(
self
,
hpib_address
,
command
):
raise
NotImplementedError
def
query
(
self
,
hpib_address
,
query
Str
,
count
=
80
):
def
query
(
self
,
hpib_address
,
query
,
count
=
80
):
raise
NotImplementedError
def
set_local
(
self
,
hpib_address
):
...
...
@@ -109,14 +109,14 @@ class GPIB_232_485CT_A(PortDevice):
self
.
_serialPort
.
flushInput
()
self
.
_pause
=
pause
def
command
(
self
,
hpib_address
,
command
Str
):
self
.
_commandStr
=
"wr "
+
str
(
hpib_address
)
+
chr
(
10
)
+
command
Str
+
chr
(
13
)
def
command
(
self
,
hpib_address
,
command
):
self
.
_commandStr
=
"wr "
+
str
(
hpib_address
)
+
chr
(
10
)
+
command
+
chr
(
13
)
self
.
_commandCount
=
self
.
_serialPort
.
write
(
self
.
_commandStr
)
def
query
(
self
,
hpib_address
,
query
Str
,
count
=
80
):
def
query
(
self
,
hpib_address
,
query
,
count
=
80
):
# flushInput should not be necessary
# self._serialPort.flushInput()
self
.
_commandStr
=
"wr "
+
str
(
hpib_address
)
+
chr
(
10
)
+
query
Str
+
chr
(
13
)
self
.
_commandStr
=
"wr "
+
str
(
hpib_address
)
+
chr
(
10
)
+
query
+
chr
(
13
)
self
.
_commandCount
=
self
.
_serialPort
.
write
(
self
.
_commandStr
)
self
.
_queryStr
=
"rd #"
+
str
(
count
)
+
" "
+
str
(
hpib_address
)
+
chr
(
13
)
self
.
_queryCount
=
self
.
_serialPort
.
write
(
self
.
_queryStr
)
...
...
Write
Preview
Supports
Markdown
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