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
a32df349
Commit
a32df349
authored
Apr 18, 2018
by
Tammo Jan Dijkema
Browse files
Rename SignalGenerator to ClockGenerator, improve frequency check
parent
f7d6a7f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
camrasdevices.py
View file @
a32df349
...
...
@@ -28,7 +28,7 @@ class CamrasHpibDevice(HpibDevice):
"""Set the device to the specified frequency. Throws a RuntimeError if failed"""
self
.
command
(
"freq {:d} Hz"
.
format
(
int
(
freq
)))
new_freq
=
self
.
frequency
if
new_freq
!=
freq
:
if
int
(
new_freq
)
!=
int
(
freq
)
:
raise
RuntimeError
(
"Setting frequency failed: tried to set to {}, it is now {}"
.
format
(
freq
,
new_freq
))
...
...
@@ -44,8 +44,8 @@ class LocalOscillator(CamrasHpibDevice):
def
__init__
(
self
):
super
(
LocalOscillator
,
self
).
__init__
(
28
)
class
Signal
Generator
(
CamrasHpibDevice
):
"""Wrapper around HPIB commands for the
signal
generator"""
class
Clock
Generator
(
CamrasHpibDevice
):
"""Wrapper around HPIB commands for the
clock
generator
(should be at 140MHz)
"""
def
__init__
(
self
):
super
(
SignalGenerator
,
self
).
__init__
(
14
)
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